+
+ {formattedPriceImpactPercentage}
+ {" "}
+ /{" "}
+
+ {formattedTotalFeePercentage}
+
+ >
+ }
+ />
+ );
+}
diff --git a/src/components/Synthetics/TradeBox/TradeBox.tsx b/src/components/Synthetics/TradeBox/TradeBox.tsx
index 63c64d5133..a355f95d2d 100644
--- a/src/components/Synthetics/TradeBox/TradeBox.tsx
+++ b/src/components/Synthetics/TradeBox/TradeBox.tsx
@@ -399,7 +399,7 @@ export function TradeBox({ isMobile }: { isMobile: boolean }) {
priceImpactPercentage = fees?.swapPriceImpact?.precisePercentage ?? 0n;
} else if (isTrigger && decreaseAmounts) {
sizeDeltaUsd = decreaseAmounts.sizeDeltaUsd;
- priceImpactDeltaUsd = decreaseAmounts.positionPriceImpactDeltaUsd;
+ priceImpactDeltaUsd = decreaseAmounts.totalPendingImpactDeltaUsd;
priceImpactPercentage = fees?.positionPriceImpact?.precisePercentage ?? 0n;
}
diff --git a/src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx b/src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx
index b8f98bb03b..eb6d4d882a 100644
--- a/src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx
+++ b/src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx
@@ -135,32 +135,6 @@ function ExistingPositionInfoRows() {
);
}
-function IncreaseOrderRow() {
- const tradeFlags = useSelector(selectTradeboxTradeFlags);
- const { isMarket, isLong } = tradeFlags;
- const increaseAmounts = useSelector(selectTradeboxIncreasePositionAmounts);
- const allowedSlippage = useSelector(selectTradeboxAllowedSlippage);
- const fees = useSelector(selectTradeboxFees);
- const executionPrice = useSelector(selectTradeboxExecutionPrice);
- const toToken = useSelector(selectTradeboxToToken);
-
- const acceptablePrice =
- isMarket && increaseAmounts?.acceptablePrice
- ? applySlippageToPrice(allowedSlippage, increaseAmounts.acceptablePrice, true, isLong)
- : increaseAmounts?.acceptablePrice;
-
- return (
-
- );
-}
-
function DecreaseOrderRow() {
const tradeFlags = useSelector(selectTradeboxTradeFlags);
const { isMarket, isLong } = tradeFlags;
@@ -288,7 +262,6 @@ export function TradeBoxAdvancedGroups({
>
)}
- {isIncrease && !isTwap && }
{isTrigger && }
diff --git a/src/components/Synthetics/TradeBox/hooks/useTradeboxTransactions.tsx b/src/components/Synthetics/TradeBox/hooks/useTradeboxTransactions.tsx
index f87a3fa95d..e35c7243e9 100644
--- a/src/components/Synthetics/TradeBox/hooks/useTradeboxTransactions.tsx
+++ b/src/components/Synthetics/TradeBox/hooks/useTradeboxTransactions.tsx
@@ -237,7 +237,7 @@ export function useTradeboxTransactions({ setPendingTxns }: TradeboxTransactions
isExpress: Boolean(expressParams),
isTwap: tradeMode === TradeMode.Twap,
interactionId: marketInfo?.name ? userAnalytics.getInteractionId(getTradeInteractionKey(marketInfo.name)) : "",
- priceImpactDeltaUsd: decreaseAmounts?.positionPriceImpactDeltaUsd,
+ priceImpactDeltaUsd: decreaseAmounts?.totalPendingImpactDeltaUsd,
priceImpactPercentage: fees?.positionPriceImpact?.precisePercentage,
netRate1h: isLong ? chartHeaderInfo?.fundingRateLong : chartHeaderInfo?.fundingRateShort,
tradeMode,
diff --git a/src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx b/src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
index e158bf9ba0..326eb9820e 100644
--- a/src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+++ b/src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
@@ -291,6 +291,50 @@ export function TradeFeesRow(p: Props) {
}
: undefined;
+ const netPriceImpactRow =
+ p.positionPriceImpact?.deltaUsd !== undefined && p.positionPriceImpact.deltaUsd !== 0n
+ ? {
+ id: "netPriceImpact",
+ label: (
+ <>
+ {t`Net Price Impact`}:
+
+ (
+ {formatPercentage(bigMath.abs(p.positionPriceImpact.precisePercentage), {
+ displayDecimals: 3,
+ bps: false,
+ })}{" "}
+ of position size)
+
+ >
+ ),
+ value: formatDeltaUsd(p.positionPriceImpact.deltaUsd),
+ className: getPositiveOrNegativeClass(p.positionPriceImpact.deltaUsd, "text-green-500"),
+ }
+ : undefined;
+
+ const priceImpactDiffRow =
+ p.priceImpactDiff?.deltaUsd !== undefined && p.priceImpactDiff.deltaUsd !== 0n
+ ? {
+ id: "priceImpactDiff",
+ label: (
+ <>
+ {t`Price Impact Rebates`}:
+
+ (
+ {formatPercentage(bigMath.abs(p.priceImpactDiff.precisePercentage), {
+ displayDecimals: 3,
+ bps: false,
+ })}{" "}
+ of position size)
+
+ >
+ ),
+ value: formatDeltaUsd(p.priceImpactDiff.deltaUsd),
+ className: getPositiveOrNegativeClass(p.priceImpactDiff.deltaUsd, "text-green-500"),
+ }
+ : undefined;
+
const rebateRow =
tradingIncentives && rebateIsApplicable
? {
@@ -341,6 +385,8 @@ export function TradeFeesRow(p: Props) {
if (p.feesType === "decrease") {
return [
+ netPriceImpactRow,
+ priceImpactDiffRow,
borrowFeeRow,
fundingFeeRow,
positionFeeRow,
@@ -417,6 +463,21 @@ export function TradeFeesRow(p: Props) {
);
}, [chainId, incentivesTokenTitle, rebateIsApplicable, tradingIncentives?.maxRebatePercent]);
+ const priceImpactRebatesInfo = useMemo(() => {
+ if (p.priceImpactDiff?.deltaUsd === undefined || p.priceImpactDiff.deltaUsd === 0n) {
+ return null;
+ }
+
+ return (
+
+ Price impact rebates for closing trades are claimable inder this claims tab.{" "}
+
+ Read more
+
+
+ );
+ }, [p.priceImpactDiff?.deltaUsd]);
+
const swapRouteMsg = useMemo(() => {
if (p.swapFees && p.swapFees.length <= 2) return;
return (
@@ -463,14 +524,16 @@ export function TradeFeesRow(p: Props) {
/>
))}
{incentivesBottomText &&
}
- {incentivesBottomText}
+ {incentivesBottomText &&
}
+ {priceImpactRebatesInfo &&
}
+ {swapRouteMsg &&
}
{swapRouteMsg}
}
/>
);
}
- }, [totalFeeUsd, feeRows, incentivesBottomText, shouldShowWarning, swapRouteMsg]);
+ }, [totalFeeUsd, feeRows, incentivesBottomText, shouldShowWarning, priceImpactRebatesInfo, swapRouteMsg]);
return ;
}
diff --git a/src/context/SyntheticsStateContext/selectors/positionSellerSelectors.ts b/src/context/SyntheticsStateContext/selectors/positionSellerSelectors.ts
index 8e93037599..5445a0ce1c 100644
--- a/src/context/SyntheticsStateContext/selectors/positionSellerSelectors.ts
+++ b/src/context/SyntheticsStateContext/selectors/positionSellerSelectors.ts
@@ -236,6 +236,7 @@ export const selectPositionSellerFees = createSelector((q) => {
const collateralDeltaUsd = bigMath.mulDiv(position.collateralUsd, sizeReductionBps, BASIS_POINTS_DIVISOR_BIGINT);
const oraclePriceCount = estimateOrderOraclePriceCount(swapPathLength);
+
return {
fees: getTradeFees({
initialCollateralUsd: position.collateralUsd,
@@ -245,7 +246,7 @@ export const selectPositionSellerFees = createSelector((q) => {
externalSwapQuote: undefined,
positionFeeUsd: decreaseAmounts.positionFeeUsd,
swapPriceImpactDeltaUsd: swapAmounts?.swapPathStats?.totalSwapPriceImpactDeltaUsd || 0n,
- positionPriceImpactDeltaUsd: decreaseAmounts.positionPriceImpactDeltaUsd,
+ positionPriceImpactDeltaUsd: decreaseAmounts.totalPendingImpactDeltaUsd,
priceImpactDiffUsd: decreaseAmounts.priceImpactDiffUsd,
borrowingFeeUsd: decreaseAmounts.borrowingFeeUsd,
fundingFeeUsd: decreaseAmounts.fundingFeeUsd,
diff --git a/src/context/SyntheticsStateContext/selectors/tradeboxSelectors/index.ts b/src/context/SyntheticsStateContext/selectors/tradeboxSelectors/index.ts
index 2377980188..490b4b40e7 100644
--- a/src/context/SyntheticsStateContext/selectors/tradeboxSelectors/index.ts
+++ b/src/context/SyntheticsStateContext/selectors/tradeboxSelectors/index.ts
@@ -781,7 +781,7 @@ export const selectTradeboxFees = createSelector(function selectTradeboxFees(q)
externalSwapQuote: undefined,
positionFeeUsd: decreaseAmounts.positionFeeUsd,
swapPriceImpactDeltaUsd: 0n,
- positionPriceImpactDeltaUsd: decreaseAmounts.positionPriceImpactDeltaUsd,
+ positionPriceImpactDeltaUsd: decreaseAmounts.totalPendingImpactDeltaUsd,
priceImpactDiffUsd: decreaseAmounts.priceImpactDiffUsd,
borrowingFeeUsd: decreaseAmounts.borrowingFeeUsd,
fundingFeeUsd: decreaseAmounts.fundingFeeUsd,
diff --git a/src/context/SyntheticsStateContext/selectors/tradeboxSelectors/selectTradeboxAvailableMarketsOptions.ts b/src/context/SyntheticsStateContext/selectors/tradeboxSelectors/selectTradeboxAvailableMarketsOptions.ts
index f79089df82..07546fd001 100644
--- a/src/context/SyntheticsStateContext/selectors/tradeboxSelectors/selectTradeboxAvailableMarketsOptions.ts
+++ b/src/context/SyntheticsStateContext/selectors/tradeboxSelectors/selectTradeboxAvailableMarketsOptions.ts
@@ -215,7 +215,9 @@ export const selectTradeboxAvailableMarketsOptions = createSelector((q) => {
const priceImpactDeltaUsd = getCappedPositionImpactUsd(
liquidMarket,
marketIncreasePositionAmounts.sizeDeltaUsd,
- isLong
+ isLong,
+ true,
+ { shouldCapNegativeImpact: true }
);
const { acceptablePriceDeltaBps } = getAcceptablePriceByPriceImpact({
diff --git a/src/context/SyntheticsStateContext/selectors/tradeboxSelectors/selectTradeboxRelatedMarketsStats.ts b/src/context/SyntheticsStateContext/selectors/tradeboxSelectors/selectTradeboxRelatedMarketsStats.ts
index ec028fe6a0..bbad93af11 100644
--- a/src/context/SyntheticsStateContext/selectors/tradeboxSelectors/selectTradeboxRelatedMarketsStats.ts
+++ b/src/context/SyntheticsStateContext/selectors/tradeboxSelectors/selectTradeboxRelatedMarketsStats.ts
@@ -85,7 +85,9 @@ export const selectTradeboxRelatedMarketsStats = createSelector((q) => {
const priceImpactDeltaUsd = getCappedPositionImpactUsd(
relatedMarket,
marketIncreasePositionAmounts.sizeDeltaUsd,
- isLong
+ isLong,
+ true,
+ { shouldCapNegativeImpact: true }
);
const { acceptablePriceDeltaBps } = getAcceptablePriceByPriceImpact({
diff --git a/src/domain/synthetics/__tests__/trade/decrease.spec.ts b/src/domain/synthetics/__tests__/trade/decrease.spec.ts
index fe4e15790b..d2052a79e4 100644
--- a/src/domain/synthetics/__tests__/trade/decrease.spec.ts
+++ b/src/domain/synthetics/__tests__/trade/decrease.spec.ts
@@ -140,6 +140,7 @@ const position: PositionInfoLoaded = {
collateralAmount: BigInt("0x1b3c0b"),
increasedAtTime: BigInt((Date.now() / 1000) >> 0),
decreasedAtTime: BigInt((Date.now() / 1000) >> 0),
+ pendingImpactAmount: BigInt("0x00"),
isLong: true,
pendingBorrowingFeesUsd: BigInt("0x01f7685a27fa507f04c467a667"),
fundingFeeAmount: BigInt("0x059624"),
diff --git a/src/domain/synthetics/markets/utils.ts b/src/domain/synthetics/markets/utils.ts
index bc8f5f87d4..2dd590090a 100644
--- a/src/domain/synthetics/markets/utils.ts
+++ b/src/domain/synthetics/markets/utils.ts
@@ -195,7 +195,9 @@ export function getMinPriceImpactMarket(
const liquidity = getAvailableUsdLiquidityForPosition(marketInfo, isLong);
if (isMarketIndexToken(marketInfo, indexTokenAddress) && liquidity > sizeDeltaUsd) {
- const priceImpactDeltaUsd = getCappedPositionImpactUsd(marketInfo, sizeDeltaUsd, isLong);
+ const priceImpactDeltaUsd = getCappedPositionImpactUsd(marketInfo, sizeDeltaUsd, isLong, true, {
+ shouldCapNegativeImpact: true,
+ });
if (bestImpactDeltaUsd === undefined || priceImpactDeltaUsd > bestImpactDeltaUsd) {
bestMarket = marketInfo;
diff --git a/src/domain/synthetics/positions/usePositions.ts b/src/domain/synthetics/positions/usePositions.ts
index 7882ecfd5f..f56d6eb76c 100644
--- a/src/domain/synthetics/positions/usePositions.ts
+++ b/src/domain/synthetics/positions/usePositions.ts
@@ -116,6 +116,7 @@ export function usePositions(
fundingFeeAmount: fees.funding.fundingFeeAmount,
claimableLongTokenAmount: fees.funding.claimableLongTokenAmount,
claimableShortTokenAmount: fees.funding.claimableShortTokenAmount,
+ pendingImpactAmount: numbers.pendingImpactAmount,
pnl: basePnlUsd,
positionFeeAmount: fees.positionFeeAmount,
traderDiscountAmount: fees.referral.traderDiscountAmount,
@@ -312,7 +313,6 @@ export function getPendingMockPosition(pendingUpdate: PendingPositionUpdate): Po
pnl: 0n,
traderDiscountAmount: 0n,
pendingImpactAmount: 0n,
- pendingImpactUsd: 0n,
borrowingFactor: 0n,
fundingFeeAmountPerSize: 0n,
longTokenClaimableFundingAmountPerSize: 0n,
diff --git a/src/domain/synthetics/testUtils/mocks.ts b/src/domain/synthetics/testUtils/mocks.ts
index b98c148cee..0faa628704 100644
--- a/src/domain/synthetics/testUtils/mocks.ts
+++ b/src/domain/synthetics/testUtils/mocks.ts
@@ -56,6 +56,7 @@ export function mockPositionInfo(
collateralAmount: convertToTokenAmount(collateralUsd, collateralToken.decimals, collateralToken.prices?.minPrice)!,
increasedAtTime: BigInt((Date.now() / 1000) >> 0),
decreasedAtTime: BigInt((Date.now() / 1000) >> 0),
+ pendingImpactAmount: 0n,
isLong: true,
pendingBorrowingFeesUsd: 0n,
fundingFeeAmount: 0n,
diff --git a/src/domain/synthetics/trade/utils/decrease.spec.ts b/src/domain/synthetics/trade/utils/decrease.spec.ts
index 2d38f1f633..963f377c2c 100644
--- a/src/domain/synthetics/trade/utils/decrease.spec.ts
+++ b/src/domain/synthetics/trade/utils/decrease.spec.ts
@@ -144,6 +144,7 @@ const position: PositionInfoLoaded = {
isLong: true,
pendingBorrowingFeesUsd: BigInt("0x01f7685a27fa507f04c467a667"),
fundingFeeAmount: BigInt("0x059624"),
+ pendingImpactAmount: BigInt("0x00"),
claimableLongTokenAmount: BigInt("0x00"),
claimableShortTokenAmount: BigInt("0x00"),
marketInfo,
diff --git a/src/domain/synthetics/trade/utils/decrease.ts b/src/domain/synthetics/trade/utils/decrease.ts
index 72370859f0..77a9987f1c 100644
--- a/src/domain/synthetics/trade/utils/decrease.ts
+++ b/src/domain/synthetics/trade/utils/decrease.ts
@@ -2,7 +2,13 @@ import { ethers } from "ethers";
import { BASIS_POINTS_DIVISOR_BIGINT, DEFAULT_ACCEPTABLE_PRICE_IMPACT_BUFFER } from "config/factors";
import { UserReferralInfo } from "domain/referrals";
-import { getPositionFee } from "domain/synthetics/fees";
+import {
+ capPositionImpactUsdByMaxImpactPool,
+ capPositionImpactUsdByMaxPriceImpactFactor,
+ getMaxPositionImpactFactors,
+ getPositionFee,
+ getProportionalPendingImpactValues,
+} from "domain/synthetics/fees";
import { MarketInfo } from "domain/synthetics/markets";
import { DecreasePositionSwapType, OrderType } from "domain/synthetics/orders";
import {
@@ -81,7 +87,8 @@ export function getDecreasePositionAmounts(p: {
triggerPrice: 0n,
acceptablePrice: 0n,
- positionPriceImpactDeltaUsd: 0n,
+ proportionalPendingImpactDeltaUsd: 0n,
+ totalPendingImpactDeltaUsd: 0n,
priceImpactDiffUsd: 0n,
acceptablePriceDeltaBps: 0n,
recommendedAcceptablePriceDeltaBps: 0n,
@@ -139,6 +146,7 @@ export function getDecreasePositionAmounts(p: {
if (!position || position.sizeInUsd <= 0 || position.sizeInTokens <= 0) {
applyAcceptablePrice({
+ position,
marketInfo,
isLong,
isTrigger,
@@ -150,7 +158,7 @@ export function getDecreasePositionAmounts(p: {
const positionFeeInfo = getPositionFee(
marketInfo,
values.sizeDeltaUsd,
- values.positionPriceImpactDeltaUsd > 0,
+ values.totalPendingImpactDeltaUsd > 0,
userReferralInfo
);
@@ -162,7 +170,7 @@ export function getDecreasePositionAmounts(p: {
0n +
values.positionFeeUsd +
values.uiFeeUsd +
- (values.positionPriceImpactDeltaUsd < 0 ? values.positionPriceImpactDeltaUsd : 0n);
+ (values.totalPendingImpactDeltaUsd < 0 ? values.totalPendingImpactDeltaUsd : 0n);
values.payedOutputUsd = totalFeesUsd;
@@ -217,6 +225,7 @@ export function getDecreasePositionAmounts(p: {
estimatedCollateralUsd !== 0n ? getBasisPoints(values.estimatedPnl, estimatedCollateralUsd) : 0n;
applyAcceptablePrice({
+ position,
marketInfo,
isLong,
isTrigger,
@@ -230,8 +239,8 @@ export function getDecreasePositionAmounts(p: {
if (values.realizedPnl > 0) {
profitUsd = profitUsd + values.realizedPnl;
}
- if (values.positionPriceImpactDeltaUsd > 0) {
- profitUsd = profitUsd + values.positionPriceImpactDeltaUsd;
+ if (values.totalPendingImpactDeltaUsd > 0) {
+ profitUsd = profitUsd + values.totalPendingImpactDeltaUsd;
}
const profitAmount = convertToTokenAmount(profitUsd, collateralToken.decimals, values.collateralPrice)!;
@@ -239,7 +248,7 @@ export function getDecreasePositionAmounts(p: {
const positionFeeInfo = getPositionFee(
marketInfo,
values.sizeDeltaUsd,
- values.positionPriceImpactDeltaUsd > 0,
+ values.totalPendingImpactDeltaUsd > 0,
userReferralInfo
);
const estimatedPositionFeeCost = estimateCollateralCost(
@@ -291,7 +300,7 @@ export function getDecreasePositionAmounts(p: {
const negativePnlUsd = values.realizedPnl < 0 ? bigMath.abs(values.realizedPnl) : 0n;
const negativePriceImpactUsd =
- values.positionPriceImpactDeltaUsd < 0 ? bigMath.abs(values.positionPriceImpactDeltaUsd) : 0n;
+ values.totalPendingImpactDeltaUsd < 0 ? bigMath.abs(values.totalPendingImpactDeltaUsd) : 0n;
const priceImpactDiffUsd = values.priceImpactDiffUsd > 0 ? values.priceImpactDiffUsd : 0n;
const totalFeesUsd =
@@ -373,6 +382,54 @@ export function getDecreasePositionAmounts(p: {
return values;
}
+function getTotalImpactDeltaUsd({
+ marketInfo,
+ sizeInUsd,
+ pendingImpactAmount,
+ sizeDeltaUsd,
+ priceImpactDeltaUsd,
+}: {
+ marketInfo: MarketInfo;
+ sizeInUsd: bigint;
+ pendingImpactAmount: bigint;
+ sizeDeltaUsd: bigint;
+ priceImpactDeltaUsd: bigint;
+}) {
+ const { proportionalPendingImpactDeltaUsd } = getProportionalPendingImpactValues({
+ sizeInUsd,
+ pendingImpactAmount,
+ sizeDeltaUsd,
+ indexToken: marketInfo.indexToken,
+ });
+
+ let totalImpactDeltaUsd = priceImpactDeltaUsd + proportionalPendingImpactDeltaUsd;
+ let priceImpactDiffUsd = 0n;
+
+ if (totalImpactDeltaUsd < 0) {
+ const { maxNegativeImpactFactor } = getMaxPositionImpactFactors(marketInfo);
+ const maxPriceImpactFactor = applyFactor(sizeDeltaUsd, maxNegativeImpactFactor);
+
+ const minPriceImpactUsd = -applyFactor(sizeDeltaUsd, maxPriceImpactFactor);
+
+ if (totalImpactDeltaUsd < minPriceImpactUsd) {
+ priceImpactDiffUsd = minPriceImpactUsd - totalImpactDeltaUsd;
+ totalImpactDeltaUsd = minPriceImpactUsd;
+ }
+ }
+
+ if (totalImpactDeltaUsd > 0) {
+ totalImpactDeltaUsd = capPositionImpactUsdByMaxPriceImpactFactor(marketInfo, totalImpactDeltaUsd);
+ }
+
+ totalImpactDeltaUsd = capPositionImpactUsdByMaxImpactPool(marketInfo, totalImpactDeltaUsd);
+
+ return {
+ totalImpactDeltaUsd,
+ proportionalPendingImpactDeltaUsd,
+ priceImpactDiffUsd,
+ };
+}
+
export function getIsFullClose(p: {
position: PositionInfoLoaded;
sizeDeltaUsd: bigint;
@@ -486,6 +543,7 @@ export function payForCollateralCost(p: {
}
function applyAcceptablePrice(p: {
+ position: PositionInfoLoaded | undefined;
marketInfo: MarketInfo;
isLong: boolean;
isTrigger: boolean;
@@ -493,7 +551,15 @@ function applyAcceptablePrice(p: {
acceptablePriceImpactBuffer?: number;
values: DecreasePositionAmounts;
}) {
- const { marketInfo, isLong, values, isTrigger, fixedAcceptablePriceImpactBps, acceptablePriceImpactBuffer } = p;
+ const {
+ position,
+ marketInfo,
+ isLong,
+ values,
+ isTrigger,
+ fixedAcceptablePriceImpactBps,
+ acceptablePriceImpactBuffer,
+ } = p;
const acceptablePriceInfo = getAcceptablePriceInfo({
marketInfo,
@@ -503,10 +569,20 @@ function applyAcceptablePrice(p: {
sizeDeltaUsd: values.sizeDeltaUsd,
});
- values.positionPriceImpactDeltaUsd = acceptablePriceInfo.priceImpactDeltaUsd;
values.acceptablePrice = acceptablePriceInfo.acceptablePrice;
values.acceptablePriceDeltaBps = acceptablePriceInfo.acceptablePriceDeltaBps;
- values.priceImpactDiffUsd = acceptablePriceInfo.priceImpactDiffUsd;
+
+ const totalImpactValues = getTotalImpactDeltaUsd({
+ marketInfo,
+ sizeInUsd: position?.sizeInUsd ?? 0n,
+ pendingImpactAmount: position?.pendingImpactAmount ?? 0n,
+ sizeDeltaUsd: values.sizeDeltaUsd,
+ priceImpactDeltaUsd: acceptablePriceInfo.priceImpactDeltaUsd,
+ });
+
+ values.totalPendingImpactDeltaUsd = totalImpactValues.totalImpactDeltaUsd;
+ values.proportionalPendingImpactDeltaUsd = totalImpactValues.proportionalPendingImpactDeltaUsd;
+ values.priceImpactDiffUsd = totalImpactValues.priceImpactDiffUsd;
if (isTrigger) {
if (values.triggerOrderType === OrderType.StopLossDecrease) {
@@ -522,7 +598,7 @@ function applyAcceptablePrice(p: {
isLong,
indexPrice: values.indexPrice,
sizeDeltaUsd: values.sizeDeltaUsd,
- priceImpactDeltaUsd: values.positionPriceImpactDeltaUsd,
+ priceImpactDeltaUsd: acceptablePriceInfo.priceImpactDeltaUsd,
acceptablePriceImapctBuffer: acceptablePriceImpactBuffer || DEFAULT_ACCEPTABLE_PRICE_IMPACT_BUFFER,
});
diff --git a/src/domain/synthetics/trade/utils/warnings.ts b/src/domain/synthetics/trade/utils/warnings.ts
index 3981ffc52e..2bfcb15c1a 100644
--- a/src/domain/synthetics/trade/utils/warnings.ts
+++ b/src/domain/synthetics/trade/utils/warnings.ts
@@ -18,7 +18,7 @@ export function getIsHighSwapImpact(swapPriceImpact?: FeeItem) {
export function getIsHighPositionImpact(positionImpact?: FeeItem) {
return Boolean(
- positionImpact && positionImpact.deltaUsd < 0 && bigMath.abs(positionImpact.bps) >= HIGH_POSITION_IMPACT_BPS
+ positionImpact && positionImpact.deltaUsd < 0 && bigMath.abs(positionImpact.bps) > HIGH_POSITION_IMPACT_BPS
);
}
diff --git a/src/locales/de/messages.po b/src/locales/de/messages.po
index 172615848b..b7e093e7ca 100644
--- a/src/locales/de/messages.po
+++ b/src/locales/de/messages.po
@@ -2234,6 +2234,10 @@ msgstr ""
msgid "Liquidity data not loaded"
msgstr "Liquiditätsdaten nicht geladen"
+#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+msgid "Price impact rebates for closing trades are claimable inder this claims tab. <0>Read more0>"
+msgstr ""
+
#: src/pages/Home/Home.tsx
msgid "Total Trading Volume"
msgstr "Trading Volumen insgesamt"
@@ -4528,6 +4532,10 @@ msgstr "Transfer bereits begonnen"
msgid "Withdraw submitted."
msgstr ""
+#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+msgid "Net Price Impact"
+msgstr ""
+
#: src/components/Referrals/AddAffiliateCode.tsx
#: src/components/Referrals/AddAffiliateCode.tsx
msgid "Enter a code"
@@ -8008,6 +8016,7 @@ msgstr "Fehler bei der Bilderzeugung, bitte aktualisieren und versuche es erneut
#: src/components/Synthetics/Claims/ClaimableCardUI.tsx
#: src/components/Synthetics/ExecutionPriceRow.tsx
+#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
msgid "Price Impact Rebates"
msgstr ""
@@ -8339,6 +8348,10 @@ msgstr ""
msgid "<0>Delegate your undelegated {0} GMX DAO0>voting power before claiming."
msgstr ""
+#: src/components/Synthetics/PositionSeller/rows/PositionSellerPriceImpactFeesRow.tsx
+msgid "Net Price Impact / Fees"
+msgstr ""
+
#: src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx
msgid "You will be long {indexSymbol} from your long position, as well as from your {collateralSymbol} collateral. The liquidation price is higher compared to using a stablecoin as collateral since the worth of the collateral will change with its price."
msgstr ""
diff --git a/src/locales/en/messages.po b/src/locales/en/messages.po
index 668d38deb8..46e52e7e81 100644
--- a/src/locales/en/messages.po
+++ b/src/locales/en/messages.po
@@ -2234,6 +2234,10 @@ msgstr "Winner:"
msgid "Liquidity data not loaded"
msgstr "Liquidity data not loaded"
+#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+msgid "Price impact rebates for closing trades are claimable inder this claims tab. <0>Read more0>"
+msgstr "Price impact rebates for closing trades are claimable inder this claims tab. <0>Read more0>"
+
#: src/pages/Home/Home.tsx
msgid "Total Trading Volume"
msgstr "Total Trading Volume"
@@ -4531,6 +4535,10 @@ msgstr "Transfer already initiated"
msgid "Withdraw submitted."
msgstr "Withdraw submitted."
+#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+msgid "Net Price Impact"
+msgstr "Net Price Impact"
+
#: src/components/Referrals/AddAffiliateCode.tsx
#: src/components/Referrals/AddAffiliateCode.tsx
msgid "Enter a code"
@@ -8014,6 +8022,7 @@ msgstr "Image generation error, please refresh and try again."
#: src/components/Synthetics/Claims/ClaimableCardUI.tsx
#: src/components/Synthetics/ExecutionPriceRow.tsx
+#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
msgid "Price Impact Rebates"
msgstr "Price Impact Rebates"
@@ -8345,6 +8354,10 @@ msgstr "Limit - Long Inc."
msgid "<0>Delegate your undelegated {0} GMX DAO0>voting power before claiming."
msgstr "<0>Delegate your undelegated {0} GMX DAO0>voting power before claiming."
+#: src/components/Synthetics/PositionSeller/rows/PositionSellerPriceImpactFeesRow.tsx
+msgid "Net Price Impact / Fees"
+msgstr "Net Price Impact / Fees"
+
#: src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx
msgid "You will be long {indexSymbol} from your long position, as well as from your {collateralSymbol} collateral. The liquidation price is higher compared to using a stablecoin as collateral since the worth of the collateral will change with its price."
msgstr "You will be long {indexSymbol} from your long position, as well as from your {collateralSymbol} collateral. The liquidation price is higher compared to using a stablecoin as collateral since the worth of the collateral will change with its price."
diff --git a/src/locales/es/messages.po b/src/locales/es/messages.po
index 5629a3a556..f6186fcb5f 100644
--- a/src/locales/es/messages.po
+++ b/src/locales/es/messages.po
@@ -2234,6 +2234,10 @@ msgstr ""
msgid "Liquidity data not loaded"
msgstr "Datos de liquidez no cargados"
+#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+msgid "Price impact rebates for closing trades are claimable inder this claims tab. <0>Read more0>"
+msgstr ""
+
#: src/pages/Home/Home.tsx
msgid "Total Trading Volume"
msgstr "Volumen Total de Operaciones"
@@ -4528,6 +4532,10 @@ msgstr "Transferencia ya iniciada"
msgid "Withdraw submitted."
msgstr ""
+#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+msgid "Net Price Impact"
+msgstr ""
+
#: src/components/Referrals/AddAffiliateCode.tsx
#: src/components/Referrals/AddAffiliateCode.tsx
msgid "Enter a code"
@@ -8008,6 +8016,7 @@ msgstr "Error de generación de imagen, por favor actualice e intente de nuevo"
#: src/components/Synthetics/Claims/ClaimableCardUI.tsx
#: src/components/Synthetics/ExecutionPriceRow.tsx
+#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
msgid "Price Impact Rebates"
msgstr ""
@@ -8339,6 +8348,10 @@ msgstr ""
msgid "<0>Delegate your undelegated {0} GMX DAO0>voting power before claiming."
msgstr ""
+#: src/components/Synthetics/PositionSeller/rows/PositionSellerPriceImpactFeesRow.tsx
+msgid "Net Price Impact / Fees"
+msgstr ""
+
#: src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx
msgid "You will be long {indexSymbol} from your long position, as well as from your {collateralSymbol} collateral. The liquidation price is higher compared to using a stablecoin as collateral since the worth of the collateral will change with its price."
msgstr ""
diff --git a/src/locales/fr/messages.po b/src/locales/fr/messages.po
index eecdf4d033..12a7d9c0f3 100644
--- a/src/locales/fr/messages.po
+++ b/src/locales/fr/messages.po
@@ -2234,6 +2234,10 @@ msgstr ""
msgid "Liquidity data not loaded"
msgstr "Les données de liquidité ne sont pas chargées"
+#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+msgid "Price impact rebates for closing trades are claimable inder this claims tab. <0>Read more0>"
+msgstr ""
+
#: src/pages/Home/Home.tsx
msgid "Total Trading Volume"
msgstr "Volume total des échanges"
@@ -4528,6 +4532,10 @@ msgstr "Transfert déjà initié"
msgid "Withdraw submitted."
msgstr ""
+#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+msgid "Net Price Impact"
+msgstr ""
+
#: src/components/Referrals/AddAffiliateCode.tsx
#: src/components/Referrals/AddAffiliateCode.tsx
msgid "Enter a code"
@@ -8008,6 +8016,7 @@ msgstr "Erreur de génération d'image, veuillez rafraîchir et réessayer."
#: src/components/Synthetics/Claims/ClaimableCardUI.tsx
#: src/components/Synthetics/ExecutionPriceRow.tsx
+#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
msgid "Price Impact Rebates"
msgstr ""
@@ -8339,6 +8348,10 @@ msgstr ""
msgid "<0>Delegate your undelegated {0} GMX DAO0>voting power before claiming."
msgstr ""
+#: src/components/Synthetics/PositionSeller/rows/PositionSellerPriceImpactFeesRow.tsx
+msgid "Net Price Impact / Fees"
+msgstr ""
+
#: src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx
msgid "You will be long {indexSymbol} from your long position, as well as from your {collateralSymbol} collateral. The liquidation price is higher compared to using a stablecoin as collateral since the worth of the collateral will change with its price."
msgstr ""
diff --git a/src/locales/ja/messages.po b/src/locales/ja/messages.po
index 6ed2b8ce91..0c6bb3488c 100644
--- a/src/locales/ja/messages.po
+++ b/src/locales/ja/messages.po
@@ -2234,6 +2234,10 @@ msgstr ""
msgid "Liquidity data not loaded"
msgstr "流動性データがロードされていません"
+#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+msgid "Price impact rebates for closing trades are claimable inder this claims tab. <0>Read more0>"
+msgstr ""
+
#: src/pages/Home/Home.tsx
msgid "Total Trading Volume"
msgstr "トレード総額"
@@ -4528,6 +4532,10 @@ msgstr "移転はすでに開始されています"
msgid "Withdraw submitted."
msgstr ""
+#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+msgid "Net Price Impact"
+msgstr ""
+
#: src/components/Referrals/AddAffiliateCode.tsx
#: src/components/Referrals/AddAffiliateCode.tsx
msgid "Enter a code"
@@ -8008,6 +8016,7 @@ msgstr "画像生成エラーにつき、ページを更新して再度試して
#: src/components/Synthetics/Claims/ClaimableCardUI.tsx
#: src/components/Synthetics/ExecutionPriceRow.tsx
+#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
msgid "Price Impact Rebates"
msgstr ""
@@ -8339,6 +8348,10 @@ msgstr ""
msgid "<0>Delegate your undelegated {0} GMX DAO0>voting power before claiming."
msgstr ""
+#: src/components/Synthetics/PositionSeller/rows/PositionSellerPriceImpactFeesRow.tsx
+msgid "Net Price Impact / Fees"
+msgstr ""
+
#: src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx
msgid "You will be long {indexSymbol} from your long position, as well as from your {collateralSymbol} collateral. The liquidation price is higher compared to using a stablecoin as collateral since the worth of the collateral will change with its price."
msgstr ""
diff --git a/src/locales/ko/messages.po b/src/locales/ko/messages.po
index 80394287ab..d1c155f8df 100644
--- a/src/locales/ko/messages.po
+++ b/src/locales/ko/messages.po
@@ -2234,6 +2234,10 @@ msgstr ""
msgid "Liquidity data not loaded"
msgstr "유동성 데이터를 불러오지 못하였습니다."
+#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+msgid "Price impact rebates for closing trades are claimable inder this claims tab. <0>Read more0>"
+msgstr ""
+
#: src/pages/Home/Home.tsx
msgid "Total Trading Volume"
msgstr "총 트레이딩 거래량"
@@ -4528,6 +4532,10 @@ msgstr "이전이 이미 시작됐습니다"
msgid "Withdraw submitted."
msgstr ""
+#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+msgid "Net Price Impact"
+msgstr ""
+
#: src/components/Referrals/AddAffiliateCode.tsx
#: src/components/Referrals/AddAffiliateCode.tsx
msgid "Enter a code"
@@ -8008,6 +8016,7 @@ msgstr "이미지 생성 에러. 새로고침 후 다시 시도해주세요."
#: src/components/Synthetics/Claims/ClaimableCardUI.tsx
#: src/components/Synthetics/ExecutionPriceRow.tsx
+#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
msgid "Price Impact Rebates"
msgstr ""
@@ -8339,6 +8348,10 @@ msgstr ""
msgid "<0>Delegate your undelegated {0} GMX DAO0>voting power before claiming."
msgstr ""
+#: src/components/Synthetics/PositionSeller/rows/PositionSellerPriceImpactFeesRow.tsx
+msgid "Net Price Impact / Fees"
+msgstr ""
+
#: src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx
msgid "You will be long {indexSymbol} from your long position, as well as from your {collateralSymbol} collateral. The liquidation price is higher compared to using a stablecoin as collateral since the worth of the collateral will change with its price."
msgstr ""
diff --git a/src/locales/pseudo/messages.po b/src/locales/pseudo/messages.po
index e506c92ab0..8589a11862 100644
--- a/src/locales/pseudo/messages.po
+++ b/src/locales/pseudo/messages.po
@@ -2234,6 +2234,10 @@ msgstr ""
msgid "Liquidity data not loaded"
msgstr ""
+#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+msgid "Price impact rebates for closing trades are claimable inder this claims tab. <0>Read more0>"
+msgstr ""
+
#: src/pages/Home/Home.tsx
msgid "Total Trading Volume"
msgstr ""
@@ -4528,6 +4532,10 @@ msgstr ""
msgid "Withdraw submitted."
msgstr ""
+#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+msgid "Net Price Impact"
+msgstr ""
+
#: src/components/Referrals/AddAffiliateCode.tsx
#: src/components/Referrals/AddAffiliateCode.tsx
msgid "Enter a code"
@@ -8008,6 +8016,7 @@ msgstr ""
#: src/components/Synthetics/Claims/ClaimableCardUI.tsx
#: src/components/Synthetics/ExecutionPriceRow.tsx
+#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
msgid "Price Impact Rebates"
msgstr ""
@@ -8339,6 +8348,10 @@ msgstr ""
msgid "<0>Delegate your undelegated {0} GMX DAO0>voting power before claiming."
msgstr ""
+#: src/components/Synthetics/PositionSeller/rows/PositionSellerPriceImpactFeesRow.tsx
+msgid "Net Price Impact / Fees"
+msgstr ""
+
#: src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx
msgid "You will be long {indexSymbol} from your long position, as well as from your {collateralSymbol} collateral. The liquidation price is higher compared to using a stablecoin as collateral since the worth of the collateral will change with its price."
msgstr ""
diff --git a/src/locales/ru/messages.po b/src/locales/ru/messages.po
index 6e243a17c4..a197e88484 100644
--- a/src/locales/ru/messages.po
+++ b/src/locales/ru/messages.po
@@ -2234,6 +2234,10 @@ msgstr ""
msgid "Liquidity data not loaded"
msgstr "Данные о ликвидности не загружены"
+#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+msgid "Price impact rebates for closing trades are claimable inder this claims tab. <0>Read more0>"
+msgstr ""
+
#: src/pages/Home/Home.tsx
msgid "Total Trading Volume"
msgstr "Общий Объем Торгов"
@@ -4528,6 +4532,10 @@ msgstr "Перевод уже начат"
msgid "Withdraw submitted."
msgstr ""
+#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+msgid "Net Price Impact"
+msgstr ""
+
#: src/components/Referrals/AddAffiliateCode.tsx
#: src/components/Referrals/AddAffiliateCode.tsx
msgid "Enter a code"
@@ -8008,6 +8016,7 @@ msgstr "Ошибка генерации изображения, пожалуйс
#: src/components/Synthetics/Claims/ClaimableCardUI.tsx
#: src/components/Synthetics/ExecutionPriceRow.tsx
+#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
msgid "Price Impact Rebates"
msgstr ""
@@ -8339,6 +8348,10 @@ msgstr ""
msgid "<0>Delegate your undelegated {0} GMX DAO0>voting power before claiming."
msgstr ""
+#: src/components/Synthetics/PositionSeller/rows/PositionSellerPriceImpactFeesRow.tsx
+msgid "Net Price Impact / Fees"
+msgstr ""
+
#: src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx
msgid "You will be long {indexSymbol} from your long position, as well as from your {collateralSymbol} collateral. The liquidation price is higher compared to using a stablecoin as collateral since the worth of the collateral will change with its price."
msgstr ""
diff --git a/src/locales/zh/messages.po b/src/locales/zh/messages.po
index de9e3c8f90..b20cd48e84 100644
--- a/src/locales/zh/messages.po
+++ b/src/locales/zh/messages.po
@@ -2234,6 +2234,10 @@ msgstr ""
msgid "Liquidity data not loaded"
msgstr "未加载流动资金数据"
+#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+msgid "Price impact rebates for closing trades are claimable inder this claims tab. <0>Read more0>"
+msgstr ""
+
#: src/pages/Home/Home.tsx
msgid "Total Trading Volume"
msgstr "总交易量"
@@ -4528,6 +4532,10 @@ msgstr "已启动转移"
msgid "Withdraw submitted."
msgstr ""
+#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+msgid "Net Price Impact"
+msgstr ""
+
#: src/components/Referrals/AddAffiliateCode.tsx
#: src/components/Referrals/AddAffiliateCode.tsx
msgid "Enter a code"
@@ -8008,6 +8016,7 @@ msgstr "图片生成错误,请刷新并重试"
#: src/components/Synthetics/Claims/ClaimableCardUI.tsx
#: src/components/Synthetics/ExecutionPriceRow.tsx
+#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
msgid "Price Impact Rebates"
msgstr ""
@@ -8339,6 +8348,10 @@ msgstr ""
msgid "<0>Delegate your undelegated {0} GMX DAO0>voting power before claiming."
msgstr ""
+#: src/components/Synthetics/PositionSeller/rows/PositionSellerPriceImpactFeesRow.tsx
+msgid "Net Price Impact / Fees"
+msgstr ""
+
#: src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx
msgid "You will be long {indexSymbol} from your long position, as well as from your {collateralSymbol} collateral. The liquidation price is higher compared to using a stablecoin as collateral since the worth of the collateral will change with its price."
msgstr ""
From 657afaa5f3370029b4581168976b4e3b4c40339f Mon Sep 17 00:00:00 2001
From: Divhead <110596516+divhead@users.noreply.github.com>
Date: Wed, 16 Jul 2025 07:28:09 -0700
Subject: [PATCH 03/55] v2.2 price impact
---
sdk/src/modules/markets/index.ts | 11 +-
sdk/src/modules/markets/query-builders.ts | 16 +-
sdk/src/modules/markets/types.ts | 16 +-
sdk/src/modules/orders/helpers.spec.ts | 2 +-
sdk/src/modules/orders/helpers.ts | 2 +-
sdk/src/modules/positions/positions.ts | 49 +-
sdk/src/prebuilt/hashedMarketConfigKeys.json | 1024 ++++++++---------
sdk/src/test/mock.ts | 8 +-
sdk/src/types/markets.ts | 8 +-
sdk/src/types/positions.ts | 2 +
sdk/src/utils/__tests__/positions.spec.ts | 9 +-
sdk/src/utils/fees/index.ts | 14 +-
sdk/src/utils/fees/priceImpact.ts | 86 +-
sdk/src/utils/marketKeysAndConfigs.ts | 8 +-
sdk/src/utils/positions.ts | 87 +-
sdk/src/utils/prices.ts | 20 +-
sdk/src/utils/swap/swapStats.ts | 9 +-
.../utils/trade/{amounts.ts => increase.ts} | 34 +-
src/components/DepthChart/DepthChart.tsx | 29 +-
.../hooks/usePositionEditorData.tsx | 3 +-
.../Synthetics/PositionItem/PositionItem.tsx | 22 +-
.../rows/PositionSellerPriceImpactFeesRow.tsx | 21 +-
.../TradeHistory/TradeHistoryRow/mocks.ts | 112 +-
.../selectors/leaderboardSelectors.ts | 4 +-
.../selectTradeboxAvailableMarketsOptions.ts | 2 +-
.../selectTradeboxRelatedMarketsStats.ts | 2 +-
.../selectTradeboxSidecarOrders.ts | 3 +
.../__tests__/trade/decrease.spec.ts | 10 +-
.../buildMarketsConfigsRequest.ts | 16 +-
.../markets/useMarketsInfoRequest/index.ts | 11 +-
.../useFastMarketsInfoRequest.ts | 8 +-
src/domain/synthetics/markets/utils.ts | 2 +-
.../synthetics/positions/usePositionsInfo.ts | 39 +-
src/domain/synthetics/positions/utils.ts | 161 +--
src/domain/synthetics/testUtils/mocks.ts | 2 +
.../synthetics/trade/utils/decrease.spec.ts | 10 +-
src/domain/synthetics/trade/utils/decrease.ts | 60 +-
src/domain/synthetics/trade/utils/deposit.ts | 12 +-
src/domain/synthetics/trade/utils/increase.ts | 3 +-
.../synthetics/trade/utils/withdrawal.ts | 6 +-
src/locales/de/messages.po | 18 +-
src/locales/en/messages.po | 18 +-
src/locales/es/messages.po | 18 +-
src/locales/fr/messages.po | 18 +-
src/locales/ja/messages.po | 18 +-
src/locales/ko/messages.po | 18 +-
src/locales/pseudo/messages.po | 18 +-
src/locales/ru/messages.po | 18 +-
src/locales/zh/messages.po | 18 +-
.../components/LeaderboardPositionsTable.tsx | 1 +
src/pages/SyntheticsStats/SyntheticsStats.tsx | 10 +-
51 files changed, 1124 insertions(+), 992 deletions(-)
rename sdk/src/utils/trade/{amounts.ts => increase.ts} (94%)
diff --git a/sdk/src/modules/markets/index.ts b/sdk/src/modules/markets/index.ts
index e480fb9efb..a55d949556 100644
--- a/sdk/src/modules/markets/index.ts
+++ b/sdk/src/modules/markets/index.ts
@@ -250,8 +250,10 @@ export class Markets extends Module {
minCollateralFactorForLiquidation: dataStoreValues.minCollateralFactorForLiquidation.returnValues[0],
- positionFeeFactorForPositiveImpact: dataStoreValues.positionFeeFactorForPositiveImpact.returnValues[0],
- positionFeeFactorForNegativeImpact: dataStoreValues.positionFeeFactorForNegativeImpact.returnValues[0],
+ positionFeeFactorForBalanceWasImproved:
+ dataStoreValues.positionFeeFactorForBalanceWasImproved.returnValues[0],
+ positionFeeFactorForBalanceWasNotImproved:
+ dataStoreValues.positionFeeFactorForBalanceWasNotImproved.returnValues[0],
positionImpactFactorPositive: dataStoreValues.positionImpactFactorPositive.returnValues[0],
positionImpactFactorNegative: dataStoreValues.positionImpactFactorNegative.returnValues[0],
maxPositionImpactFactorPositive: dataStoreValues.maxPositionImpactFactorPositive.returnValues[0],
@@ -259,8 +261,9 @@ export class Markets extends Module {
maxPositionImpactFactorForLiquidations:
dataStoreValues.maxPositionImpactFactorForLiquidations.returnValues[0],
positionImpactExponentFactor: dataStoreValues.positionImpactExponentFactor.returnValues[0],
- swapFeeFactorForPositiveImpact: dataStoreValues.swapFeeFactorForPositiveImpact.returnValues[0],
- swapFeeFactorForNegativeImpact: dataStoreValues.swapFeeFactorForNegativeImpact.returnValues[0],
+ swapFeeFactorForBalanceWasImproved: dataStoreValues.swapFeeFactorForBalanceWasImproved.returnValues[0],
+ swapFeeFactorForBalanceWasNotImproved:
+ dataStoreValues.swapFeeFactorForBalanceWasNotImproved.returnValues[0],
swapImpactFactorPositive: dataStoreValues.swapImpactFactorPositive.returnValues[0],
atomicSwapFeeFactor: dataStoreValues.atomicSwapFeeFactor.returnValues[0],
swapImpactFactorNegative: dataStoreValues.swapImpactFactorNegative.returnValues[0],
diff --git a/sdk/src/modules/markets/query-builders.ts b/sdk/src/modules/markets/query-builders.ts
index 0063b5270f..66cb0b0783 100644
--- a/sdk/src/modules/markets/query-builders.ts
+++ b/sdk/src/modules/markets/query-builders.ts
@@ -375,13 +375,13 @@ export async function buildMarketsConfigsRequest(
methodName: "getUint",
params: [prebuiltHashedKeys.maxPnlFactorForTradersShort],
},
- positionFeeFactorForPositiveImpact: {
+ positionFeeFactorForBalanceWasImproved: {
methodName: "getUint",
- params: [prebuiltHashedKeys.positionFeeFactorForPositiveImpact],
+ params: [prebuiltHashedKeys.positionFeeFactorForBalanceWasImproved],
},
- positionFeeFactorForNegativeImpact: {
+ positionFeeFactorForBalanceWasNotImproved: {
methodName: "getUint",
- params: [prebuiltHashedKeys.positionFeeFactorForNegativeImpact],
+ params: [prebuiltHashedKeys.positionFeeFactorForBalanceWasNotImproved],
},
positionImpactFactorPositive: {
methodName: "getUint",
@@ -423,13 +423,13 @@ export async function buildMarketsConfigsRequest(
methodName: "getUint",
params: [prebuiltHashedKeys.positionImpactExponentFactor],
},
- swapFeeFactorForPositiveImpact: {
+ swapFeeFactorForBalanceWasImproved: {
methodName: "getUint",
- params: [prebuiltHashedKeys.swapFeeFactorForPositiveImpact],
+ params: [prebuiltHashedKeys.swapFeeFactorForBalanceWasImproved],
},
- swapFeeFactorForNegativeImpact: {
+ swapFeeFactorForBalanceWasNotImproved: {
methodName: "getUint",
- params: [prebuiltHashedKeys.swapFeeFactorForNegativeImpact],
+ params: [prebuiltHashedKeys.swapFeeFactorForBalanceWasNotImproved],
},
atomicSwapFeeFactor: {
methodName: "getUint",
diff --git a/sdk/src/modules/markets/types.ts b/sdk/src/modules/markets/types.ts
index 643ba172b6..016138b107 100644
--- a/sdk/src/modules/markets/types.ts
+++ b/sdk/src/modules/markets/types.ts
@@ -78,16 +78,16 @@ export type MarketConfig = Pick<
| "minCollateralFactorForLiquidation"
| "minCollateralFactorForOpenInterestLong"
| "minCollateralFactorForOpenInterestShort"
- | "positionFeeFactorForPositiveImpact"
- | "positionFeeFactorForNegativeImpact"
+ | "positionFeeFactorForBalanceWasImproved"
+ | "positionFeeFactorForBalanceWasNotImproved"
| "positionImpactFactorPositive"
| "positionImpactFactorNegative"
| "maxPositionImpactFactorPositive"
| "maxPositionImpactFactorNegative"
| "maxPositionImpactFactorForLiquidations"
| "positionImpactExponentFactor"
- | "swapFeeFactorForPositiveImpact"
- | "swapFeeFactorForNegativeImpact"
+ | "swapFeeFactorForBalanceWasImproved"
+ | "swapFeeFactorForBalanceWasNotImproved"
| "swapImpactFactorPositive"
| "swapImpactFactorNegative"
| "swapImpactExponentFactor"
@@ -162,8 +162,8 @@ export type MarketConfigMulticallRequestConfig = MulticallRequestConfig<{
| "maxFundingFactorPerSecond"
| "maxPnlFactorForTradersLong"
| "maxPnlFactorForTradersShort"
- | "positionFeeFactorForPositiveImpact"
- | "positionFeeFactorForNegativeImpact"
+ | "positionFeeFactorForBalanceWasImproved"
+ | "positionFeeFactorForBalanceWasNotImproved"
| "positionImpactFactorPositive"
| "positionImpactFactorNegative"
| "maxPositionImpactFactorPositive"
@@ -174,8 +174,8 @@ export type MarketConfigMulticallRequestConfig = MulticallRequestConfig<{
| "minCollateralFactorForOpenInterestLong"
| "minCollateralFactorForOpenInterestShort"
| "positionImpactExponentFactor"
- | "swapFeeFactorForPositiveImpact"
- | "swapFeeFactorForNegativeImpact"
+ | "swapFeeFactorForBalanceWasImproved"
+ | "swapFeeFactorForBalanceWasNotImproved"
| "atomicSwapFeeFactor"
| "swapImpactFactorPositive"
| "swapImpactFactorNegative"
diff --git a/sdk/src/modules/orders/helpers.spec.ts b/sdk/src/modules/orders/helpers.spec.ts
index 6e8f45a082..da9519009e 100644
--- a/sdk/src/modules/orders/helpers.spec.ts
+++ b/sdk/src/modules/orders/helpers.spec.ts
@@ -6,7 +6,7 @@ import { TokenData, TokensData } from "types/tokens";
import { getByKey } from "utils/objects";
import * as swapPath from "utils/swap/swapPath";
import { arbitrumSdk } from "utils/testUtil";
-import * as tradeAmounts from "utils/trade/amounts";
+import * as tradeAmounts from "utils/trade/increase";
describe.skip("increaseOrderHelper", () => {
let marketsInfoData: MarketsInfoData;
diff --git a/sdk/src/modules/orders/helpers.ts b/sdk/src/modules/orders/helpers.ts
index 4cd97ee0df..d2bd4ec0e8 100644
--- a/sdk/src/modules/orders/helpers.ts
+++ b/sdk/src/modules/orders/helpers.ts
@@ -7,7 +7,7 @@ import { getByKey } from "utils/objects";
import { getSwapAmountsByFromValue, getSwapAmountsByToValue } from "utils/swap";
import { createFindSwapPath } from "utils/swap/swapPath";
import { convertToUsd, getIsUnwrap, getIsWrap, getTokensRatioByPrice } from "utils/tokens";
-import { getIncreasePositionAmounts } from "utils/trade/amounts";
+import { getIncreasePositionAmounts } from "utils/trade/increase";
import type { GmxSdk } from "../..";
diff --git a/sdk/src/modules/positions/positions.ts b/sdk/src/modules/positions/positions.ts
index 9f0588d16d..849f5a3ae3 100644
--- a/sdk/src/modules/positions/positions.ts
+++ b/sdk/src/modules/positions/positions.ts
@@ -13,7 +13,7 @@ import { OrderInfo } from "types/orders";
import { Position, PositionsData, PositionsInfoData } from "types/positions";
import { UserReferralInfo } from "types/referrals";
import { TokensData } from "types/tokens";
-import { getPositionFee, getPriceImpactForPosition } from "utils/fees";
+import { getPositionFee } from "utils/fees";
import {
getContractMarketPrices,
getMarketIndexName,
@@ -27,12 +27,13 @@ import {
getEntryPrice,
getLeverage,
getLiquidationPrice,
+ getNetPriceImpactDeltaUsdForDecrease,
getPositionKey,
getPositionNetValue,
+ getPositionPendingFeesUsd,
getPositionPnlUsd,
} from "utils/positions";
-import { getPositionPendingFeesUsd } from "utils/positions";
-import { getMarkPrice } from "utils/prices";
+import { getAcceptablePriceInfo, getMarkPrice } from "utils/prices";
import { decodeReferralCode } from "utils/referrals";
import { convertToTokenAmount, convertToUsd } from "utils/tokens";
@@ -544,17 +545,20 @@ export class Positions extends Module {
pendingFundingFeesUsd,
});
- const closingPriceImpactDeltaUsd = getPriceImpactForPosition(
- marketInfo,
- position.sizeInUsd * -1n,
- position.isLong,
- { fallbackToZero: true }
- );
+ const closeAcceptablePriceInfo = marketInfo
+ ? getAcceptablePriceInfo({
+ marketInfo,
+ isIncrease: false,
+ isLong: position.isLong,
+ indexPrice: getMarkPrice({ prices: indexToken.prices, isLong: position.isLong, isIncrease: false }),
+ sizeDeltaUsd: position.sizeInUsd,
+ })
+ : undefined;
const positionFeeInfo = getPositionFee(
marketInfo,
position.sizeInUsd,
- closingPriceImpactDeltaUsd > 0,
+ closeAcceptablePriceInfo?.balanceWasImproved ?? false,
userReferralInfo,
uiFeeFactor
);
@@ -583,6 +587,17 @@ export class Positions extends Module {
const pnlPercentage =
collateralUsd !== undefined && collateralUsd != 0n ? getBasisPoints(pnl, collateralUsd) : 0n;
+ const netPriceImapctValues =
+ marketInfo && closeAcceptablePriceInfo
+ ? getNetPriceImpactDeltaUsdForDecrease({
+ marketInfo,
+ sizeInUsd: position.sizeInUsd,
+ pendingImpactAmount: position.pendingImpactAmount,
+ sizeDeltaUsd: position.sizeInUsd,
+ priceImpactDeltaUsd: closeAcceptablePriceInfo.priceImpactDeltaUsd,
+ })
+ : undefined;
+
const netValue = getPositionNetValue({
collateralUsd: collateralUsd,
pnl,
@@ -590,9 +605,18 @@ export class Positions extends Module {
pendingFundingFeesUsd: pendingFundingFeesUsd,
closingFeeUsd,
uiFeeUsd,
+ totalPendingImpactDeltaUsd: netPriceImapctValues?.totalImpactDeltaUsd ?? 0n,
+ priceImpactDiffUsd: netPriceImapctValues?.priceImpactDiffUsd ?? 0n,
});
- const pnlAfterFees = pnl - totalPendingFeesUsd - closingFeeUsd - uiFeeUsd;
+ const pnlAfterFees =
+ pnl -
+ totalPendingFeesUsd -
+ closingFeeUsd -
+ uiFeeUsd -
+ (netPriceImapctValues?.totalImpactDeltaUsd ?? 0n) +
+ (netPriceImapctValues?.priceImpactDiffUsd ?? 0n);
+
const pnlAfterFeesPercentage =
collateralUsd != 0n ? getBasisPoints(pnlAfterFees, collateralUsd + closingFeeUsd) : 0n;
@@ -623,6 +647,7 @@ export class Positions extends Module {
sizeInTokens: position.sizeInTokens,
collateralUsd,
collateralAmount: position.collateralAmount,
+ pendingImpactAmount: position.pendingImpactAmount,
userReferralInfo,
minCollateralUsd,
pendingBorrowingFeesUsd: position.pendingBorrowingFeesUsd,
@@ -658,6 +683,8 @@ export class Positions extends Module {
pnlAfterFees,
pnlAfterFeesPercentage,
netValue,
+ netPriceImapctDeltaUsd: netPriceImapctValues?.totalImpactDeltaUsd ?? 0n,
+ priceImpactDiffUsd: netPriceImapctValues?.priceImpactDiffUsd ?? 0n,
closingFeeUsd,
uiFeeUsd,
pendingFundingFeesUsd,
diff --git a/sdk/src/prebuilt/hashedMarketConfigKeys.json b/sdk/src/prebuilt/hashedMarketConfigKeys.json
index a48e16c3bb..2481d05e4e 100644
--- a/sdk/src/prebuilt/hashedMarketConfigKeys.json
+++ b/sdk/src/prebuilt/hashedMarketConfigKeys.json
@@ -30,8 +30,8 @@
"maxFundingFactorPerSecond": "0x4f7dc082dba2aa22249007c05bb4928623521833aa4d2993e150a90fbfa114e3",
"maxPnlFactorForTradersLong": "0xaa8e9afe1a8ae000f057254aec33b0b038be8079bfcb184ea356dc917326331a",
"maxPnlFactorForTradersShort": "0xfa31ea001f0ed9b3fa3d2f1deea9bf79493c211600b8f203f50dd95591e516da",
- "positionFeeFactorForPositiveImpact": "0x4b9bdba3ff745320751079b586d3c4f84cf87f7c3e79e39f1158b174c405cf67",
- "positionFeeFactorForNegativeImpact": "0xdd207fe702bdff93bb945786cd5d98c3259d3dbd7cf37c63c161714e938ba434",
+ "positionFeeFactorForBalanceWasImproved": "0x4b9bdba3ff745320751079b586d3c4f84cf87f7c3e79e39f1158b174c405cf67",
+ "positionFeeFactorForBalanceWasNotImproved": "0xdd207fe702bdff93bb945786cd5d98c3259d3dbd7cf37c63c161714e938ba434",
"positionImpactFactorPositive": "0x57f9be924ba0f2c763e255396dd8fdd27b3ff06fcde5fee6018b4ed0292eae0a",
"positionImpactFactorNegative": "0x3b778e8ac16a3dc330bcceed5db97c4b853b0a696209858f5dd19591a1b3566e",
"maxPositionImpactFactorPositive": "0x825201d62a913028fa553544c19e6e9e45885502ad94b3e9ccb79e2911daf669",
@@ -42,8 +42,8 @@
"minCollateralFactorForOpenInterestLong": "0x18ab1bf4fdef11804a1212c94ba4ed35498ef5942b3d385fc9c33f933f17f60d",
"minCollateralFactorForOpenInterestShort": "0xf5cca0ad2e4b2341858ed82455e0d4e3e2dc289d93124403d67c010ca53b62de",
"positionImpactExponentFactor": "0xbe60fcfd99ab63b9f7c2a82da310aa88958ee0146cbc9ea008d8cc16a97ac70f",
- "swapFeeFactorForPositiveImpact": "0x695ec0e29327f505d4955e89ec25f98741aedf22d209dbc35e1d2d61e683877c",
- "swapFeeFactorForNegativeImpact": "0x6805e3bd65fab2c6cda687df591a5e9011a99df2ff0aa98287114c693ef8583e",
+ "swapFeeFactorForBalanceWasImproved": "0x695ec0e29327f505d4955e89ec25f98741aedf22d209dbc35e1d2d61e683877c",
+ "swapFeeFactorForBalanceWasNotImproved": "0x6805e3bd65fab2c6cda687df591a5e9011a99df2ff0aa98287114c693ef8583e",
"atomicSwapFeeFactor": "0xc125515896b48c72fad34d60a7735c27394bbfda809bac0461966a907a9dbabb",
"swapImpactFactorPositive": "0x79d8fe854154b43d003a20314c803b78ec01391248008659c0c8e998e866d7d7",
"swapImpactFactorNegative": "0xe8438cfb97aef79fdebd4e948dd086e7c042ae7b47a2414454f6b691ebcc2419",
@@ -82,8 +82,8 @@
"maxFundingFactorPerSecond": "0x424c5a83737ee1e6ae9a863e64a6772ad7d591da777c4774b2484370d927b97a",
"maxPnlFactorForTradersLong": "0x04e55b2a6b73d4cb774accdc2d7f0de0f4aa8a8ae6a084be73a43ca8f17f3586",
"maxPnlFactorForTradersShort": "0x02badce9cdb1639287015c8989426be5963e2b0c8a41abd9723284ebff7f2e9e",
- "positionFeeFactorForPositiveImpact": "0x914f66951bf2600e37ce4f2e2fd45983c6d842e40cda838267764e38fbad3594",
- "positionFeeFactorForNegativeImpact": "0xe1a9164e4ffd3e27713953d91592d29e5e51e16c1df48725a919fa8785b184af",
+ "positionFeeFactorForBalanceWasImproved": "0x914f66951bf2600e37ce4f2e2fd45983c6d842e40cda838267764e38fbad3594",
+ "positionFeeFactorForBalanceWasNotImproved": "0xe1a9164e4ffd3e27713953d91592d29e5e51e16c1df48725a919fa8785b184af",
"positionImpactFactorPositive": "0xb2d34408902891f7a1ffb5a66609a793e142ed6dffc6d7c0c8b9b9bc6d6dd380",
"positionImpactFactorNegative": "0x68cc8c831904230bbfe2ba8d3ee911509896dac5b48cc45c1323718a54fb4016",
"maxPositionImpactFactorPositive": "0xc230e1e4d328166be2c9c1e775203c706519bd3f17777d460f0bd159e2680920",
@@ -94,8 +94,8 @@
"minCollateralFactorForOpenInterestLong": "0xbcf38cdb77fa9cb02787c89b5b616dc4d91337a400795d617a2580ae49a6e209",
"minCollateralFactorForOpenInterestShort": "0x635ce4b3864fcc94a0eb30789ab0eedb1724ed4bb51ebad2fa2e9a2bc051f60a",
"positionImpactExponentFactor": "0xd3fb6cf1d6db9b533ada6f4f3e7f52adf7fa871788e67b80e7ae6e63811017e5",
- "swapFeeFactorForPositiveImpact": "0xd795542d99d4dc3faa6f4e4a11da9347d4f58fcfce910ccd9878f8fd79234324",
- "swapFeeFactorForNegativeImpact": "0x4a0e3a43fc8a8e48629f6d4e1c0c1ae7098a35d9834cd0c13446fc2b802a24a7",
+ "swapFeeFactorForBalanceWasImproved": "0xd795542d99d4dc3faa6f4e4a11da9347d4f58fcfce910ccd9878f8fd79234324",
+ "swapFeeFactorForBalanceWasNotImproved": "0x4a0e3a43fc8a8e48629f6d4e1c0c1ae7098a35d9834cd0c13446fc2b802a24a7",
"atomicSwapFeeFactor": "0xe9ea68981039e8c7bdda3234e3fc66eccc1b21bb30ec5c053662a442b6b38958",
"swapImpactFactorPositive": "0x801066104b68a8504d32a319a865f5010a763e0b3f4372e0b03f3fe87ab77eb7",
"swapImpactFactorNegative": "0x1a282191426197cc0dacd8fdca48acc252d354470638b44ca410893f9bc8d576",
@@ -134,8 +134,8 @@
"maxFundingFactorPerSecond": "0xf9eebd782b6379771362c4bac105681bfa6f503b704718bcad8352c0de19f688",
"maxPnlFactorForTradersLong": "0x4ad6b8b2ba952450663a8d5bf31ee14ed32607a478d6cd7294fe55a4a4ef90d2",
"maxPnlFactorForTradersShort": "0x6c1fad48bb23f5fbd6f258f605f43fb3ced23cc7af730b7a7b4e8f05687c6939",
- "positionFeeFactorForPositiveImpact": "0x0a91a7ca843ae3371debc48312c71f1ed0ae40a087d2626c6c43fd86002de08c",
- "positionFeeFactorForNegativeImpact": "0x8e901273173d5fd00df54a257dc627db643127f496f5e187609a3210ba484b27",
+ "positionFeeFactorForBalanceWasImproved": "0x0a91a7ca843ae3371debc48312c71f1ed0ae40a087d2626c6c43fd86002de08c",
+ "positionFeeFactorForBalanceWasNotImproved": "0x8e901273173d5fd00df54a257dc627db643127f496f5e187609a3210ba484b27",
"positionImpactFactorPositive": "0x0c641238e5258665a42ece9c3874c8c5e0d627522aaf8c60cf0bbc5e64c5c5d8",
"positionImpactFactorNegative": "0xc4bfa605ffb9f50e0f18e0399ccdac8f6fe971a739a91a6a726517653177e0e7",
"maxPositionImpactFactorPositive": "0xef102c726b741df58e10ba28b7f783ebaa6c2076f27b615f9d21a4edfba791c1",
@@ -146,8 +146,8 @@
"minCollateralFactorForOpenInterestLong": "0x47ece80b5a8441270dc51b704ac241ee205157d6e79a17ec9a7a78d5a1c405cc",
"minCollateralFactorForOpenInterestShort": "0x3ac33ae245dfa87c5023e2ada76a30d63b5d4a462868f2df4cf285c450c055bb",
"positionImpactExponentFactor": "0x8185adf991484ed9941b9d357c45b4aaa04298bf56481c3ac20410b14c6e0426",
- "swapFeeFactorForPositiveImpact": "0x67a550e4fa661b4a6f6f7a4f2f276a0dac54970e784fe703031ee403f04b4665",
- "swapFeeFactorForNegativeImpact": "0x5f0f923b62e09d2ebb7df2b4b505d5eb8843b57816cb1fc36090965cfa939bfd",
+ "swapFeeFactorForBalanceWasImproved": "0x67a550e4fa661b4a6f6f7a4f2f276a0dac54970e784fe703031ee403f04b4665",
+ "swapFeeFactorForBalanceWasNotImproved": "0x5f0f923b62e09d2ebb7df2b4b505d5eb8843b57816cb1fc36090965cfa939bfd",
"atomicSwapFeeFactor": "0x10d37a7e8e1567aad34f48c74ecd3ed0100bc2bb6f7248f5bbd6a3be6c10fe2d",
"swapImpactFactorPositive": "0x0538cdd47f4c430b1fcb396d2d4b81d55cc0fb604620d2cc1d1092d9a3d13b4a",
"swapImpactFactorNegative": "0x7eb5c1dc27cc686df401fe1cc4a36537b363bfaa4d94f77d6fe72fd5ede61d08",
@@ -186,8 +186,8 @@
"maxFundingFactorPerSecond": "0xd84ef4cc15df47ff3afd13c9d28e9a859dbabf200c94bcd0206c29b95f24e436",
"maxPnlFactorForTradersLong": "0x72419a34e63cbfb23ab394e4439234ac97ea134e828df7be5bfb5df3ec881fb4",
"maxPnlFactorForTradersShort": "0xa6300cb5902ed56008bca5c8649dc25ae7b7f119a00b42fa383e2d76f5ae5cb1",
- "positionFeeFactorForPositiveImpact": "0xc2e64a5a0c61ef9bb36e3f5d49f7ae23191b915b9b453689a7abd06820fb9b6a",
- "positionFeeFactorForNegativeImpact": "0xa6be8c7c302085742a3296b00ad87b973361d8a174bb7d30ffbf88e4c6f4d8cf",
+ "positionFeeFactorForBalanceWasImproved": "0xc2e64a5a0c61ef9bb36e3f5d49f7ae23191b915b9b453689a7abd06820fb9b6a",
+ "positionFeeFactorForBalanceWasNotImproved": "0xa6be8c7c302085742a3296b00ad87b973361d8a174bb7d30ffbf88e4c6f4d8cf",
"positionImpactFactorPositive": "0x04bcbebc64b09778830c1b12d8c1b2d32504c94d71d5f64f2d547d6fe1ed4ff0",
"positionImpactFactorNegative": "0x0c00767fffed8b00ff6d17106121d436ec02b7ff6c01968d8aecb9d29972e75a",
"maxPositionImpactFactorPositive": "0x10951da02818a2ad689fc04ff3ca1935a2bd85a7023d53189f9f2526c1ad19df",
@@ -198,8 +198,8 @@
"minCollateralFactorForOpenInterestLong": "0x3c2241385fd888324a03ea03eb3606df19e300ae2c3cf2dcafbe2d235a04b676",
"minCollateralFactorForOpenInterestShort": "0xeca78003c8f185c46542ba76034dd77edf8c1cee1a710cc59fde908d5b92f309",
"positionImpactExponentFactor": "0xf1f5a97e4945291c333c8857cc08ec673be5b6c9cde98be1ad86931599685acc",
- "swapFeeFactorForPositiveImpact": "0x6a1d8e63575704359c436b79657db011d72a92f67f1bd5e14afb57e9a2912498",
- "swapFeeFactorForNegativeImpact": "0xaf4fad6d380803699ec362dd04941db2d6c038f504ad922664c8f9d1a4ef7160",
+ "swapFeeFactorForBalanceWasImproved": "0x6a1d8e63575704359c436b79657db011d72a92f67f1bd5e14afb57e9a2912498",
+ "swapFeeFactorForBalanceWasNotImproved": "0xaf4fad6d380803699ec362dd04941db2d6c038f504ad922664c8f9d1a4ef7160",
"atomicSwapFeeFactor": "0x25494613773e872f0f6580192c653bd12541ec9658a7c4afbc1ff86518cc6ef1",
"swapImpactFactorPositive": "0x5d50cff84fe2d5abc20ecbe3156a438d1b3479175f4748dae1d121887ed30eec",
"swapImpactFactorNegative": "0xb9cc0f62898c08c383e014640b673a6cecc479fa1080544ea3250f029f3c304c",
@@ -238,8 +238,8 @@
"maxFundingFactorPerSecond": "0xb67c5c79dea1409495a4296882f29f55711c3613b3962c49406e76fb41cb3bd2",
"maxPnlFactorForTradersLong": "0xa5a61d7f4a7f07641ab50335ad1305741802139fe956021e15cc7d9bc7be8d7f",
"maxPnlFactorForTradersShort": "0xd493bce0cc5d3d5c297296e7eabc2585c31272109c39bbb39cabbfbe0030600d",
- "positionFeeFactorForPositiveImpact": "0xff452922f847142c79ed67c6b9f0f1f57d703384dacf714a43ea097072f341c1",
- "positionFeeFactorForNegativeImpact": "0x7e7eac91fdbffd192d12b66d7d34f83b12ca2709d7f6cea208e64c3b7905560a",
+ "positionFeeFactorForBalanceWasImproved": "0xff452922f847142c79ed67c6b9f0f1f57d703384dacf714a43ea097072f341c1",
+ "positionFeeFactorForBalanceWasNotImproved": "0x7e7eac91fdbffd192d12b66d7d34f83b12ca2709d7f6cea208e64c3b7905560a",
"positionImpactFactorPositive": "0x04a7dc43056b287535c2fddccef2e0b361e2fc841de23ce8e630db13d4e3cabe",
"positionImpactFactorNegative": "0xd1fa1ed0858635234f05b957d0f102dcdcff2d59307f5b378d07c404c515be22",
"maxPositionImpactFactorPositive": "0x35e161be38af516eabcc7215e158450e46aa9123dfd22a127a3a22717f68e412",
@@ -250,8 +250,8 @@
"minCollateralFactorForOpenInterestLong": "0x7f97bdae1ee1c0424ccd6dc21526e5ef1e0cb581856d3c0b3279c518b2b140f6",
"minCollateralFactorForOpenInterestShort": "0xa370583d9939495b60095d94f3906c9b15ba4e7a3d7422210d6f541c426d4010",
"positionImpactExponentFactor": "0xe33c49e3c7a970aa64a71f22c589f0436ff537390a61d71088600b2f1fe24fb6",
- "swapFeeFactorForPositiveImpact": "0x1dbf6ea5c40ddb4981c0c991291ebcfe9ca18da36b55476f46c07db6f9d4d796",
- "swapFeeFactorForNegativeImpact": "0xbdfacc5a3aafccef508a92c25358d876d54cab9266f562bfeb0f075011400b5f",
+ "swapFeeFactorForBalanceWasImproved": "0x1dbf6ea5c40ddb4981c0c991291ebcfe9ca18da36b55476f46c07db6f9d4d796",
+ "swapFeeFactorForBalanceWasNotImproved": "0xbdfacc5a3aafccef508a92c25358d876d54cab9266f562bfeb0f075011400b5f",
"atomicSwapFeeFactor": "0x2fa11c68d618568b2ec47f2af07043ea0617b92ffb1b3392c5686ba9a063a7f5",
"swapImpactFactorPositive": "0xa24690e158bd6148dd1ee7619d26d4db4c22e063bf7fbc4849b248713ecc4be6",
"swapImpactFactorNegative": "0xea3e78f194aabd8ee877feb4dd76f0f10e28e5375fe88a39575480d27d265afd",
@@ -290,8 +290,8 @@
"maxFundingFactorPerSecond": "0x5c35b3218147478cc4180f5aa2855d0f28596ba4441f9d2e8d209ae71eeccd89",
"maxPnlFactorForTradersLong": "0x62b1329a211b95ce1332d70babea14c068cd8ba5a664cd92aefa4dfcaa4f167a",
"maxPnlFactorForTradersShort": "0x974b387f81e50088e3c3ac618012d346cc44ada48d7755853beaf23ab5cf13d7",
- "positionFeeFactorForPositiveImpact": "0xb1bf22ec2a6afd7bcc3c9005e3c3c2487c8dae699c0f4ef601cd0bf2ec00b0fb",
- "positionFeeFactorForNegativeImpact": "0x491eab7041f5a8e59a24551f5f7c7f88554dfc7d8aa1cc32dc8447d4e0a3433d",
+ "positionFeeFactorForBalanceWasImproved": "0xb1bf22ec2a6afd7bcc3c9005e3c3c2487c8dae699c0f4ef601cd0bf2ec00b0fb",
+ "positionFeeFactorForBalanceWasNotImproved": "0x491eab7041f5a8e59a24551f5f7c7f88554dfc7d8aa1cc32dc8447d4e0a3433d",
"positionImpactFactorPositive": "0x058ef893f1d5f6ef1fc9eafb5b98f219ba86fe1ff1732bd8e621ed9314b04c2f",
"positionImpactFactorNegative": "0xc3dd689dd953a4ead23ac3691cce97602c03ec497d0b618b927045ee6b05ec94",
"maxPositionImpactFactorPositive": "0x76f07a9c4842e03295e606a17118aa7055df974c7e8119e90c54366f8438c824",
@@ -302,8 +302,8 @@
"minCollateralFactorForOpenInterestLong": "0x2baf62173b9765c40d17461b94ede9de9288eaceb9bea879a93916d6fbc22a19",
"minCollateralFactorForOpenInterestShort": "0x2d87dc943787f13f340d4ca58bc57c9779423fb4b7a25951482d25d8cedc88ed",
"positionImpactExponentFactor": "0x255ba96b3ea4034ce13d81ee90f50b43d11aa4cf3d7f6cf6e214708c8cfcdd02",
- "swapFeeFactorForPositiveImpact": "0x3de65a272685fe435c3bf061d018861d43e0981580e7f7fbbee8322549a24448",
- "swapFeeFactorForNegativeImpact": "0x16ac4a989200e46829ff7e2a35892009f28622ddbe6474b3bcbf0be26843bc8a",
+ "swapFeeFactorForBalanceWasImproved": "0x3de65a272685fe435c3bf061d018861d43e0981580e7f7fbbee8322549a24448",
+ "swapFeeFactorForBalanceWasNotImproved": "0x16ac4a989200e46829ff7e2a35892009f28622ddbe6474b3bcbf0be26843bc8a",
"atomicSwapFeeFactor": "0x921b5c21abfe7c96a3983ee5dc525afa485a1a3d75e2622780e5fd988ed51039",
"swapImpactFactorPositive": "0xdd0713bd8c7d7d813cf41f2134c5c4171d1dd731b92f992bca75cee16f113bbf",
"swapImpactFactorNegative": "0x2c1ef24611bfb6198a766b0251729bb7dac63eadd6743ed5585dcfba706d2b58",
@@ -342,8 +342,8 @@
"maxFundingFactorPerSecond": "0x1ef61f8f945d86cd58ef7e1e4bc7729da62fef5ec14affddbba24e7fd1c961bf",
"maxPnlFactorForTradersLong": "0xef8aaa370644aaf3abf0f745c8d419b4e8b022fa74bd591331b9049f01a776a5",
"maxPnlFactorForTradersShort": "0xa0ddc4194a3ed609bab97fffba907154c8b2fab359f5339b564c416dd307fdfc",
- "positionFeeFactorForPositiveImpact": "0xe0a8dfbd751b5d5206a4421add9c6138627ad8b1dd6c33c53e903e54a873d6bd",
- "positionFeeFactorForNegativeImpact": "0xb1d9a20a9576c7c8e95d076152d6b7471f325274e27944234317d1655b9a7c68",
+ "positionFeeFactorForBalanceWasImproved": "0xe0a8dfbd751b5d5206a4421add9c6138627ad8b1dd6c33c53e903e54a873d6bd",
+ "positionFeeFactorForBalanceWasNotImproved": "0xb1d9a20a9576c7c8e95d076152d6b7471f325274e27944234317d1655b9a7c68",
"positionImpactFactorPositive": "0xa72f633da73261095054c3c45e61c545b71b34515676776202071552eb46744e",
"positionImpactFactorNegative": "0x06aa2f3ce1399efdc7ced916c85dab36fdb5f78075b6ffa4cad253f726e194e1",
"maxPositionImpactFactorPositive": "0x5c9741051d509ce2c9f6984c4c7f98516b2cbf91e1342f56f0e1b5d40056b688",
@@ -354,8 +354,8 @@
"minCollateralFactorForOpenInterestLong": "0x55f19e1cb6994dac8de0f0595716c8ce1c98c4a0fe7ab84d94a2581a2857ef77",
"minCollateralFactorForOpenInterestShort": "0x661c2ecf5182f780d9b14cd701f17b54d2fec0a3c78259175f382a53aaa17c85",
"positionImpactExponentFactor": "0x9c4e91c06294bf042d7bf732cb8ef8eacbc2b113523e0a3d00ca94d3baee95b5",
- "swapFeeFactorForPositiveImpact": "0x1e388b1aefe26c7999b5916b8d315dc220aab3bd1abf69d022fb2ca798af1d87",
- "swapFeeFactorForNegativeImpact": "0x42455fb0390e5144cf404e735d539d273f23e0599527cd4cfbea64781471c11b",
+ "swapFeeFactorForBalanceWasImproved": "0x1e388b1aefe26c7999b5916b8d315dc220aab3bd1abf69d022fb2ca798af1d87",
+ "swapFeeFactorForBalanceWasNotImproved": "0x42455fb0390e5144cf404e735d539d273f23e0599527cd4cfbea64781471c11b",
"atomicSwapFeeFactor": "0x142a11abfeb0ce942f834c8c1824cd4f4054f9c895ecd8cd620997fc38524384",
"swapImpactFactorPositive": "0x8879db97a79f1b27c0eaf1b7e8326ca6b02dde9dab4a136bf6de2ae5bc87eb43",
"swapImpactFactorNegative": "0x267ab1bdc0e337337fb57913abbc1774c61393c941ec14405210702c243dd087",
@@ -394,8 +394,8 @@
"maxFundingFactorPerSecond": "0x80fbfee732d414f7e197bd2dca60406b5443b01a07b4bcdb3e9c79809d5b1c98",
"maxPnlFactorForTradersLong": "0x0d971c00493d5db7d3270c7a8cfa9cc7aa0a99e5005fb913d5dc26b445f551f7",
"maxPnlFactorForTradersShort": "0xf9a064f376e3c391caabd7d692c3e5e5c601ac3a9ebd1d2c105ef84117e3588b",
- "positionFeeFactorForPositiveImpact": "0x57a019d7c544d1c83cd3118bf0c636b2e212af7f8c5c1e1ad5267adf98f3bbd6",
- "positionFeeFactorForNegativeImpact": "0x99694bed9c85088df5242e4cfb72caecd4c1cb1870445956483f383b2ad6a5c0",
+ "positionFeeFactorForBalanceWasImproved": "0x57a019d7c544d1c83cd3118bf0c636b2e212af7f8c5c1e1ad5267adf98f3bbd6",
+ "positionFeeFactorForBalanceWasNotImproved": "0x99694bed9c85088df5242e4cfb72caecd4c1cb1870445956483f383b2ad6a5c0",
"positionImpactFactorPositive": "0x48e76a2a5d0acb603c2113e72183f2ff900dad314753ccd89847cbb3ab21a522",
"positionImpactFactorNegative": "0x2892774a5b56d753852b4a0f3bfb467e3a8ec009f9363ea1e87a1fb0be8949eb",
"maxPositionImpactFactorPositive": "0x2ff3590362f429c9e9fed9dbdd6d9b7af0fadc3db5958cbdad4915effd446ab5",
@@ -406,8 +406,8 @@
"minCollateralFactorForOpenInterestLong": "0x766fd0d002f43488d55b72193e9da1714d44851b4eb0e813cc8d280bef17a17e",
"minCollateralFactorForOpenInterestShort": "0xd7db435910f38921a33518f369da861bc79b935c47e55310cda4cac15d5e8817",
"positionImpactExponentFactor": "0x2efcc03e271bba8971dffc9f4ceb1afc8fc3c3c21d00a7c3b55ce76374ad79d8",
- "swapFeeFactorForPositiveImpact": "0x33809fa251f2a79834e55024e55c4f8108575f4de5b2cb36a20328e5ab447533",
- "swapFeeFactorForNegativeImpact": "0x2cedab9e26e3f9beb8d6b7ed636b6bafb5c22480925bba846038f0c06b622eaa",
+ "swapFeeFactorForBalanceWasImproved": "0x33809fa251f2a79834e55024e55c4f8108575f4de5b2cb36a20328e5ab447533",
+ "swapFeeFactorForBalanceWasNotImproved": "0x2cedab9e26e3f9beb8d6b7ed636b6bafb5c22480925bba846038f0c06b622eaa",
"atomicSwapFeeFactor": "0x2e955a1d4b845ed986f466bb7d4be7403cef7c3ef1da3cd000250bbb251d2bf9",
"swapImpactFactorPositive": "0xb63747d677b3f4894bf83370aa290ba493a3279ab6c71e8f627d6a19200fd0c1",
"swapImpactFactorNegative": "0x6db11718caa3c178b5c71b0ebb38438e678887ee9808ee5fff12f45dff61f523",
@@ -446,8 +446,8 @@
"maxFundingFactorPerSecond": "0xe7a76386a66a7510ccb548446cb42001ef38df88ed137941f22f742a80662a9f",
"maxPnlFactorForTradersLong": "0xd5f058fb977929295998ca0eff3c526b05bc44fad34dd48f5067d6d63b7eae2c",
"maxPnlFactorForTradersShort": "0x50c66a2e6ed8488a2a6ba5ada5720a9475a809201089d4fc87977b851c382866",
- "positionFeeFactorForPositiveImpact": "0x52f8b77c96eee555524449d744f3f6c6ab77a4f26db48d6df363a32fba500e11",
- "positionFeeFactorForNegativeImpact": "0xe4b8f5be03631cd111cafc0ac01dc8a8ab8f8ffc65b2a47287e8f9cf72b9c39d",
+ "positionFeeFactorForBalanceWasImproved": "0x52f8b77c96eee555524449d744f3f6c6ab77a4f26db48d6df363a32fba500e11",
+ "positionFeeFactorForBalanceWasNotImproved": "0xe4b8f5be03631cd111cafc0ac01dc8a8ab8f8ffc65b2a47287e8f9cf72b9c39d",
"positionImpactFactorPositive": "0x4c9c2a48ed819ebea8ffdd30af8644af6bca85d2a73c6212b3e116d565ea6f1a",
"positionImpactFactorNegative": "0x14770004251515604996859abeaefb248ed77bac98b0182e5d0de798e73a9880",
"maxPositionImpactFactorPositive": "0x3bd8a0156fa25ff8ede082290885def48ebc2b978d3d3bb634261bbd940aa8ee",
@@ -458,8 +458,8 @@
"minCollateralFactorForOpenInterestLong": "0x534530389b87caf5d983a7e0e861fa8081b2a7a13384cf923705a64a186c5230",
"minCollateralFactorForOpenInterestShort": "0xe5b9a75cc9c16a9e118200b3e6bd4b4a4a3849781b494af86fd3b61368f3a9ef",
"positionImpactExponentFactor": "0x2f3fcc42ff0aebd5654ab91b39ee87bf3782130d659ee6dcb17bfd46609a202b",
- "swapFeeFactorForPositiveImpact": "0x76240fbd6e985d59376b17429e35328adb92d235eaed290e881d2905f4fee93c",
- "swapFeeFactorForNegativeImpact": "0x98d812495968f772c1430ad5bda82be56209a512f5038e644d21baa4649258b7",
+ "swapFeeFactorForBalanceWasImproved": "0x76240fbd6e985d59376b17429e35328adb92d235eaed290e881d2905f4fee93c",
+ "swapFeeFactorForBalanceWasNotImproved": "0x98d812495968f772c1430ad5bda82be56209a512f5038e644d21baa4649258b7",
"atomicSwapFeeFactor": "0x5f7d86e6dc36460d2f9ad7dd34579a510203f38e3b7fad173fd2e07d1a930cfc",
"swapImpactFactorPositive": "0x322d07f82afd4f2749d56278757d206f52add338aa5bc9359b259a5ddef4e514",
"swapImpactFactorNegative": "0xe765a130a8cb9790e3c622efbb5422a8fd76ba0ed4a41840a89b667104954b19",
@@ -498,8 +498,8 @@
"maxFundingFactorPerSecond": "0x99b8fb43ab749f6efe10459bf77c6e6d1cc46a02d8556deaae37bfce7e310fed",
"maxPnlFactorForTradersLong": "0xe819b259874d89abd8406b4d8b5e978103e20599ce37ae5e6fcf35aadd672806",
"maxPnlFactorForTradersShort": "0xc08bed49b3149d637af537bd879916ad2179e5f790c6a4d9fa254f70468f8c54",
- "positionFeeFactorForPositiveImpact": "0xa33ef0e7e5737b815d4ee3818c9dda824c74ca1c0010ceca073401987419dd6e",
- "positionFeeFactorForNegativeImpact": "0xbaa718f209c80155d83205a86874b4ec814ad173901eb25ef539652c4c0f7102",
+ "positionFeeFactorForBalanceWasImproved": "0xa33ef0e7e5737b815d4ee3818c9dda824c74ca1c0010ceca073401987419dd6e",
+ "positionFeeFactorForBalanceWasNotImproved": "0xbaa718f209c80155d83205a86874b4ec814ad173901eb25ef539652c4c0f7102",
"positionImpactFactorPositive": "0x01e45a73c87ea6a24bd3e4b646a8fb50e525994b47b2e071688832b3db9a36a3",
"positionImpactFactorNegative": "0x0eb07128e77ab3ed0303be75bf40e58de698d31f3587002010201f1f87383ba8",
"maxPositionImpactFactorPositive": "0x3aaa745ed518dd8c579ee6533f0abc0f71f0b5856a057d7cdb74765251b41f7c",
@@ -510,8 +510,8 @@
"minCollateralFactorForOpenInterestLong": "0xce841b0d0a75f7f23b3068a8731d79d46ffd5224bf752b82c99278c615ce9610",
"minCollateralFactorForOpenInterestShort": "0x095df3a0a35194c30b382a21aa95ff97440c497a9fa7308d9046a7c6a830a077",
"positionImpactExponentFactor": "0xa776cf8b6750764a7baceb04c49b3e8316f86ba63007da12ce39fac78ce94815",
- "swapFeeFactorForPositiveImpact": "0xa5c03fcca15132bd6eaab72fcb0be1671560cbff2bb1216ba7a680423f852cc5",
- "swapFeeFactorForNegativeImpact": "0xad609e8a1ec4b62de757f26762513889a12b50c490a2c972b4cffdab526ce5b1",
+ "swapFeeFactorForBalanceWasImproved": "0xa5c03fcca15132bd6eaab72fcb0be1671560cbff2bb1216ba7a680423f852cc5",
+ "swapFeeFactorForBalanceWasNotImproved": "0xad609e8a1ec4b62de757f26762513889a12b50c490a2c972b4cffdab526ce5b1",
"atomicSwapFeeFactor": "0x21912c9b2d2663de7ed5f3dba461a5b257e5c2aec9f3f7d0ee25da86d40ef075",
"swapImpactFactorPositive": "0x40780b4dfe67cb9032a30a9ae910a8e63c568c0bfcfbac6962149a0480760e02",
"swapImpactFactorNegative": "0x981313e20ad119ffd4e7297d65ac074bda816af74f76dc5ebef3a288ea0420c6",
@@ -550,8 +550,8 @@
"maxFundingFactorPerSecond": "0x8b5935796ab74f3629e2ecb0efb2aaa95ec6c22cac58d7d2549715ec3b637f02",
"maxPnlFactorForTradersLong": "0xdbff4e5388b3cadab3adb3cbea18328ab85615d1d33540f1daa3637191bd2a7a",
"maxPnlFactorForTradersShort": "0x25e92f539fa9d6181cb3175d855b0e3db892f87e7cf44683c2bd88c3987151f1",
- "positionFeeFactorForPositiveImpact": "0x75342f90740d718e915d25876def103e0aadb790eeec0e51cf80a0164fdb998d",
- "positionFeeFactorForNegativeImpact": "0xa3181a5fa6716d137684451c14456bd1e089a30d7e4195041e1d03c5877fbdb1",
+ "positionFeeFactorForBalanceWasImproved": "0x75342f90740d718e915d25876def103e0aadb790eeec0e51cf80a0164fdb998d",
+ "positionFeeFactorForBalanceWasNotImproved": "0xa3181a5fa6716d137684451c14456bd1e089a30d7e4195041e1d03c5877fbdb1",
"positionImpactFactorPositive": "0xfaf02c5d36cb1652804abd1004a4a3cc59b1d9639b6451440e856c507ca45e8e",
"positionImpactFactorNegative": "0x68e601b74c240b88ff66adfef9b198da08f6b4eb2f6bbc5745217e2ee220c74c",
"maxPositionImpactFactorPositive": "0x55682cadf8c0c42f07f7537e036888e6509b4c1fefbe791f8806c0122464065c",
@@ -562,8 +562,8 @@
"minCollateralFactorForOpenInterestLong": "0x2236f68da88942f622d2e117770f8f2147a2e26a5ae248e7facaed024241fff9",
"minCollateralFactorForOpenInterestShort": "0x97b31e77e2349e5ca9393f9b039ae4c6e08b561674013325694aee511fa70f4d",
"positionImpactExponentFactor": "0xd29cc14774ff37425210a4b4982d64598d960517246358ca6ae31e8278b88171",
- "swapFeeFactorForPositiveImpact": "0x2453b281ca272f6b3c4aabcc06da5f61a03fde91143ecbb636906d8760751038",
- "swapFeeFactorForNegativeImpact": "0x43fdf293b2369b23c689953b361e57206f130569d07cdec5b02a91f7db302988",
+ "swapFeeFactorForBalanceWasImproved": "0x2453b281ca272f6b3c4aabcc06da5f61a03fde91143ecbb636906d8760751038",
+ "swapFeeFactorForBalanceWasNotImproved": "0x43fdf293b2369b23c689953b361e57206f130569d07cdec5b02a91f7db302988",
"atomicSwapFeeFactor": "0x7dfd70277f86278a779644d88083c0680c47bb02f02bdc9161268e2c24f8d092",
"swapImpactFactorPositive": "0x6e872e48337e83b9b0974c98123f42c6c42133a809dda28947e45044fef0d763",
"swapImpactFactorNegative": "0x7f74925d83c9749b52d3c463b52f75f56d3df222aa8091d320be024fcc136ab5",
@@ -602,8 +602,8 @@
"maxFundingFactorPerSecond": "0x77905364bba50c4f33e22bccadbd317691a1c22b10fb45c5dc8c32129526044b",
"maxPnlFactorForTradersLong": "0x9dfce95f35750ed7989c98bc3fa7b9ffdc4d923342b99b475bd1a68dd2bea55f",
"maxPnlFactorForTradersShort": "0x3f7a7d4fa7b04934a74b5c4fe364e15ec7f182a731e00665a8087943d90d8ef3",
- "positionFeeFactorForPositiveImpact": "0x2afa6ab01eaffdcdce3de67ca9408d171dca6f345e4a933977f017c3f935a150",
- "positionFeeFactorForNegativeImpact": "0x16a9815fd641b782481c256ae44f741d91f98e60f198e6f67711c2f872654659",
+ "positionFeeFactorForBalanceWasImproved": "0x2afa6ab01eaffdcdce3de67ca9408d171dca6f345e4a933977f017c3f935a150",
+ "positionFeeFactorForBalanceWasNotImproved": "0x16a9815fd641b782481c256ae44f741d91f98e60f198e6f67711c2f872654659",
"positionImpactFactorPositive": "0x163076b9dd0072442b9329b1e08c52eaf7f5d809f427178601592806a5200645",
"positionImpactFactorNegative": "0xc27bde803397efc87d5d72964b6602262a80df80f9793084055ef0d6dd08b1af",
"maxPositionImpactFactorPositive": "0x1c69876249545cf8f840054e487971e4faa2bf1574ac216060f5367e8fc4a611",
@@ -614,8 +614,8 @@
"minCollateralFactorForOpenInterestLong": "0xc91baace01ed132d5a1f539fb6ddacfa913f012c6d706993f1f9d21e28646417",
"minCollateralFactorForOpenInterestShort": "0x42ab637ba5ede5ce450b490c92fd5308a4b63d814d521886092107e000564243",
"positionImpactExponentFactor": "0xfbaadfdbb5b204e122e8a78505941f01262e57d5b600482db442a452bdf0c5e4",
- "swapFeeFactorForPositiveImpact": "0x13c0be771ab61c6f159c7b5afdf946b2e46e53aafb8881484d71a028dd441160",
- "swapFeeFactorForNegativeImpact": "0x7b665b4b365ff791322993f71e61afeba792f6ccb7a2f5f2163825643637c897",
+ "swapFeeFactorForBalanceWasImproved": "0x13c0be771ab61c6f159c7b5afdf946b2e46e53aafb8881484d71a028dd441160",
+ "swapFeeFactorForBalanceWasNotImproved": "0x7b665b4b365ff791322993f71e61afeba792f6ccb7a2f5f2163825643637c897",
"atomicSwapFeeFactor": "0x1509233a29eaeb1b61f20040be4dd415f027c0b543b6222075a8c10f6a3546c1",
"swapImpactFactorPositive": "0x6d7c56088daa2bea15028f86d6f54e24a63768356083dce669015965c9f5b873",
"swapImpactFactorNegative": "0x3b2c183b4353852490404ae6be59826b51e24517576e18db1483a6c593a1a99a",
@@ -654,8 +654,8 @@
"maxFundingFactorPerSecond": "0xfaa2e2d54bd6c23be91d8e5c47cb3ae9d9fec59b9aa8290ef792420f15b2469c",
"maxPnlFactorForTradersLong": "0x85ec736c56013977c51d5e19da50497a732239f0fca988471f4e0a3066fca75b",
"maxPnlFactorForTradersShort": "0x8edb1f5246ad1af8d59a7ad26d8f41fe7dd2a1813a1569cdcfe40851df6ea6cf",
- "positionFeeFactorForPositiveImpact": "0x529d29c9843efe4be2f9872d2e78fcf6e0440a13d77141765380fc76817f5c87",
- "positionFeeFactorForNegativeImpact": "0x8e3f4978a3cf5cce73d79ff5773e2edb617da3267e8017ac64dfb274f7742094",
+ "positionFeeFactorForBalanceWasImproved": "0x529d29c9843efe4be2f9872d2e78fcf6e0440a13d77141765380fc76817f5c87",
+ "positionFeeFactorForBalanceWasNotImproved": "0x8e3f4978a3cf5cce73d79ff5773e2edb617da3267e8017ac64dfb274f7742094",
"positionImpactFactorPositive": "0x84bf3fb933429f4de132e3c58aff52a078506381c7f24020b466fccf28905941",
"positionImpactFactorNegative": "0xf54c7c49ce94e0c61f7c5038863aff7eb4a7aa1a1097acf42851ffe9350bb0a5",
"maxPositionImpactFactorPositive": "0x8fba80b3646c853ff0999394fbddf236bfdb72482b4fb1dadf6fbc81caa1b9f8",
@@ -666,8 +666,8 @@
"minCollateralFactorForOpenInterestLong": "0x95ed56a404dad3b4f299ec1ce25cef2de1a828458f02787a404fff019baaafa4",
"minCollateralFactorForOpenInterestShort": "0x8f5bb4ea781f12eefd8cc65f9cbe17af85a9e315fef4cc50fe63e7471af42531",
"positionImpactExponentFactor": "0x2ad9516b4cf9062372bbb664ccbba50dff378bedfb8e9defbdc4eadab8306d1d",
- "swapFeeFactorForPositiveImpact": "0xcd711380dcd676e0544ad089e8c882686c308f656fa651d48a0747b7f70fd564",
- "swapFeeFactorForNegativeImpact": "0xfeadc380b20cab88593bd96433d4b0ee08368051055dfcfbfcc594a02a98cf08",
+ "swapFeeFactorForBalanceWasImproved": "0xcd711380dcd676e0544ad089e8c882686c308f656fa651d48a0747b7f70fd564",
+ "swapFeeFactorForBalanceWasNotImproved": "0xfeadc380b20cab88593bd96433d4b0ee08368051055dfcfbfcc594a02a98cf08",
"atomicSwapFeeFactor": "0xe7e08dc2e46bdec6bdb17e9860d93dbd8ec4c73bfc46e0fd78170aa3c5bd33de",
"swapImpactFactorPositive": "0x737c7f824ed4b98d1e563da86dd27bc6555ef0c5e3a7735a9d2efad4b87dddc1",
"swapImpactFactorNegative": "0x71533255ae7a74548b062c095bfbf28d36199e44d3481ed295bc9075f5137ef7",
@@ -706,8 +706,8 @@
"maxFundingFactorPerSecond": "0xc3d8ca914f0cc679122fb0f2cf851dd828b598d7d60d3b5fcc56ed86d8cc33fa",
"maxPnlFactorForTradersLong": "0xea0ab7ba61168c2bee279288a503df6416568c2bbabfa80fe953fe824954d628",
"maxPnlFactorForTradersShort": "0xab9ca42c0baf668370ea036fec734f4badac8b93f7d98bf8aca0c7bc53e3a100",
- "positionFeeFactorForPositiveImpact": "0xe5e2c324445803bae980161bc19f60163527312fb3ba12a69c42ac9d2d1ce824",
- "positionFeeFactorForNegativeImpact": "0x3c8892db6ea33607529e998daf052e2d7631399762ee3d4ed1dc0ef43290fa54",
+ "positionFeeFactorForBalanceWasImproved": "0xe5e2c324445803bae980161bc19f60163527312fb3ba12a69c42ac9d2d1ce824",
+ "positionFeeFactorForBalanceWasNotImproved": "0x3c8892db6ea33607529e998daf052e2d7631399762ee3d4ed1dc0ef43290fa54",
"positionImpactFactorPositive": "0x3bea7fd67f7eb844908e5e28482f18674e6bba80493bcac40694608c91afb23a",
"positionImpactFactorNegative": "0xe6d8bca55d639e4693467c4031793f201d42fb885127ca38006b4948dd7af1e0",
"maxPositionImpactFactorPositive": "0x4263f2ff7af12d6564bab215180503848e8bbaae4bf39c4e6e4e5d73b9a8add3",
@@ -718,8 +718,8 @@
"minCollateralFactorForOpenInterestLong": "0x6d844c42863e83e23fa960ab45a1a5696e1be08fa1e4e772366172c0ac93229f",
"minCollateralFactorForOpenInterestShort": "0x47f7b3459fe7e68075e8c6444215e21468de24ee4f0fdb3ddc04af016f6755b4",
"positionImpactExponentFactor": "0x6193f8d462c3326bc8cb666374837667c596f93cd996cffbd81668a636843061",
- "swapFeeFactorForPositiveImpact": "0x2fc46450b98092e9b66e0bf7696ce02d4c833be88de497cfb915d3f39e3812ec",
- "swapFeeFactorForNegativeImpact": "0xb37a74e4f029bbab4db5c9a9bf086565143dc8e25ac8cd13909d079fb770d4c6",
+ "swapFeeFactorForBalanceWasImproved": "0x2fc46450b98092e9b66e0bf7696ce02d4c833be88de497cfb915d3f39e3812ec",
+ "swapFeeFactorForBalanceWasNotImproved": "0xb37a74e4f029bbab4db5c9a9bf086565143dc8e25ac8cd13909d079fb770d4c6",
"atomicSwapFeeFactor": "0xfdf1e814ffbae35f4df6a90a4d167e0a998a23174ca373a153e356504f28e7ae",
"swapImpactFactorPositive": "0x027553df27e8e9b5a65bebc5f963f76e85ff58fb8d9c1ae933ca099379ca4b60",
"swapImpactFactorNegative": "0xb75f6793ffd5ebc77458bcfe941d32c2939bfde678876cb5795ef174242a34fd",
@@ -758,8 +758,8 @@
"maxFundingFactorPerSecond": "0x55069748b013aeafed958fcb91ec1fd542ea8544b742f6eb55c55776ac9f35dd",
"maxPnlFactorForTradersLong": "0x8eb7ba2e0073ed92d420187aebffc7b087a92b226be547ff071f08274a0a4bfd",
"maxPnlFactorForTradersShort": "0xd16159783f2f3480377b1016b40459ce05c08c5dba1055f792df1a4244251f45",
- "positionFeeFactorForPositiveImpact": "0x0c5805974efe868ce0ca027b4a7633ad68158550b1bb97bc30278ebbf228c14d",
- "positionFeeFactorForNegativeImpact": "0xdb16d4b4d8013bcc93d01321c277effb94bf6b8550cc8344b7b66819a29638fb",
+ "positionFeeFactorForBalanceWasImproved": "0x0c5805974efe868ce0ca027b4a7633ad68158550b1bb97bc30278ebbf228c14d",
+ "positionFeeFactorForBalanceWasNotImproved": "0xdb16d4b4d8013bcc93d01321c277effb94bf6b8550cc8344b7b66819a29638fb",
"positionImpactFactorPositive": "0xb11d8986c9d5f1ddb9a54c87c508436447121d439f07f9095a366cc5cc07527d",
"positionImpactFactorNegative": "0x37dbbde80316028bcc42ab769e2d1dea559042641b0ef5e7e8b2c9bbdc92d21a",
"maxPositionImpactFactorPositive": "0xc48d8c6bc423b09532b41f9989b3379cf2f045332ff8653091fe4d7269132d16",
@@ -770,8 +770,8 @@
"minCollateralFactorForOpenInterestLong": "0x2a50bf17c53f122cad04b207535a3c74b062687e8c8f8657ea2f927b501c1062",
"minCollateralFactorForOpenInterestShort": "0xff365ea9e77f3aff0dea18e392461b9ca0e3b42051708fa32969f77d5ca76b87",
"positionImpactExponentFactor": "0xd0d2c3fbe177c70b48f1f2866e4a15ccedeae13f3e7c96726a6e367325a045dd",
- "swapFeeFactorForPositiveImpact": "0xf9e19bb3189d432360663917ab7316f9eb15e32ca0fc81158e76cdcd51084b52",
- "swapFeeFactorForNegativeImpact": "0xe5f10a8eee33843ebf12cef81e4141d649bfb8c2584c80c0fc1e71d1e32d0d0e",
+ "swapFeeFactorForBalanceWasImproved": "0xf9e19bb3189d432360663917ab7316f9eb15e32ca0fc81158e76cdcd51084b52",
+ "swapFeeFactorForBalanceWasNotImproved": "0xe5f10a8eee33843ebf12cef81e4141d649bfb8c2584c80c0fc1e71d1e32d0d0e",
"atomicSwapFeeFactor": "0x6f191cb60f240eb255b18e35b30e69a2555b7cd004db58df4413f6ce73989ac1",
"swapImpactFactorPositive": "0x51f43de19f522a77191e09d4d845cabc4a6b411ed843bd7333c97c0dd2a1e99d",
"swapImpactFactorNegative": "0xdb943b0a66e6c7d34998c8e3ff6ce90d1f79df2b550aac083000d80ca80b1277",
@@ -810,8 +810,8 @@
"maxFundingFactorPerSecond": "0x62aa103c40f4782518c92f328ea7e13953221a344bbe17e1182069e74bdccd43",
"maxPnlFactorForTradersLong": "0x5c46a769b0e6fc8e1900598d8b17673417a9f295712f0839f2ba621fdaaa1420",
"maxPnlFactorForTradersShort": "0x3157f0b83f7f288d4345b32021f8625dd0211a0bb3a856869d8449883481df51",
- "positionFeeFactorForPositiveImpact": "0x8e1966a3f947cb6695cd3294ede56aa8667a859843a47c8a1dfa15355ae302bd",
- "positionFeeFactorForNegativeImpact": "0x3d52d46103b4fd7fe8a8d527bf5a484d3950554a42a2879766c90dcaf48541a1",
+ "positionFeeFactorForBalanceWasImproved": "0x8e1966a3f947cb6695cd3294ede56aa8667a859843a47c8a1dfa15355ae302bd",
+ "positionFeeFactorForBalanceWasNotImproved": "0x3d52d46103b4fd7fe8a8d527bf5a484d3950554a42a2879766c90dcaf48541a1",
"positionImpactFactorPositive": "0x7938767f73461676c26d5a862999ac1f38ce4efa8b026f6ac6b1e8df69c4a8f7",
"positionImpactFactorNegative": "0x9028c1019ee95416ba45534f1a394daea60dc7fdd77b5320961b263773789bb5",
"maxPositionImpactFactorPositive": "0x8cc0069408f08a8a1e914d23f0bd90ab2edd81dcb73ba80808c1cb161d7f866b",
@@ -822,8 +822,8 @@
"minCollateralFactorForOpenInterestLong": "0x9a7f1df75521d5245272629ae3d633c5b1df32b56dbfb7bcb79f6ed1783f3207",
"minCollateralFactorForOpenInterestShort": "0xa3964e38e2bfad919081510f192eb40d3c12b8102f229d74230e94476af37ba5",
"positionImpactExponentFactor": "0xc59aff205787697cfac1654c750728376206127692ee4e7134bb41d79217bcb6",
- "swapFeeFactorForPositiveImpact": "0x3364c0f9fc9f8bb96a1008c317d26b51f20c5ea1d1130799e4662d8c4a7bf3b9",
- "swapFeeFactorForNegativeImpact": "0x305d6a42c6ccdab58c16ec512fc0b9394bf2dbdf82516c15d09cdcb76085e4b2",
+ "swapFeeFactorForBalanceWasImproved": "0x3364c0f9fc9f8bb96a1008c317d26b51f20c5ea1d1130799e4662d8c4a7bf3b9",
+ "swapFeeFactorForBalanceWasNotImproved": "0x305d6a42c6ccdab58c16ec512fc0b9394bf2dbdf82516c15d09cdcb76085e4b2",
"atomicSwapFeeFactor": "0xa911e8a22efd7c8716579f5327ca2b5363b5957bee2a2ac32ebc7b04a009c024",
"swapImpactFactorPositive": "0x6ca9dab5d892a8a0c799579aad85021f29ddde1c808da563752093e0ddf2d4c7",
"swapImpactFactorNegative": "0x0a2d863399db84d689cfdc9148b1a486ad96583764fdf636a66862500cc51b96",
@@ -862,8 +862,8 @@
"maxFundingFactorPerSecond": "0x2e363ac3de945f9e347a42944c7ddc509c53f8ce07b05316181a4834368d4af7",
"maxPnlFactorForTradersLong": "0xc2b6ba297e2818e9751c3039ff2071b2ae3b4d72dee96205fd6c62cc9545a5ab",
"maxPnlFactorForTradersShort": "0xa7db2c7ecf2ff216c4276556a88d852ea7296c5da8839673baa4f00f17e708c1",
- "positionFeeFactorForPositiveImpact": "0xd777c5b4d55d87e7a3876930db0af4b021a643cfa9070d896e77bda6b5681d6a",
- "positionFeeFactorForNegativeImpact": "0xa94fd16219d3c4b400807acb21ef6ac91bb6f1870bca3cb5ba5a19dc4f6e6c9c",
+ "positionFeeFactorForBalanceWasImproved": "0xd777c5b4d55d87e7a3876930db0af4b021a643cfa9070d896e77bda6b5681d6a",
+ "positionFeeFactorForBalanceWasNotImproved": "0xa94fd16219d3c4b400807acb21ef6ac91bb6f1870bca3cb5ba5a19dc4f6e6c9c",
"positionImpactFactorPositive": "0x644525ed476f4be317620be6a478b562b0de82d724dbced4b69c638ebdfdec79",
"positionImpactFactorNegative": "0x1d5d8012f2837929e603657bc2d70a612947a3a1926d332e48e709b209d90f9d",
"maxPositionImpactFactorPositive": "0x5319f499876d4621e715dc632e7d7cb3933dc765ea1acf8d430e17a55393e986",
@@ -874,8 +874,8 @@
"minCollateralFactorForOpenInterestLong": "0x5b29bc756da04509ebef8e49358a85e1b080ee9d9b19f646413c7ec366643c4f",
"minCollateralFactorForOpenInterestShort": "0xc386fa4fcdecdfd9ac1d63b2d86d391f4676ced1e3ddb89d47bbb629bfcbde6e",
"positionImpactExponentFactor": "0x2214e49931ae131c89d827b277789c69bccf736319f9448888c99ff753982a5f",
- "swapFeeFactorForPositiveImpact": "0xcf099a51e285d31b3ded24bb284f311662deae9715dff06251f99a1a623a7c01",
- "swapFeeFactorForNegativeImpact": "0x54f7ac0acaf50fddc48a4d1687ef164394bd31f48441c86b9fea6d348f7d83c8",
+ "swapFeeFactorForBalanceWasImproved": "0xcf099a51e285d31b3ded24bb284f311662deae9715dff06251f99a1a623a7c01",
+ "swapFeeFactorForBalanceWasNotImproved": "0x54f7ac0acaf50fddc48a4d1687ef164394bd31f48441c86b9fea6d348f7d83c8",
"atomicSwapFeeFactor": "0x16e598fd74c94ad3c757bdf8764ccf02388d376df4d70c59d9e7e5b05a8dc129",
"swapImpactFactorPositive": "0x004df3c0dc3d5b0aef8045ddf6c7170646212a2708d9c8efd90d42aa68887f7c",
"swapImpactFactorNegative": "0xddc46fbfef1ad897fbe83b4250c0e21dc33408f6035ed37f98b4349cac818569",
@@ -914,8 +914,8 @@
"maxFundingFactorPerSecond": "0x600ebc560d5b1d959a5561e38cfc1e6fbafa3f74e4b84d3c77c000003913420f",
"maxPnlFactorForTradersLong": "0x48fbe5087841455da95914af5afadfdb9bff2c13381ddd257abb5a01860d302e",
"maxPnlFactorForTradersShort": "0x22cd9499d49aeaa2f91b64be08489a3ce928b8022d46363d16d60d459b0d7f94",
- "positionFeeFactorForPositiveImpact": "0x97c1a448f396a50ccc22e2ea500e54434962a5249dc5a661d06658985ae59383",
- "positionFeeFactorForNegativeImpact": "0xddf9c6e8a3146f2034501e798506b8a353893e80b3de3748c74b87532f824982",
+ "positionFeeFactorForBalanceWasImproved": "0x97c1a448f396a50ccc22e2ea500e54434962a5249dc5a661d06658985ae59383",
+ "positionFeeFactorForBalanceWasNotImproved": "0xddf9c6e8a3146f2034501e798506b8a353893e80b3de3748c74b87532f824982",
"positionImpactFactorPositive": "0xb906177bd22906fb4855b38744d7322883feb6e061495886d5c12d0b8f810ccf",
"positionImpactFactorNegative": "0xc75f07b39b2aaf3050d588849ef734198cff5801bfa21c4559b08a95e281f72d",
"maxPositionImpactFactorPositive": "0xe38a3799bc01e41c85e5fd8df2d75f32af5e85731835f96bec4cc30adab2fe75",
@@ -926,8 +926,8 @@
"minCollateralFactorForOpenInterestLong": "0xc711c4d6d1307e7c53adb1d3e70e48374818834facdddda9f3aa07ab3b84b6eb",
"minCollateralFactorForOpenInterestShort": "0x43728b39e120b4a41ea9f74f87206a5de82c1fd6020b9c20e8a12becd690628a",
"positionImpactExponentFactor": "0x58ff383b5858a0568214aa46f74f6c6acda40c2de4e119a9fc703e6e9f883533",
- "swapFeeFactorForPositiveImpact": "0xc88b708cf46980ee7b53f2d31c02cae3f4097451afe3d262d1ae325896e2fb2f",
- "swapFeeFactorForNegativeImpact": "0xae26f90162d5a9dd0c751088ef6e3d8ad0a4e4d4296c92959aecebe6eba55438",
+ "swapFeeFactorForBalanceWasImproved": "0xc88b708cf46980ee7b53f2d31c02cae3f4097451afe3d262d1ae325896e2fb2f",
+ "swapFeeFactorForBalanceWasNotImproved": "0xae26f90162d5a9dd0c751088ef6e3d8ad0a4e4d4296c92959aecebe6eba55438",
"atomicSwapFeeFactor": "0x5671a7614ebe14a1898c515d300b8190920c147b248e214499e630554e877391",
"swapImpactFactorPositive": "0x9afe4fd264c1db9a7311ade7ccd92b9901cda321ff91dc4a544e60e9aefdd403",
"swapImpactFactorNegative": "0x24b8ea4213ef6ea1381eef1d22c8be6e6a2776542043f94cd0b75451e722acc3",
@@ -966,8 +966,8 @@
"maxFundingFactorPerSecond": "0x791b8aacf46146f2c630c31e87150454705394d0ddee283d9a218093004c4991",
"maxPnlFactorForTradersLong": "0x61205f138d458d410fb24113fddaf8bfb906c41a5bd1243e09a60bd3fa95e6ad",
"maxPnlFactorForTradersShort": "0xef08c3656d3ce51df1b75f08a987d879463632460692bcda68e4ef17ebac29c7",
- "positionFeeFactorForPositiveImpact": "0x55eb1bd845d62653b5e99b5862c3604b078e1609942fddc47148214a9f1b6c98",
- "positionFeeFactorForNegativeImpact": "0xeab5b72f46abf95fba34f585b311a74eb14eb8c40d3030aa04e806881a5338f3",
+ "positionFeeFactorForBalanceWasImproved": "0x55eb1bd845d62653b5e99b5862c3604b078e1609942fddc47148214a9f1b6c98",
+ "positionFeeFactorForBalanceWasNotImproved": "0xeab5b72f46abf95fba34f585b311a74eb14eb8c40d3030aa04e806881a5338f3",
"positionImpactFactorPositive": "0x5639f816f2049a823282162b24c26bccad96430b6cc80cfd802a6e0a4daa48e8",
"positionImpactFactorNegative": "0x64b33aa4893fc85aeec723156a0fc0c151ec4e7d9e8c3f2f3225e52cdc6f5453",
"maxPositionImpactFactorPositive": "0xebacab0fccc785fffddf4ce399ec5f857e302fa137d3b3443f5a3153b5d925b1",
@@ -978,8 +978,8 @@
"minCollateralFactorForOpenInterestLong": "0x7be7f22de8ae3c36d8218b44d06c5a126ea07b5bf1176ff4e90c34ccdae32302",
"minCollateralFactorForOpenInterestShort": "0x49034ddfa16113a80d2c700f7fa75fee26f684beec367e2c7d7e4f3f08320bb8",
"positionImpactExponentFactor": "0xd0316ba8768fcb3880ea8519def956514eb9bc7d1cd1d9805bc936e379eb8610",
- "swapFeeFactorForPositiveImpact": "0x3097eb783f61d26eb308b82a5f390ad8a3b17605c548f16f6c22a9e4a9d4fdfc",
- "swapFeeFactorForNegativeImpact": "0x8439bc00c0643f5214a648849ed64fad4e16c6fdaa17c415cec3232757a71e70",
+ "swapFeeFactorForBalanceWasImproved": "0x3097eb783f61d26eb308b82a5f390ad8a3b17605c548f16f6c22a9e4a9d4fdfc",
+ "swapFeeFactorForBalanceWasNotImproved": "0x8439bc00c0643f5214a648849ed64fad4e16c6fdaa17c415cec3232757a71e70",
"atomicSwapFeeFactor": "0x5c32414b2d8daead8b548e58f19445b0a6fa9c0ab06c88a953caa92b0e0e09eb",
"swapImpactFactorPositive": "0xcc58aaa5866cf4113e41fc4df9e5ee80b1d697ae5449bb1aada134f5eb228cbf",
"swapImpactFactorNegative": "0x02fcf4c3f06217571778935d3f7e97c3e8d72c50baa6e937265d4b9d3cb65b37",
@@ -1018,8 +1018,8 @@
"maxFundingFactorPerSecond": "0x0a6526a497e4489cf4be22651eccc3b5071dc85cdaf2db76ebbee48f55fe4b44",
"maxPnlFactorForTradersLong": "0x9ddabf7f3e53a1821379516b58312039c6eb26b81ee291c1252ef022bc03dc64",
"maxPnlFactorForTradersShort": "0xbd9f0a0545529a2ddc6068c9d4d8c38529cab28e6dbea62d20017cdf93bba76f",
- "positionFeeFactorForPositiveImpact": "0x483710f439356b530fcbd39fe35dca94e09ae68f9b42137c2426b15c7eecab44",
- "positionFeeFactorForNegativeImpact": "0x9fcbf5b6ce818dc0a039fe77c3344216992a26473d6aa52571b5f9b1ebdd29f6",
+ "positionFeeFactorForBalanceWasImproved": "0x483710f439356b530fcbd39fe35dca94e09ae68f9b42137c2426b15c7eecab44",
+ "positionFeeFactorForBalanceWasNotImproved": "0x9fcbf5b6ce818dc0a039fe77c3344216992a26473d6aa52571b5f9b1ebdd29f6",
"positionImpactFactorPositive": "0x6e0611944f4603e4b3eb24878be8b06c454f0d32cdbd115b6989ce8666412b9f",
"positionImpactFactorNegative": "0x6e3f4836d516e2b3c7d97f4eb14b647210743805f6625f18dc048184d42f3236",
"maxPositionImpactFactorPositive": "0xa49f2ccad33245c6c3e4e65abbc1b574fb1b260c790a598aa1607b7916af939b",
@@ -1030,8 +1030,8 @@
"minCollateralFactorForOpenInterestLong": "0x35859412d8490a4c126fe4f1bfc34c55cb8fe37dfa500acd3c8b86af666c5ec3",
"minCollateralFactorForOpenInterestShort": "0x9fbb1a4f2cee065baea2f8cc6c37830cef07cbbc7a5c433a7a525949f5ecebd1",
"positionImpactExponentFactor": "0xb6bff386e5ea9af0e6720bebfdd73d88abd8d3028c1819942bcee244f2ca9405",
- "swapFeeFactorForPositiveImpact": "0xaaf64b979df9faef0f42c389d81152da8e9d914ed4fae4f41a31ef0f70334eb0",
- "swapFeeFactorForNegativeImpact": "0xbe982294c986c3affb4919d120c418c791a8602c614700dc2bb0ca07815e6ed0",
+ "swapFeeFactorForBalanceWasImproved": "0xaaf64b979df9faef0f42c389d81152da8e9d914ed4fae4f41a31ef0f70334eb0",
+ "swapFeeFactorForBalanceWasNotImproved": "0xbe982294c986c3affb4919d120c418c791a8602c614700dc2bb0ca07815e6ed0",
"atomicSwapFeeFactor": "0xf53ef4c33158142d328bfc7c66ddd8ddda3b43d1f6a9ebcdf63a7e2a1d439ca1",
"swapImpactFactorPositive": "0x9fd271446b4cb4dabfda536750bd6f93b58bfb591131e601bae3c640d9609b2a",
"swapImpactFactorNegative": "0x4a7f2a5421a3eb1067a7e45de84e107fc455e79cfbf6236aa396f99272cfe4b0",
@@ -1070,8 +1070,8 @@
"maxFundingFactorPerSecond": "0x5b6b8bfa2a902a4700b5a546209cb4097cb278eaffa6c775832110dec862dd16",
"maxPnlFactorForTradersLong": "0x7e878f228e830c2c29edf1cebd86787df291d03924e2681eb9192db2925e2576",
"maxPnlFactorForTradersShort": "0x13a5a683a8052446dd311ec4c4a537be6c046a45cdf374b87ecbd3663196e07c",
- "positionFeeFactorForPositiveImpact": "0x546c33b1dba15b428da83872dde33a920eb215ff6f219683cd72ba4a26d5c533",
- "positionFeeFactorForNegativeImpact": "0x8d6b3bf9f919ba71b67feb739447c6b300ac0f9f79068132584ce16c2a1e0fda",
+ "positionFeeFactorForBalanceWasImproved": "0x546c33b1dba15b428da83872dde33a920eb215ff6f219683cd72ba4a26d5c533",
+ "positionFeeFactorForBalanceWasNotImproved": "0x8d6b3bf9f919ba71b67feb739447c6b300ac0f9f79068132584ce16c2a1e0fda",
"positionImpactFactorPositive": "0x799fd72dcd8bc0b912b482f186a074b67fdab11aec58c5fc3c09a5ab601bfe4d",
"positionImpactFactorNegative": "0xc35bd69b22ba7b4339033e97d3d4ad5735fbb434b54e10be44bac834d63d4ca6",
"maxPositionImpactFactorPositive": "0xe2991c2345da0cfdfd5b8ec9e7676658276be8890053e15fcccb194d3bf7e12b",
@@ -1082,8 +1082,8 @@
"minCollateralFactorForOpenInterestLong": "0xb53e1f7357d8985ac911799567e535ae47b4b735a3aa570d896d2675c5ebb6d9",
"minCollateralFactorForOpenInterestShort": "0x24518edda98ceefe82f1204ce0f521627a009586216d80895e53abfe2ecf184a",
"positionImpactExponentFactor": "0xd0f2eee3c7933f4cd4be61e89645e29cc81fe2e6b8182b4622055eda40e77d48",
- "swapFeeFactorForPositiveImpact": "0x95cc059a74ab0cc2d211ba23f2332e2b506142a89fddc54e2006bc3f35931464",
- "swapFeeFactorForNegativeImpact": "0x4771d81fc424f4ad1751f397a8bf3cccc268f477d6a35c745a0e9d1841e1027b",
+ "swapFeeFactorForBalanceWasImproved": "0x95cc059a74ab0cc2d211ba23f2332e2b506142a89fddc54e2006bc3f35931464",
+ "swapFeeFactorForBalanceWasNotImproved": "0x4771d81fc424f4ad1751f397a8bf3cccc268f477d6a35c745a0e9d1841e1027b",
"atomicSwapFeeFactor": "0x121d44595c73c7cf96dbeb5db9d1e30a4f96ace8ca98fc55606bb043dab27176",
"swapImpactFactorPositive": "0xb5f17a97f65ee498fdac7f1788550bbd6a729107081de95c3890c697fe931481",
"swapImpactFactorNegative": "0xddcb4f9e4b88feb61b957dbc5dc0bd03435c471d8ab9c3c985699b0cad17ffc2",
@@ -1122,8 +1122,8 @@
"maxFundingFactorPerSecond": "0x6c5d09a30a097dc3ce6bc2bdf3ae5515da61cf6eee5ffe30776669db8d0299ff",
"maxPnlFactorForTradersLong": "0xa4856280b896701f3961e30b5ae67819ccfb3ecfcc1b02b51a279498566bab2a",
"maxPnlFactorForTradersShort": "0x9261ef9a90b9f9785f18258aee39f431e7af66971ce7628b37dd197d93bde9dd",
- "positionFeeFactorForPositiveImpact": "0x98853d8dfbb87c8e9d5e028e404924d8e05219c0b47225b2044b7e7877f7a173",
- "positionFeeFactorForNegativeImpact": "0x37f06a157c23a33de4ca7196216ce1915ec1a3cc92d0a99ad8546b9ec307ccd9",
+ "positionFeeFactorForBalanceWasImproved": "0x98853d8dfbb87c8e9d5e028e404924d8e05219c0b47225b2044b7e7877f7a173",
+ "positionFeeFactorForBalanceWasNotImproved": "0x37f06a157c23a33de4ca7196216ce1915ec1a3cc92d0a99ad8546b9ec307ccd9",
"positionImpactFactorPositive": "0x548ce19161df3c4381f589d02db21974b0760e345caad0f3d209d39e87ef0e93",
"positionImpactFactorNegative": "0x7f948d551673d7db11bc768d5e619644ad8fcd7d3b5ea979802542bef58c1ac2",
"maxPositionImpactFactorPositive": "0xcc90fb298e671c27c085ae0f7416295fadedbd92249139252ddc869a5ca25dc7",
@@ -1134,8 +1134,8 @@
"minCollateralFactorForOpenInterestLong": "0x4279cffcd52e0915df8447175e708381712393531426166172e9a466f544ea6e",
"minCollateralFactorForOpenInterestShort": "0xa7dd5e63b8b99bbd36c61b26e144889399099bdc86c904aa8dcf3d53670a8806",
"positionImpactExponentFactor": "0x3a2cd4a711e8cba8017733aa537e32ebfd2e5fa858bf0a773a3967ca2f7b30b0",
- "swapFeeFactorForPositiveImpact": "0x4965fc8a21524ad70b41143626dd638286b9b42ceaa02dbb9bc821f614cf9fdf",
- "swapFeeFactorForNegativeImpact": "0xf890051400774cc25b9f4e404ba50d42ebd497e3b1c8b9541fa1da94174e71c2",
+ "swapFeeFactorForBalanceWasImproved": "0x4965fc8a21524ad70b41143626dd638286b9b42ceaa02dbb9bc821f614cf9fdf",
+ "swapFeeFactorForBalanceWasNotImproved": "0xf890051400774cc25b9f4e404ba50d42ebd497e3b1c8b9541fa1da94174e71c2",
"atomicSwapFeeFactor": "0xcfb92ad1dd016d2ee0067cd81c7dc4c64f292f95f56158b5ab39d25a80821d77",
"swapImpactFactorPositive": "0xa6399402207293d84fc48222f3238feae062d86e26e725edaca06fab54bf2e4b",
"swapImpactFactorNegative": "0x8c3bbbb69bd132cae186a17c0f17fec773e3b7d2ef52c639a31ce3ecc4bba196",
@@ -1174,8 +1174,8 @@
"maxFundingFactorPerSecond": "0x3835500eefeba57cbe50ccb407e19aaec2f84810d63c5390fd9e7b6754d9166e",
"maxPnlFactorForTradersLong": "0x1383fddcb6581558336fbc217cfc3db183cd69fb3e7cdac5fdf5ddafcfe3c75e",
"maxPnlFactorForTradersShort": "0x71d36d7c6a247209ce0590c54c0d14752956059486987fc5161b7bec6739c8b3",
- "positionFeeFactorForPositiveImpact": "0x2708cfa61a406341dc08ec540f21a474d06cc5091f45dad2888452f9619320f1",
- "positionFeeFactorForNegativeImpact": "0x3596e5879e782fc01324e6c9391e2fe90856824c369c31b33c23987e61304bb7",
+ "positionFeeFactorForBalanceWasImproved": "0x2708cfa61a406341dc08ec540f21a474d06cc5091f45dad2888452f9619320f1",
+ "positionFeeFactorForBalanceWasNotImproved": "0x3596e5879e782fc01324e6c9391e2fe90856824c369c31b33c23987e61304bb7",
"positionImpactFactorPositive": "0x5871f75e257b7d79f48e659a4c02d14ddd0b8baca3c4a1583219d85f177c5268",
"positionImpactFactorNegative": "0x46340a568baf8d8bdd7d3198bfd3d4327a7532eac8a249a7cd6fe33cc05a86ea",
"maxPositionImpactFactorPositive": "0x19d692d2b95d1189dba6f596c97673a944821958599797b977eb5408ce276ba3",
@@ -1186,8 +1186,8 @@
"minCollateralFactorForOpenInterestLong": "0xf62a2cd524471634da150460345daeb42bcc47fc9a8b5ea5b1a581013edfef77",
"minCollateralFactorForOpenInterestShort": "0xd9b39ffa382462e2b24dd0ebd1c3baec3d78c5ade8d4cbee813c5b8a51baeb20",
"positionImpactExponentFactor": "0xa2af6371bc1aeebd6802ac29ccd755b5ab13703022b5b772111b4e555273e745",
- "swapFeeFactorForPositiveImpact": "0xa08dd6fcd6029bc48ce2addf2868af78d216638205a73838668634ca2a4981b7",
- "swapFeeFactorForNegativeImpact": "0xc9bbb4bcd2036e8e18f3fd37c85140389749faa6bb95005ded218d00ab217029",
+ "swapFeeFactorForBalanceWasImproved": "0xa08dd6fcd6029bc48ce2addf2868af78d216638205a73838668634ca2a4981b7",
+ "swapFeeFactorForBalanceWasNotImproved": "0xc9bbb4bcd2036e8e18f3fd37c85140389749faa6bb95005ded218d00ab217029",
"atomicSwapFeeFactor": "0xf8346cdca37cb62bdba7aa727ef4a442631ad1e0b5043132b92388fddf5aec81",
"swapImpactFactorPositive": "0x9f5c1ba768149251f1ac9bbe83db59ca66c5bc1dac404af7fe71e644dfe9cbb7",
"swapImpactFactorNegative": "0xded0c3d499ee81a6f139dbbbafd11a57b4b0d741c4deed0eb81b462952739816",
@@ -1226,8 +1226,8 @@
"maxFundingFactorPerSecond": "0x0bf8542c05326ad5f245f8ba4f53a5413526ee86b08ab300cbcfa53c8f7e75bd",
"maxPnlFactorForTradersLong": "0x7e1a7f613272fff1571d4406fb4f7943444c3fe98768f85cdaf2742879ff334f",
"maxPnlFactorForTradersShort": "0x20c8ff6d63e62ce262a9cd193aaa60b95cf9ddbe860ab71336988a646baf26e0",
- "positionFeeFactorForPositiveImpact": "0xc7f070dd821b1624b6a2929d567327bb3867502d02dcd2e71065cdd41ee23cf3",
- "positionFeeFactorForNegativeImpact": "0xd5c959261e7a34eddeae5b309b1cca01ca260753eb2124ca19d3ed308287e0a5",
+ "positionFeeFactorForBalanceWasImproved": "0xc7f070dd821b1624b6a2929d567327bb3867502d02dcd2e71065cdd41ee23cf3",
+ "positionFeeFactorForBalanceWasNotImproved": "0xd5c959261e7a34eddeae5b309b1cca01ca260753eb2124ca19d3ed308287e0a5",
"positionImpactFactorPositive": "0x24d1fea37d4c67a275c1d219f987fdd8716789d24675e2a5d1c83afa319a327d",
"positionImpactFactorNegative": "0x80a256eee5da715b887d848baaf967bb8f7f9082d982e4678f4ce3cb6130d7b0",
"maxPositionImpactFactorPositive": "0x6823916303f2ab71c4c0c51d8ebe85bd81c3e041feeead165128a864338a7e2b",
@@ -1238,8 +1238,8 @@
"minCollateralFactorForOpenInterestLong": "0xd0b617f09379ad18f7bc551443b94d4b5c55e0023fb79c7165eec37289860743",
"minCollateralFactorForOpenInterestShort": "0x45b9bea14109e02351108100e302342f22e4658eb48584be5fe6b4d585dfe27d",
"positionImpactExponentFactor": "0x751f7109c025778b3f40dbc637af12a93d5a0c622c49f4115dc80f784b299eb7",
- "swapFeeFactorForPositiveImpact": "0x83492ab5df99806cdbd8314795b516b6a9782b0942161be4f1af9bca88951ac1",
- "swapFeeFactorForNegativeImpact": "0x63766eeca2ae5b09a2e0eb72120df5dbe6a8875527d67cd7b45ef9aba940e951",
+ "swapFeeFactorForBalanceWasImproved": "0x83492ab5df99806cdbd8314795b516b6a9782b0942161be4f1af9bca88951ac1",
+ "swapFeeFactorForBalanceWasNotImproved": "0x63766eeca2ae5b09a2e0eb72120df5dbe6a8875527d67cd7b45ef9aba940e951",
"atomicSwapFeeFactor": "0x8e88387d1a012a6f06628e8788e16bad6616eb06ba1404096c0c11a9bccea974",
"swapImpactFactorPositive": "0x5a6f6f80c4a3e8d65986a384398e538c8faf9088f78210ea7b4f0f390633a51d",
"swapImpactFactorNegative": "0x8f02874c8602664244cb90ca2139b5ba51aa0d59bd1479b6b94603a7cce88086",
@@ -1278,8 +1278,8 @@
"maxFundingFactorPerSecond": "0x1da7debb0b6df3807925c7cbebd7dbc68d0ee443039816f3a8fd68c1f747b861",
"maxPnlFactorForTradersLong": "0x7cfde814ebf3d1250c0842f9cdb144ced475a1dd2822a2c51c668916a60b5e4d",
"maxPnlFactorForTradersShort": "0x69c09c494cb8be5ceec8b05f2fe89d979733230188b1fad94a8ecaeb1b277a3b",
- "positionFeeFactorForPositiveImpact": "0xdf5425159f0f0d87b1f2539ee40a039a381156da40713f7016b06cf7a4b16b15",
- "positionFeeFactorForNegativeImpact": "0x654dfb3012335aec94c961545f0be05714f87c533d86962a9ea736f56124362a",
+ "positionFeeFactorForBalanceWasImproved": "0xdf5425159f0f0d87b1f2539ee40a039a381156da40713f7016b06cf7a4b16b15",
+ "positionFeeFactorForBalanceWasNotImproved": "0x654dfb3012335aec94c961545f0be05714f87c533d86962a9ea736f56124362a",
"positionImpactFactorPositive": "0x95058468ab52487db6520bc0a691ebe5ca226682fc034aca2f4291925890f7de",
"positionImpactFactorNegative": "0x141ad82e988c1652d94c149e0ffc2b2f296d8226f0804545b9b2f30f3a3e50ae",
"maxPositionImpactFactorPositive": "0xe74534e23b02234d9c1b63786b1e0595a47d733a393bb45daaff8b82dc4937d4",
@@ -1290,8 +1290,8 @@
"minCollateralFactorForOpenInterestLong": "0x974698c39aecd68284a0766fb070354eb0cc788557c000717eb1187a717a465e",
"minCollateralFactorForOpenInterestShort": "0x2cbcfa8219414a67ac30cbf47e0c87e3f98fa566922e42b7109f5148feb792a0",
"positionImpactExponentFactor": "0x8799f37db27fe4c64571774da8d11bb61b5a5b914a054aa230e26e58f694148e",
- "swapFeeFactorForPositiveImpact": "0x6141d666bb9b2a68a9749663d3c3dab876615cb1c1c19cd40b04bc1c90e89109",
- "swapFeeFactorForNegativeImpact": "0x154777b0009efb8b45f129e93dd06b79d93a034e74db99ee4c7f53fd6bb1064c",
+ "swapFeeFactorForBalanceWasImproved": "0x6141d666bb9b2a68a9749663d3c3dab876615cb1c1c19cd40b04bc1c90e89109",
+ "swapFeeFactorForBalanceWasNotImproved": "0x154777b0009efb8b45f129e93dd06b79d93a034e74db99ee4c7f53fd6bb1064c",
"atomicSwapFeeFactor": "0x896ab2b294e8a2d39a9c6be1b2d256a79d7f6b414e42c5e79f5d364db730dc8b",
"swapImpactFactorPositive": "0x461e2c7445b7c5765c40de6c216908f8dae1dd7515416d2b39d09c59c9410f9c",
"swapImpactFactorNegative": "0x844b935996c3559c7315004f459033cb6b4daba806b740a81bd8e9bee4d5f47a",
@@ -1330,8 +1330,8 @@
"maxFundingFactorPerSecond": "0xa86190d0831a71843286266b26bb09d290e7274457d4c6884dcc1ce7af8b75d5",
"maxPnlFactorForTradersLong": "0xae6a9602886e00e8f9cc9fae500cea6315539ce497876e3d8c68a7c2bce8ff83",
"maxPnlFactorForTradersShort": "0x7e0d5ffba6ead92454e3b86bdf9a7e5f05b90fe3f4191b817c4f1a5a88f31e19",
- "positionFeeFactorForPositiveImpact": "0xb12a559764e28d5b6e2828f2dafd4ec774c41481df3dc7a8b1d01051025775af",
- "positionFeeFactorForNegativeImpact": "0xe6787e7aff99034a0a90b9df8364057d42c7f114ef414a94b798cf7d9fb3499b",
+ "positionFeeFactorForBalanceWasImproved": "0xb12a559764e28d5b6e2828f2dafd4ec774c41481df3dc7a8b1d01051025775af",
+ "positionFeeFactorForBalanceWasNotImproved": "0xe6787e7aff99034a0a90b9df8364057d42c7f114ef414a94b798cf7d9fb3499b",
"positionImpactFactorPositive": "0x6f738a6e9c2976fa3398260c2678ceeebbc372c8740bca3d419def2cdd72d7fe",
"positionImpactFactorNegative": "0x042414808b145a04357da24216c441d4cb1866192323c65253d7d5d7ae5b16e6",
"maxPositionImpactFactorPositive": "0x417f05c74dda8045134d4ea5faa8558b54bd35e13417dad8988bac462d511986",
@@ -1342,8 +1342,8 @@
"minCollateralFactorForOpenInterestLong": "0x1a91d60f924b7371fe96dc19aec25c04a3c778b64b02909898c8ba552f8f8d74",
"minCollateralFactorForOpenInterestShort": "0x64a53510be4bbae7a856bad32346bdf81c3f6d8895c5cdb6d9b4c3061c7113d3",
"positionImpactExponentFactor": "0x8ccbfcefe45e6333409c1703e2b19a344996c8805280f1a49c6922a10509a67e",
- "swapFeeFactorForPositiveImpact": "0x1590ee2481a3040cb0d23eb50d8e5f03df05af2a0adb6647b64d9dd18409e4bf",
- "swapFeeFactorForNegativeImpact": "0x9ef8535355d5ea75d57b8faa5093312c6a291fecf76f923fd04bbd8cf9461f0a",
+ "swapFeeFactorForBalanceWasImproved": "0x1590ee2481a3040cb0d23eb50d8e5f03df05af2a0adb6647b64d9dd18409e4bf",
+ "swapFeeFactorForBalanceWasNotImproved": "0x9ef8535355d5ea75d57b8faa5093312c6a291fecf76f923fd04bbd8cf9461f0a",
"atomicSwapFeeFactor": "0xc3292e50be21e9087d06b18f3b871f63e311e17c7d06deacbb676bbe7ef65890",
"swapImpactFactorPositive": "0x3ce367a95fad78d15965cfa917ca6137f707a3d77022ba1f643a316323402f4b",
"swapImpactFactorNegative": "0x4cbf632cb133bbcc438fd421654e7dae88fa165ba171fd6e6044c505eb728017",
@@ -1382,8 +1382,8 @@
"maxFundingFactorPerSecond": "0xa5f8602de310b7ef0eac8c0b938744a9c6b0127e0d806d7f8f0b58b6318614d5",
"maxPnlFactorForTradersLong": "0x10c8eb29dea6e099e25573dccff9650d218c309953f6ba9b03690e8cfdd66b5b",
"maxPnlFactorForTradersShort": "0xeca0d151e83f98ef5e12410b0a2d223e29cc7d97f228f9d63edb1a90d9467696",
- "positionFeeFactorForPositiveImpact": "0x10d2a12dc0ae3d3ebf4846a7fbe21f4c46517ee74bdd7c6fd72417e75ec1caaf",
- "positionFeeFactorForNegativeImpact": "0x611c3bc2e992fc865409dc0b81a02796f19cf207d98a8636ba04889156767b3c",
+ "positionFeeFactorForBalanceWasImproved": "0x10d2a12dc0ae3d3ebf4846a7fbe21f4c46517ee74bdd7c6fd72417e75ec1caaf",
+ "positionFeeFactorForBalanceWasNotImproved": "0x611c3bc2e992fc865409dc0b81a02796f19cf207d98a8636ba04889156767b3c",
"positionImpactFactorPositive": "0xe26bfc6ea0695527daaf43790b252c6cd520b6f041d52b89fa1765e332b0a2ba",
"positionImpactFactorNegative": "0x29078683fd16217f167c57ce10332c45b25a7e2a42b7e317f4993cdd182ee4f0",
"maxPositionImpactFactorPositive": "0x92c555de2df6a801fca90169a37445fa9e1b6127ad2b24e9aae09e610daa64d8",
@@ -1394,8 +1394,8 @@
"minCollateralFactorForOpenInterestLong": "0x159b5efb14ba5fdf82eb9483ce36a5cc511603ddc0851867d2f62e061a1eb5a5",
"minCollateralFactorForOpenInterestShort": "0x5ea79f8f1091195b3a4b2e7b906f73a855a4677d85a563c73c636da18a4c3b61",
"positionImpactExponentFactor": "0x5de08cfc1c45dc70944717fb92318d5f3f66c26fc83ad52ac82277eb036d81db",
- "swapFeeFactorForPositiveImpact": "0x8039a612505e93d3b3b411b3e667f13e1a54b0d830e9dcc16cb41d838b85c6bd",
- "swapFeeFactorForNegativeImpact": "0x07bcac70080ce14495a72e4e38fcbf3cf15913013379a12d4cab5ac6c741851d",
+ "swapFeeFactorForBalanceWasImproved": "0x8039a612505e93d3b3b411b3e667f13e1a54b0d830e9dcc16cb41d838b85c6bd",
+ "swapFeeFactorForBalanceWasNotImproved": "0x07bcac70080ce14495a72e4e38fcbf3cf15913013379a12d4cab5ac6c741851d",
"atomicSwapFeeFactor": "0xe3c7dc581d6b949ca503f256de43caf8a5615491c7b5750fd52d054c50989417",
"swapImpactFactorPositive": "0x16e0ad50beb175b5eb950fb44fac610b3289a7a74fe8a788d974cf667cb024a9",
"swapImpactFactorNegative": "0xf4d68d4587e30f6e4d7a9ee6eb78d8d4c1c05ace6f9bafd291483c9ce9eb1bb7",
@@ -1434,8 +1434,8 @@
"maxFundingFactorPerSecond": "0x33a776a9e8fdf2baa5a32b016dd8e6a333cf2e461554870d0c06cfc1f15bce5a",
"maxPnlFactorForTradersLong": "0x7b53f5192016caedcfe36d2c9283142ab453a038f9f58d3b6956a3d4e5b9723b",
"maxPnlFactorForTradersShort": "0x2fb89797b374a76143438b2cec9ffb464bfc30d36738dcd9fed215190b5d6323",
- "positionFeeFactorForPositiveImpact": "0xf3bf654aaa18bed4473e41fbf07fda8631a7c410c2e3f63a85158e40cc7d9b7a",
- "positionFeeFactorForNegativeImpact": "0xe348ca82ff412191d0856eab30d838889649105a16951e03680ecbc33572fba5",
+ "positionFeeFactorForBalanceWasImproved": "0xf3bf654aaa18bed4473e41fbf07fda8631a7c410c2e3f63a85158e40cc7d9b7a",
+ "positionFeeFactorForBalanceWasNotImproved": "0xe348ca82ff412191d0856eab30d838889649105a16951e03680ecbc33572fba5",
"positionImpactFactorPositive": "0x1db5aaa72739243e2cd7cbb59e13526bb779b6513f648c3be647a3945ee0b6ff",
"positionImpactFactorNegative": "0x9f4b1c96ad48b04dcb2e090029b07fa05c74137e2b3264b5b31b659c69c194de",
"maxPositionImpactFactorPositive": "0x054407c473f235dea7a7f175def0de1c030b1617f399a34315331710b5dc0c72",
@@ -1446,8 +1446,8 @@
"minCollateralFactorForOpenInterestLong": "0x3037baca9542bb9bf19e795a3ea8588f62fd7aa7f391835394eb39113b24f199",
"minCollateralFactorForOpenInterestShort": "0xdb99a450e0b3214c2eac3f7523de613aab2352d659dae70c2a748d158dcb92f7",
"positionImpactExponentFactor": "0x24d3d26a6be3949ac749df173c37d80cf593084309fc6214c3f2b987b8b5bf3a",
- "swapFeeFactorForPositiveImpact": "0xea7cc342e21f8f0d3929c81522fc565f43b539e5cdcd8b06e27fd147f5ea8122",
- "swapFeeFactorForNegativeImpact": "0x293b0ec6f9d1dfd04f394f6a2ac44c3c5dc6390cc10d3cdf91808e413ca6cad7",
+ "swapFeeFactorForBalanceWasImproved": "0xea7cc342e21f8f0d3929c81522fc565f43b539e5cdcd8b06e27fd147f5ea8122",
+ "swapFeeFactorForBalanceWasNotImproved": "0x293b0ec6f9d1dfd04f394f6a2ac44c3c5dc6390cc10d3cdf91808e413ca6cad7",
"atomicSwapFeeFactor": "0x4b45a7b2d6be1622e1f2aa8ea096a9dc8b58452956fac9b4ab17829876da0f17",
"swapImpactFactorPositive": "0x43815a7794b4f7f293baf4954ce22899083f202f8bacb7c6318febdd200c8647",
"swapImpactFactorNegative": "0x1b4e062640c62d2ea26baac2c515da1c438db5cdde51ce3b7e87c389c4588648",
@@ -1486,8 +1486,8 @@
"maxFundingFactorPerSecond": "0xa9ef8b74a174c9e223b7d703e4ecd5529724a3ed601cb05ad3972d69abd47b9e",
"maxPnlFactorForTradersLong": "0x5a378457c164946c52e07daa0bd710b55462b6c1166b1f9db12dc0cf90f0b09d",
"maxPnlFactorForTradersShort": "0xfa1252240c112896c95967a9f25716248b91106fa011dc48460dc122f7a01a8f",
- "positionFeeFactorForPositiveImpact": "0x7ad381a480212f1a2cd99216ab2fd20d2d3278de35a579524373361be43b638b",
- "positionFeeFactorForNegativeImpact": "0x7d17a4ff2eaec3da855d96f23a19e78ee118553b7ec5e877fd6ba2ecdeb70a38",
+ "positionFeeFactorForBalanceWasImproved": "0x7ad381a480212f1a2cd99216ab2fd20d2d3278de35a579524373361be43b638b",
+ "positionFeeFactorForBalanceWasNotImproved": "0x7d17a4ff2eaec3da855d96f23a19e78ee118553b7ec5e877fd6ba2ecdeb70a38",
"positionImpactFactorPositive": "0xc762ad5da3a0eff95f66232719c3912fc2f2ac454f86df09fcee9ccc1125906e",
"positionImpactFactorNegative": "0xdeaa0bb6c0dd14655f2b47aa4e7fbd84a48891105499b6d39ccac6773de55908",
"maxPositionImpactFactorPositive": "0x5d881863abefde1acac40bd9a69e9985a6946e409beee4bc2b1c250afcac9c0f",
@@ -1498,8 +1498,8 @@
"minCollateralFactorForOpenInterestLong": "0x093de38ced41ca0b1ed4b1125b61d2b919957df4784cfd03a2bec7169efe69d4",
"minCollateralFactorForOpenInterestShort": "0x26036e46776ea0eb1742bf11074ac5e347c4a16656bffb61ea87249d85908f71",
"positionImpactExponentFactor": "0x5c860ae9aabebb3cbd58b3aef502c6e8d7de7ee9352d4287a53912877b065f6d",
- "swapFeeFactorForPositiveImpact": "0x83f7fd8f66ad11eaec868ce47d0d0f0541d3c5b97db7510c6a5221f3d7742049",
- "swapFeeFactorForNegativeImpact": "0xd55ebff53d86bd23cf89b366ce663d0666ff69f0b57bca785f06f9a8241278b7",
+ "swapFeeFactorForBalanceWasImproved": "0x83f7fd8f66ad11eaec868ce47d0d0f0541d3c5b97db7510c6a5221f3d7742049",
+ "swapFeeFactorForBalanceWasNotImproved": "0xd55ebff53d86bd23cf89b366ce663d0666ff69f0b57bca785f06f9a8241278b7",
"atomicSwapFeeFactor": "0x2c55e0139a71c101d54a4a5c27d08df124018ba5e5a018b86f0d305d6d122b65",
"swapImpactFactorPositive": "0x554aa25ead86224ab91bef3c3666a62e090f2ff373660d1ad93b5bce40d86280",
"swapImpactFactorNegative": "0xa635d2782a0a1a49d0f0109507ad9f758eb8d886465a59b2a6aa4a0d4402b411",
@@ -1538,8 +1538,8 @@
"maxFundingFactorPerSecond": "0xaea060ad5c01b6855a8ba41c879877ad9e7c0d89d22c24b2d808dfca154c3192",
"maxPnlFactorForTradersLong": "0x0cca8f43022acf6faf517d0057db8de6c50145c84c4c178375f32c525504e162",
"maxPnlFactorForTradersShort": "0xa5db5e8014020874226641a8db0eb55033824863e8c3218a983672ff9962d866",
- "positionFeeFactorForPositiveImpact": "0x4a1f770da272d53d04cf31e8c4a04ef9fe459681c1ec5278abb1fab151d7ec92",
- "positionFeeFactorForNegativeImpact": "0x8f7d93c1516186baf16daaaed34af81384d055695f0fc0c143cbee3bbd8e73ec",
+ "positionFeeFactorForBalanceWasImproved": "0x4a1f770da272d53d04cf31e8c4a04ef9fe459681c1ec5278abb1fab151d7ec92",
+ "positionFeeFactorForBalanceWasNotImproved": "0x8f7d93c1516186baf16daaaed34af81384d055695f0fc0c143cbee3bbd8e73ec",
"positionImpactFactorPositive": "0xe30ca65f7576e63a00ad697a68075c47c69ba27e489fafd76ff29fb752b6a091",
"positionImpactFactorNegative": "0xb375b763eff4f0763ada21285731c4887d417d372dd7464b74a29c8bc3fdf350",
"maxPositionImpactFactorPositive": "0xfe35d1068a4bf727664f3683964a8585efa69f42b3fa05eb9bf95678e5fd0e9e",
@@ -1550,8 +1550,8 @@
"minCollateralFactorForOpenInterestLong": "0x1677f8025e1e4279b5a1db64264a79835c58c80818191018a56890aa23e9416d",
"minCollateralFactorForOpenInterestShort": "0xc62d3cca1c3f6cf4e2770239bc3db387c22a0874a46b28bd8d86bea5d0fd882b",
"positionImpactExponentFactor": "0x8d37091394262b6981015a549871fe3c908943afaa10321a82aabd7fdca918d3",
- "swapFeeFactorForPositiveImpact": "0x5cb96b68635c2011b20c1a103f94a8fae1fd3a1a31f929db520a540f3521a224",
- "swapFeeFactorForNegativeImpact": "0x3af0747e232c7341bb056cedc52a023be289515396288b8bea2867bd132efe38",
+ "swapFeeFactorForBalanceWasImproved": "0x5cb96b68635c2011b20c1a103f94a8fae1fd3a1a31f929db520a540f3521a224",
+ "swapFeeFactorForBalanceWasNotImproved": "0x3af0747e232c7341bb056cedc52a023be289515396288b8bea2867bd132efe38",
"atomicSwapFeeFactor": "0xdc378c54100ad2d83cfd42eb62e50eca23df736d38d7ebaf9d4567b5f9905a70",
"swapImpactFactorPositive": "0x7c0dcaa54ea81581befa553bf6ad5d1ed18aa7ad80bd7b80fcd6ef9b1615bd43",
"swapImpactFactorNegative": "0xd9536a29966ec9255729ded57ca8f7dddb0c0b9af89354db014171689595efc0",
@@ -1590,8 +1590,8 @@
"maxFundingFactorPerSecond": "0x34406dae1f399278c36439e30610303e8881eb0c1eb42c6865deeba2e1ca66a8",
"maxPnlFactorForTradersLong": "0x91f778de8f64270aac0b40bb44479cf9a7d2aefb2acabefea02adfa91b4ac80b",
"maxPnlFactorForTradersShort": "0x795d4f86e291bed384ac47280b3905bab11d4b622389f9abd295265a4cb3b9bc",
- "positionFeeFactorForPositiveImpact": "0xf140e4b048ebb70318a767afaf2861c9824c804046133fe53a8c28fd95abc1ac",
- "positionFeeFactorForNegativeImpact": "0xae6cc55956556a8a91c679697b2fdc574ba1119a77475d516a526734dff64e36",
+ "positionFeeFactorForBalanceWasImproved": "0xf140e4b048ebb70318a767afaf2861c9824c804046133fe53a8c28fd95abc1ac",
+ "positionFeeFactorForBalanceWasNotImproved": "0xae6cc55956556a8a91c679697b2fdc574ba1119a77475d516a526734dff64e36",
"positionImpactFactorPositive": "0xb5896aa101e635b6dd6b537b9cc24882580b95e8c282a544938c78a62ebc3185",
"positionImpactFactorNegative": "0x673862b9af47f7a839c274fe6743e7836f5ccdd9e426777a733b88fa9e38b2e9",
"maxPositionImpactFactorPositive": "0x83cfcad7830ac109e2d615c46c7061e128c7ecedbaa7b2eaa0f9c37fc1685633",
@@ -1602,8 +1602,8 @@
"minCollateralFactorForOpenInterestLong": "0x28e3fb3d6672b82c0d07651dc08f2dc5b1a60a464edcc11c4ea8b5e0421cb3e7",
"minCollateralFactorForOpenInterestShort": "0x85d241676b23e38f5edd65fff0fbaf35ab45a4c062d5971bd99d31a6cff3be9a",
"positionImpactExponentFactor": "0x4fcc2ef0a8e8cbd0a35c3560320662a39b102617306b41d31e0db602ccbdca2e",
- "swapFeeFactorForPositiveImpact": "0x762f094bbedc499cfb8ab344894a1337fa2827d9ca29c1652ef501a23a5796de",
- "swapFeeFactorForNegativeImpact": "0xb98d0057d669fde48bf1bfc5fc807f6783d140cce36c5c796f0c9d1f957924c8",
+ "swapFeeFactorForBalanceWasImproved": "0x762f094bbedc499cfb8ab344894a1337fa2827d9ca29c1652ef501a23a5796de",
+ "swapFeeFactorForBalanceWasNotImproved": "0xb98d0057d669fde48bf1bfc5fc807f6783d140cce36c5c796f0c9d1f957924c8",
"atomicSwapFeeFactor": "0x31cf5da07077e68eb185b9d1b8716f538cf11fa63e92e22919c55fcc93cae57c",
"swapImpactFactorPositive": "0x609b62f795290278ccdd73a7134158fd53801275c79a62f4741c967904d3bbd6",
"swapImpactFactorNegative": "0xd1aa256ef61e9f42f8c1ea56925edaaab20bf4c9c894a1769748459cdc9f1a13",
@@ -1642,8 +1642,8 @@
"maxFundingFactorPerSecond": "0xc8050137da6a9f433046c4b36fbf2bc953dceba773ef1225633240d2d85c0a8d",
"maxPnlFactorForTradersLong": "0xca07f7c616ab6f9805c6e8073e3b8774cba4deab4083dae0fdc4534f8564b643",
"maxPnlFactorForTradersShort": "0xa7b778271fee1571b28cb6708c350cabaa3ed6ef606b0cbff46697782a9bd25b",
- "positionFeeFactorForPositiveImpact": "0xe59160e09d9e46a995adb177032b42fc9903f8c1a9be530e9399f9663268e619",
- "positionFeeFactorForNegativeImpact": "0x53d747159802d68a32d22fc72977cd9444145e25509d61bbb7bae73a62b076fd",
+ "positionFeeFactorForBalanceWasImproved": "0xe59160e09d9e46a995adb177032b42fc9903f8c1a9be530e9399f9663268e619",
+ "positionFeeFactorForBalanceWasNotImproved": "0x53d747159802d68a32d22fc72977cd9444145e25509d61bbb7bae73a62b076fd",
"positionImpactFactorPositive": "0x855cd8b64b05e4e41158e5a1b01a07c030cf28d5023707edf00319f7b34acc35",
"positionImpactFactorNegative": "0x2300b73380f1ea8b3fcc88f736adbcc7196d4e5cb58d48e6aa23fdeb13056564",
"maxPositionImpactFactorPositive": "0xed918a7f0b5755162e808591716e05d3b487c7039d952e15ac9acd2a92c961c6",
@@ -1654,8 +1654,8 @@
"minCollateralFactorForOpenInterestLong": "0x5b602b41a9133139c01e6d0627ad253da782dfa70d615dea06e636974c0d2190",
"minCollateralFactorForOpenInterestShort": "0xb184fd747edc421383cd0ef45d3eca4c4551ef1be063daa0f93b350e0ca63299",
"positionImpactExponentFactor": "0x56936ed105ce2e078a8a02d6d884ec7ca0971f6e5bb24cd79e1a74c33be26c37",
- "swapFeeFactorForPositiveImpact": "0x0c2a02cb5d4ca72eb638bbc23178fbd9ef50fcad6ed4563b43600dbdc7f69874",
- "swapFeeFactorForNegativeImpact": "0x6ad012eb794a17a8ffcf7423e99c003381fe99e2f8a45ee381645195a360a090",
+ "swapFeeFactorForBalanceWasImproved": "0x0c2a02cb5d4ca72eb638bbc23178fbd9ef50fcad6ed4563b43600dbdc7f69874",
+ "swapFeeFactorForBalanceWasNotImproved": "0x6ad012eb794a17a8ffcf7423e99c003381fe99e2f8a45ee381645195a360a090",
"atomicSwapFeeFactor": "0xd90a7caf21cfec07cbb77bda9745cb5a367f9f089333ca34ea7124a53d1b611b",
"swapImpactFactorPositive": "0xf173e2084eda5671a0f4ea671bd7f0837776cdeda6178d17d5926537f468c7c3",
"swapImpactFactorNegative": "0xb792682cfb2272eee71294b3bed2d420d96f3b838650917f08eeaf20c6861eb6",
@@ -1694,8 +1694,8 @@
"maxFundingFactorPerSecond": "0xc73d22835ccf44694188b7d84e65857850e9346bed1c61a7c0a44d52fa26b2b3",
"maxPnlFactorForTradersLong": "0x3435ce1dc9ba5d1ad05c18a88bf1506c3e19fd9e5112f612b1a6c973c8ea3fde",
"maxPnlFactorForTradersShort": "0xf8400e70e5699ced498165dbcd4f673a2ceac4a31bbcb00a04a51ac0ee607390",
- "positionFeeFactorForPositiveImpact": "0x1ff672b4479b096ec040e2f446a621d71be58dbbbe1f19af6cba6b4f719c9e5c",
- "positionFeeFactorForNegativeImpact": "0x9f7bbc000233b9646d97ae3bb79a70b2ef9ffc4b4dad350a64f0662d8a3e0773",
+ "positionFeeFactorForBalanceWasImproved": "0x1ff672b4479b096ec040e2f446a621d71be58dbbbe1f19af6cba6b4f719c9e5c",
+ "positionFeeFactorForBalanceWasNotImproved": "0x9f7bbc000233b9646d97ae3bb79a70b2ef9ffc4b4dad350a64f0662d8a3e0773",
"positionImpactFactorPositive": "0x592471e23e8877fed51e465f6b98a83185d15c69346222166e9e70112a399da6",
"positionImpactFactorNegative": "0x172259f1b039320c8dbe0337fc3c4669009ea3e33fbed0f1f72de64834abefc1",
"maxPositionImpactFactorPositive": "0x7ad9019e284cfbcafb6a562e8c38d38afbf8ceb039fabbda946ab2c4016f27f7",
@@ -1706,8 +1706,8 @@
"minCollateralFactorForOpenInterestLong": "0xa9b976f225b7a1d9aa149a1674b712b8da2245e1d36f7e336a96c3794de912cc",
"minCollateralFactorForOpenInterestShort": "0x67fcd6cd3ab04ad285b2a1bb5393df7d7e368846bc8c2654c872e61cbdadb18d",
"positionImpactExponentFactor": "0x6fe9d3e57df23a89ed73e33f91d91d31fd23406654cf3de63dedfb6568389941",
- "swapFeeFactorForPositiveImpact": "0xc1d2acd5c88eedc10e84ea9905b6cee5274b2e01c1325a574170d39a27a28603",
- "swapFeeFactorForNegativeImpact": "0x9eb334e661c82faf90d0bfabbd8831d8bbfffc2a15d5caf6a53bea1a52a11f2a",
+ "swapFeeFactorForBalanceWasImproved": "0xc1d2acd5c88eedc10e84ea9905b6cee5274b2e01c1325a574170d39a27a28603",
+ "swapFeeFactorForBalanceWasNotImproved": "0x9eb334e661c82faf90d0bfabbd8831d8bbfffc2a15d5caf6a53bea1a52a11f2a",
"atomicSwapFeeFactor": "0xa517d70cfd722c6194d5cf52f6f06947406e1a79aa6ee92031a9924894d5c0e0",
"swapImpactFactorPositive": "0x995b47106472df08b1d99bfcdf5a5c58a22fd505cb0454ba3c65d25836e5e383",
"swapImpactFactorNegative": "0x6fde49ded6431284fad0ab80a5d2bb9e23bc71bdb6768018feb1d0d92cea86f9",
@@ -1746,8 +1746,8 @@
"maxFundingFactorPerSecond": "0xbdcdf2207e1ed7bbf132ff481b5821964c764f82b9a0d3710cb1c3e2ebfacab8",
"maxPnlFactorForTradersLong": "0x1e9639bf478f9c1c6e3f2c86487f1d095e877143acfa2abec4d8e529c16ddfdc",
"maxPnlFactorForTradersShort": "0x9e2ccf0a5e3d1e61b01dab339e6b8e898fec0c99aa7f3eb9357c92c3a1973226",
- "positionFeeFactorForPositiveImpact": "0xf07887eec3f30afc0147d9f489b64d03f360068f48998d05a9ccb06187b6be07",
- "positionFeeFactorForNegativeImpact": "0x0f7f470662d96642b2c2c82cccde4267736d60b558afaf66fbe7ab57ba67cee0",
+ "positionFeeFactorForBalanceWasImproved": "0xf07887eec3f30afc0147d9f489b64d03f360068f48998d05a9ccb06187b6be07",
+ "positionFeeFactorForBalanceWasNotImproved": "0x0f7f470662d96642b2c2c82cccde4267736d60b558afaf66fbe7ab57ba67cee0",
"positionImpactFactorPositive": "0xb9b5fcedd5c91a9d3c5c40a7a7a065885bd09fcb02181cad7b8c323c373875db",
"positionImpactFactorNegative": "0x2ad2b91e53b4a3a925e04f8c6d6eab8bbd1e770f8354fe3518d501bb86115c20",
"maxPositionImpactFactorPositive": "0x19b6035bb9a91088962ca09e26b08a5bf95d95b97c90f4f98ce550cb3e280d23",
@@ -1758,8 +1758,8 @@
"minCollateralFactorForOpenInterestLong": "0x49b7345940105477f772afb7f563688a99053ca3edca50f043ea031ef1bfa630",
"minCollateralFactorForOpenInterestShort": "0xafcbb8875e23ba9ea3aea7c817003ce9fd6c9f7e3a7397dc9d355d7030c1c6b9",
"positionImpactExponentFactor": "0x0e24bdb43d7906365809d9ad11ddd0a0b2d13541544125fd45e8f3e772df585a",
- "swapFeeFactorForPositiveImpact": "0x48cff709ea1bc1d7c25bbd8a21ec36fb0103a61fea7b2d79e71443214893b878",
- "swapFeeFactorForNegativeImpact": "0x0404920bfb8782dd3c3ca6bfaf367ed5b12377e0ed5cc20539714b87331a1e35",
+ "swapFeeFactorForBalanceWasImproved": "0x48cff709ea1bc1d7c25bbd8a21ec36fb0103a61fea7b2d79e71443214893b878",
+ "swapFeeFactorForBalanceWasNotImproved": "0x0404920bfb8782dd3c3ca6bfaf367ed5b12377e0ed5cc20539714b87331a1e35",
"atomicSwapFeeFactor": "0x9eada6b539ee0375006e15e7e12028007d7ce834db4e1d6624ed151abb77b704",
"swapImpactFactorPositive": "0x19e448c0928954fcb9a9cabbcf59f3132cc20f890325d3b12a4c7e8cda0fc283",
"swapImpactFactorNegative": "0x6a0d172623fbdc523516101821ee8863144416e7dd357b967bc205842b287bcf",
@@ -1798,8 +1798,8 @@
"maxFundingFactorPerSecond": "0x231ae23473685d04ef11c3f42aa7abc80bda19111e19f8af81a16565c0d341fc",
"maxPnlFactorForTradersLong": "0x0e6ee86e4636087f668e859c1446bbdb621df2e89db4c80682767bd8c3f4a2e0",
"maxPnlFactorForTradersShort": "0x758917d8b45db106bfde22a64cb91efadb0e76531160f2e79daa9da99961bbf2",
- "positionFeeFactorForPositiveImpact": "0x493d7cf32315ed2576fdb6556232938b3ba4d8fc4c7c129f795f312aaedf1e99",
- "positionFeeFactorForNegativeImpact": "0x0f09eb3de794846219c162423714c95efcb52241bf3495ba262a8b65a5f15077",
+ "positionFeeFactorForBalanceWasImproved": "0x493d7cf32315ed2576fdb6556232938b3ba4d8fc4c7c129f795f312aaedf1e99",
+ "positionFeeFactorForBalanceWasNotImproved": "0x0f09eb3de794846219c162423714c95efcb52241bf3495ba262a8b65a5f15077",
"positionImpactFactorPositive": "0x40cff93be7a95242a1789f12175aef67bc23fcc2daeab8753ea2bb08fed670f6",
"positionImpactFactorNegative": "0xf54c1402f09610ae072a8746966b94006d7c7a1de7eb44f47b7eb29fbaef02ec",
"maxPositionImpactFactorPositive": "0x786d142f5056003f1e7cd12b82c7954ac0f65b0ddeee41aaab69846be14ba1be",
@@ -1810,8 +1810,8 @@
"minCollateralFactorForOpenInterestLong": "0xffea67e6c99a9d19d8e0fc2310bfa16b75cdc3634fa319d67a8ddedd5aaaab29",
"minCollateralFactorForOpenInterestShort": "0x5b380cc5290171b8adb5730fc97eeaa8eb027e04035944e2ee6dd395cc26143f",
"positionImpactExponentFactor": "0xc883aaf52b8c7712b5e3de31516b99dddb2d07514d55d14f1a8ccde642ac9ffa",
- "swapFeeFactorForPositiveImpact": "0x54ed8f84ebf52a26785f7383623bfeea82c8602db2cec9305c72de8bb57c9880",
- "swapFeeFactorForNegativeImpact": "0x69273f9d47ea8b35c92c122a3100ed560284f8f1dd8a75144f5b184e13f2f88a",
+ "swapFeeFactorForBalanceWasImproved": "0x54ed8f84ebf52a26785f7383623bfeea82c8602db2cec9305c72de8bb57c9880",
+ "swapFeeFactorForBalanceWasNotImproved": "0x69273f9d47ea8b35c92c122a3100ed560284f8f1dd8a75144f5b184e13f2f88a",
"atomicSwapFeeFactor": "0xb3f675c4eda79a6a026b5204f3291148c4fd7aa5b441661d8c5b218f4f77689a",
"swapImpactFactorPositive": "0xff7b5bd53c1fed235757a116187bd94c2bfcc5dccf9c79d3afb485782a5a86e8",
"swapImpactFactorNegative": "0x2349db6b6cb6bc3749db19a55dfa7795476c7bfbb8ee0474769e5537adc48653",
@@ -1850,8 +1850,8 @@
"maxFundingFactorPerSecond": "0x6dd09fe578a0d2f802a55247f16e453c5e0975fe31470136c13f70b57707b47c",
"maxPnlFactorForTradersLong": "0x8e310d1456f3e834278f007a80efac7013d816f68aca59d6a478e049914ca1f9",
"maxPnlFactorForTradersShort": "0x1f09ebbd17b78d190303bc6331e789197fe9b781c767d947eefba5904256e90e",
- "positionFeeFactorForPositiveImpact": "0x5c0d2e79c65ad90be3dfb25475dbecdf197f86d6d288318a16ed53493201ba7c",
- "positionFeeFactorForNegativeImpact": "0x2705f2437c8e5e3bdfe0663ff0e749ea4d73671b89d2ec3e72626200b6b75c2a",
+ "positionFeeFactorForBalanceWasImproved": "0x5c0d2e79c65ad90be3dfb25475dbecdf197f86d6d288318a16ed53493201ba7c",
+ "positionFeeFactorForBalanceWasNotImproved": "0x2705f2437c8e5e3bdfe0663ff0e749ea4d73671b89d2ec3e72626200b6b75c2a",
"positionImpactFactorPositive": "0x9f78a2142db60a7d5eab84476a06f69252bb6e21e4b0fce2de8145e5b8765509",
"positionImpactFactorNegative": "0xf9f25ffd4b9320df0e661297bad0f80ce9ec7d0f2c672f70d8376da8e2bcdfcd",
"maxPositionImpactFactorPositive": "0x554195019be19dded2deebdf7bba714dedc29cf6194613468be1447e51a8aa7a",
@@ -1862,8 +1862,8 @@
"minCollateralFactorForOpenInterestLong": "0x4d83d368f9ff304adca7477a95605fca7d41bd25fb35ffdba3dc61e7bff2a83b",
"minCollateralFactorForOpenInterestShort": "0x62e8fc9c6e9f155895f43e9edcf84239b180c4e9737887a8b86545ada24195c0",
"positionImpactExponentFactor": "0xc2b2c25918334d3d885588d558503500beb43b71d72e9cb05e3e2b86e5bca6e5",
- "swapFeeFactorForPositiveImpact": "0x4fb41fdd043a724e464d95478c74670b21d3a4ea15c7c2e96269b41df178abc6",
- "swapFeeFactorForNegativeImpact": "0xfbaf2e48e418c8af4d690859073a3a79040c63c1f4b4cd1c41bae9a5787190ec",
+ "swapFeeFactorForBalanceWasImproved": "0x4fb41fdd043a724e464d95478c74670b21d3a4ea15c7c2e96269b41df178abc6",
+ "swapFeeFactorForBalanceWasNotImproved": "0xfbaf2e48e418c8af4d690859073a3a79040c63c1f4b4cd1c41bae9a5787190ec",
"atomicSwapFeeFactor": "0x7fd3db35948558ae1c117892536d43456b15a2bc8f4bdedf385a8de5ba9ae99c",
"swapImpactFactorPositive": "0x7459c01ebffc50f3aea8bf2ef8ab6cf36d2b2e7398811e79ae65b427c7a4cc45",
"swapImpactFactorNegative": "0x42f1b2dcd3ff9e25ca0ea9e9ae7ce948a668d2ac2ab3d078020a55ef96400ce5",
@@ -1902,8 +1902,8 @@
"maxFundingFactorPerSecond": "0xbb71ae099045fbdabdb856feee219f73d825249c1e141e62e4d6c8311d96850e",
"maxPnlFactorForTradersLong": "0x2cadfcd4e17d654ada050a5d994209e709d70637f6fea841b8c6dc6fa6b7dda1",
"maxPnlFactorForTradersShort": "0xa9d11314eb3f8f6667b2ce35bf54ba6007ef811471a03c2812901fc845968cb1",
- "positionFeeFactorForPositiveImpact": "0x6a8195663337d4db3cb56a6f8702a7aeb0b9a25864376dfa9727b59bf15fa1a0",
- "positionFeeFactorForNegativeImpact": "0xd732b50d5a27eeeb3c9f13320266b5c0f48a4cf28bd08ee3341e5d17ef6a57a2",
+ "positionFeeFactorForBalanceWasImproved": "0x6a8195663337d4db3cb56a6f8702a7aeb0b9a25864376dfa9727b59bf15fa1a0",
+ "positionFeeFactorForBalanceWasNotImproved": "0xd732b50d5a27eeeb3c9f13320266b5c0f48a4cf28bd08ee3341e5d17ef6a57a2",
"positionImpactFactorPositive": "0x99695421d96317555b37f315cdf03725584fda95559fb3c6d3adca06c38d23de",
"positionImpactFactorNegative": "0xc4c5609be5dd555ca967fe416a04fd54438a86edd4f859a111207dfc9ec9ed1e",
"maxPositionImpactFactorPositive": "0xb24b2729d4b986448d34d3161d59c59e280251393ce4262181a2bf7b70e645a4",
@@ -1914,8 +1914,8 @@
"minCollateralFactorForOpenInterestLong": "0x2352a72b34e744b19d46183f2e17312f8c6d8e6e55ee031745c01426f29f46ec",
"minCollateralFactorForOpenInterestShort": "0xcb4811e66720bbc8c900831dbe35327485a8fa6aa48d94e28be4ad20e7cfeb05",
"positionImpactExponentFactor": "0x335695a5a27844054e1229edd8c203f61834fdae52a2761be583d5a8b2d87f5f",
- "swapFeeFactorForPositiveImpact": "0x0dbec8f5dddc19030eadf103f8d951bb8a586ec11a30f86b8fdf75d565d9ac58",
- "swapFeeFactorForNegativeImpact": "0x59d63cc7ab7a3dff92097678f7a98e7f1a3cf7a97616b312e871fc39bcf673df",
+ "swapFeeFactorForBalanceWasImproved": "0x0dbec8f5dddc19030eadf103f8d951bb8a586ec11a30f86b8fdf75d565d9ac58",
+ "swapFeeFactorForBalanceWasNotImproved": "0x59d63cc7ab7a3dff92097678f7a98e7f1a3cf7a97616b312e871fc39bcf673df",
"atomicSwapFeeFactor": "0x85a84c358cc5dfa7d09a8dabc2856e21e985b799c3eeb59371c15d87a4517059",
"swapImpactFactorPositive": "0x461a95b066cf6086852497f137b3ea75bd3ffec0796c7d9400c8e5a92037d7cc",
"swapImpactFactorNegative": "0x499433d197d5305ea41dc1d247e491dd6975ce88fab6979e485537a86d043d6d",
@@ -1954,8 +1954,8 @@
"maxFundingFactorPerSecond": "0xcf7b665da2d105bcb27781fe68c363db8732c0794e0df27ca9c2bcb907990433",
"maxPnlFactorForTradersLong": "0x284fd994c8c1361d712bbfe0bef917ebe7486477cda2bb8c3d17ced46552f834",
"maxPnlFactorForTradersShort": "0x3a1cca2b9c435bad26e1ff77b841a349feaabd02386f9e7b2d58a14b3c69aa1b",
- "positionFeeFactorForPositiveImpact": "0xe21f27a70af775536902487c5ce88233c67cf0c743555b8490ef2483150513ba",
- "positionFeeFactorForNegativeImpact": "0xa665c582bf2cd99dc19fb0302fad3c4ed2ed0e7423e288d22ff13816351a93a0",
+ "positionFeeFactorForBalanceWasImproved": "0xe21f27a70af775536902487c5ce88233c67cf0c743555b8490ef2483150513ba",
+ "positionFeeFactorForBalanceWasNotImproved": "0xa665c582bf2cd99dc19fb0302fad3c4ed2ed0e7423e288d22ff13816351a93a0",
"positionImpactFactorPositive": "0x32beb3676955e674bfa936e22b7e4c93a75a451387f996c4248243cbe1d323c5",
"positionImpactFactorNegative": "0x0b90f13784d0f8129e986101813c02d873aff0fd427569138444995f46e6e662",
"maxPositionImpactFactorPositive": "0x19a1bd926c6151f48a05d3aac08ff880ab7bc87a6ed2b5292569196a64c4a525",
@@ -1966,8 +1966,8 @@
"minCollateralFactorForOpenInterestLong": "0x17278babb19736222b2d9de676d18653ddf62c086d3665741aea4e5073e56fc6",
"minCollateralFactorForOpenInterestShort": "0xd5a1fad8da19fe7337b65624c25c09577ce75115b54770ff38ef6bb95dda326c",
"positionImpactExponentFactor": "0x804b39a27e2dd8f1ff7b9c8b9e8c617f279de79423a04c8fa048b1a7d04e0a87",
- "swapFeeFactorForPositiveImpact": "0x19c203129972249281a0b60e7b622a8d66a1d7bf798dc42ac056684d96e71805",
- "swapFeeFactorForNegativeImpact": "0x323d04891a07265a4b585037fdbdb85d79170c22cd5f34dc3864039d93a1a6c0",
+ "swapFeeFactorForBalanceWasImproved": "0x19c203129972249281a0b60e7b622a8d66a1d7bf798dc42ac056684d96e71805",
+ "swapFeeFactorForBalanceWasNotImproved": "0x323d04891a07265a4b585037fdbdb85d79170c22cd5f34dc3864039d93a1a6c0",
"atomicSwapFeeFactor": "0xcf9a0b348c47c4c56342906d69d1ee4c2fc385c51a90629ff71a814173c6984f",
"swapImpactFactorPositive": "0xa71869892b9b6533e98daebca840e5d5536dc60b02f242dd2aa099f47e3a36bb",
"swapImpactFactorNegative": "0x4179e67be0eb7afc3c56a4d16854b7b691f85c5592c3c13c743bbfe2e519a76c",
@@ -2006,8 +2006,8 @@
"maxFundingFactorPerSecond": "0x236ef1bb27f759ec8f3561653ffe9db18a8bd37b5414d803ea24ffef8db7e1f6",
"maxPnlFactorForTradersLong": "0x28c6560a3d84672c3d84081988ff32450a9f1b417062644ea4ae62ea4ddfbe59",
"maxPnlFactorForTradersShort": "0x727dddeb2f67de8636f5e9dcc0dfab740c594b2c6464457e3ee6ac5e05c155c8",
- "positionFeeFactorForPositiveImpact": "0xb8130da30b2d52f0da6b00cca4d6e27796e8e29cc770424d81830d468f6e46ab",
- "positionFeeFactorForNegativeImpact": "0x86619920b9bd2a757bdb46082f9e7814b07b346b85ec327426e81ed2b98c9512",
+ "positionFeeFactorForBalanceWasImproved": "0xb8130da30b2d52f0da6b00cca4d6e27796e8e29cc770424d81830d468f6e46ab",
+ "positionFeeFactorForBalanceWasNotImproved": "0x86619920b9bd2a757bdb46082f9e7814b07b346b85ec327426e81ed2b98c9512",
"positionImpactFactorPositive": "0xe9a08eac13757d3e3c9ec273c660957e20735fe6b0fbb100efa42fd2dc103e03",
"positionImpactFactorNegative": "0xe3a1c8fa81526ad49a0e29a269d6322584f06fc8360bdeffeac122ce5bd71412",
"maxPositionImpactFactorPositive": "0xc5830d4233c3c4b40396b597456329984dd1fa00d54ccc6a0ff3ed8ad24318ed",
@@ -2018,8 +2018,8 @@
"minCollateralFactorForOpenInterestLong": "0xbf0cbbcddabe14afa33f3d923e06fc7c713ad118078f7e77f3d2bb9a8d648619",
"minCollateralFactorForOpenInterestShort": "0xd54c4e668acaeb80926b6c76790870e89a47e80823955189e02c504021ada729",
"positionImpactExponentFactor": "0x0d0b5deb037a6e299a4f6746578fb10d363fcdbb8f713c4194e64cb0344002b0",
- "swapFeeFactorForPositiveImpact": "0xa766d46faa67189be6ffb6615e6ea31a5f403e8ece029a45b4cd3eeb08cbe02c",
- "swapFeeFactorForNegativeImpact": "0xab3e9d384304687b4fcfaf1fa93376f0f72ba120fc0511f2d7f009e7e46622f2",
+ "swapFeeFactorForBalanceWasImproved": "0xa766d46faa67189be6ffb6615e6ea31a5f403e8ece029a45b4cd3eeb08cbe02c",
+ "swapFeeFactorForBalanceWasNotImproved": "0xab3e9d384304687b4fcfaf1fa93376f0f72ba120fc0511f2d7f009e7e46622f2",
"atomicSwapFeeFactor": "0x7c769c06dc7c6a4ac6f4e0848dbaf356ad5fc344dd59201cc5f9970f51f7a105",
"swapImpactFactorPositive": "0x13eda227af6bd9bd0817e3771f202173a24574f81d1ae84a0b394fcf675dfa8e",
"swapImpactFactorNegative": "0xd5d924bf90f87618ba23759e1df30db025573ec12a4af3940533c4f03cad76ad",
@@ -2058,8 +2058,8 @@
"maxFundingFactorPerSecond": "0x2d6fd46347386695821f8183b44b3c52e4adb3e05d21baed6c3ee136c929634a",
"maxPnlFactorForTradersLong": "0x42206deb102983b56125efa6b7a1a9a91c9718f60f6c08ed39086d427a01c070",
"maxPnlFactorForTradersShort": "0x5d6715d11e8d236acf70c9866d3d10e50d66db002aa8af4daf308319e839c55a",
- "positionFeeFactorForPositiveImpact": "0xe6e6eeaa3e7c8031ae37ee72d1fffa975b364d1c44f948e43af20211f346eafe",
- "positionFeeFactorForNegativeImpact": "0x4f59fabf762b3e86dd3205e0f99ca9b63b08c14c90e0d50bef53f10df085a060",
+ "positionFeeFactorForBalanceWasImproved": "0xe6e6eeaa3e7c8031ae37ee72d1fffa975b364d1c44f948e43af20211f346eafe",
+ "positionFeeFactorForBalanceWasNotImproved": "0x4f59fabf762b3e86dd3205e0f99ca9b63b08c14c90e0d50bef53f10df085a060",
"positionImpactFactorPositive": "0xd38ee3b78399bc9248c38814306468884b4fc7516eeec324cd19733ceefc652a",
"positionImpactFactorNegative": "0x6ec836bdd3077fc5d55b47e37b5adb4451d7a355521c503092cfd8ab8860c6f4",
"maxPositionImpactFactorPositive": "0x2d159b4e62a983c5c028f2c9257af7d9dc7813e54bb7ec68cb5abe37af1f8509",
@@ -2070,8 +2070,8 @@
"minCollateralFactorForOpenInterestLong": "0x4e55b36b90bb86b6c710c7a94743860cf086374614e1de9788b5d60f6f2af678",
"minCollateralFactorForOpenInterestShort": "0x0c8510fa2a221d973bba3edcb9353a25738e7d0e3a217a5618077208ed4df0da",
"positionImpactExponentFactor": "0x142524c8e6b264412253aab7e884fea1fcf5610232b882cebb399d9d5a20adfe",
- "swapFeeFactorForPositiveImpact": "0x8882eb6d03e0ebad72e73c10506efbfb2062a15fb87ef045b2a5da71e2807ce0",
- "swapFeeFactorForNegativeImpact": "0xf572e75310cd3f77b9a3f87cf5815f0a95e7c97841906d11ece78caf827475b3",
+ "swapFeeFactorForBalanceWasImproved": "0x8882eb6d03e0ebad72e73c10506efbfb2062a15fb87ef045b2a5da71e2807ce0",
+ "swapFeeFactorForBalanceWasNotImproved": "0xf572e75310cd3f77b9a3f87cf5815f0a95e7c97841906d11ece78caf827475b3",
"atomicSwapFeeFactor": "0xc9ba772087f3c8e13388048b4fa1b89c1f85215090717860d20c0b6fd5864356",
"swapImpactFactorPositive": "0x2c164a61e689a8a81aeda0f29bff44d8a7f2d8895878c64b4e41c5aab8c4389d",
"swapImpactFactorNegative": "0xb88ad88aaa77586d993ed016bbee3584738069ab1f80fc3f7d9a8544cd6b6916",
@@ -2110,8 +2110,8 @@
"maxFundingFactorPerSecond": "0xc054005cc2f37c32e1ef3b76b389a7ee9bf66a860b8b46bb02614b59630502c2",
"maxPnlFactorForTradersLong": "0xa94654778e8d045b745c37d4949fca238c14141ffb3f39955f72692d7723420a",
"maxPnlFactorForTradersShort": "0xc353eb203a1beb0be8441b249a43981a15bd0a6841bab87b3ca6fb9ca1228935",
- "positionFeeFactorForPositiveImpact": "0x797f04bc0775c8db2983c4b6a39a9ff455e6074fa15d697b497ed9a0323bdbb1",
- "positionFeeFactorForNegativeImpact": "0xd714718d551b78772cb65cfe1a4c6f8bb77cc66af359c92adf8568ff6a15f033",
+ "positionFeeFactorForBalanceWasImproved": "0x797f04bc0775c8db2983c4b6a39a9ff455e6074fa15d697b497ed9a0323bdbb1",
+ "positionFeeFactorForBalanceWasNotImproved": "0xd714718d551b78772cb65cfe1a4c6f8bb77cc66af359c92adf8568ff6a15f033",
"positionImpactFactorPositive": "0x3c21979d6fa1a52812bbea6ed9c4e45edc07fb528d1288d8dc454da59655d385",
"positionImpactFactorNegative": "0x9add40936e4063e215522e32a8ae7847e0db2e8b27b4db0284f3f3f9401b808b",
"maxPositionImpactFactorPositive": "0xac08965b798a991c076440d2e2678d2e18bf6a22c4a1b7323eefbd345cbf2ddb",
@@ -2122,8 +2122,8 @@
"minCollateralFactorForOpenInterestLong": "0x36e72daab303600b4522ff9c0d0bb9a1eaf31c1cce97b8ae17084f0ebefe5924",
"minCollateralFactorForOpenInterestShort": "0x93a0ba9c685fab64917a6ab1a5e27dff7537836ea12f0c7645c76abd965d21e4",
"positionImpactExponentFactor": "0x78b509b0ba1718dc95363e99b4b27fbc80a15ff26f4c7af4d09bff22b4708a36",
- "swapFeeFactorForPositiveImpact": "0x1bb948b925f5b0890197e4a96a36efa3405166da0bb37057376b1c9afc67a1f9",
- "swapFeeFactorForNegativeImpact": "0x3936d99bd3d40af388a17a62030f9472559e4073150a3b7df3e29aa7b5652a9c",
+ "swapFeeFactorForBalanceWasImproved": "0x1bb948b925f5b0890197e4a96a36efa3405166da0bb37057376b1c9afc67a1f9",
+ "swapFeeFactorForBalanceWasNotImproved": "0x3936d99bd3d40af388a17a62030f9472559e4073150a3b7df3e29aa7b5652a9c",
"atomicSwapFeeFactor": "0xc1251742314a5c7bbc29fc0d0ae9f882f422cfbefa2b4cef4b1094e2ee40240d",
"swapImpactFactorPositive": "0x43fd312437e0556e2d89f99e604d50d1ed9c4b02d4e9804bf69d8c71c1ff2928",
"swapImpactFactorNegative": "0xe5ea472c4d680fd020ee7c372c33683a5739fb3822fe39d969f07cbe4167bd0d",
@@ -2162,8 +2162,8 @@
"maxFundingFactorPerSecond": "0x7c7d2c063e2459eab3f0b4617d9a10deef46d0b92fd039e83e83ab508de22dbb",
"maxPnlFactorForTradersLong": "0x88880540378c25ab3984cf20f61798200656efa0a6df24c9848bbb980be23a17",
"maxPnlFactorForTradersShort": "0x7c292ade526b200d6dab2668fd249b4e1c8462c4fee902f3d8b5dd10438a0297",
- "positionFeeFactorForPositiveImpact": "0x60b0929e249f03887b7653b500ef4fd2f72f5338f946b5a9b4243ffbde989eb7",
- "positionFeeFactorForNegativeImpact": "0x2b9925b6789771e207b9223ca7476cc9fbc5b742a243e5b7cb4e836a20817807",
+ "positionFeeFactorForBalanceWasImproved": "0x60b0929e249f03887b7653b500ef4fd2f72f5338f946b5a9b4243ffbde989eb7",
+ "positionFeeFactorForBalanceWasNotImproved": "0x2b9925b6789771e207b9223ca7476cc9fbc5b742a243e5b7cb4e836a20817807",
"positionImpactFactorPositive": "0x2758725c04034379168a8d828ed91d9d3e855a2d10aff4dd54326b154d640a15",
"positionImpactFactorNegative": "0x51783acf88ad8bb641add39a04bea27fe7715c01fa0ebdbe7ef3f72d473e2fc5",
"maxPositionImpactFactorPositive": "0x8c12b034ee8ad6fc1164338e82528933622843f83631cef944038173ec07125f",
@@ -2174,8 +2174,8 @@
"minCollateralFactorForOpenInterestLong": "0xb1f9e034cd8013cd53cef9f0bdec7c7bdbc4db862e555e88eb9d1cf5e6511956",
"minCollateralFactorForOpenInterestShort": "0x20b6d2f9b79b868e1524b9e961bab3641f9f799c6d97d63911dea52d70c5cada",
"positionImpactExponentFactor": "0x9f1b87272507fe9ec122c5535383fff447e2ebf7c92121965b17bf0f4184fd41",
- "swapFeeFactorForPositiveImpact": "0xadd2c67471f951b61e2eff6f7decbdf8c2ef20f48059afcbdea87d9a435d01c5",
- "swapFeeFactorForNegativeImpact": "0x31edee4dfd4291a0492f60b88b76f2f0752edfe619e20e30710894daac78e1ca",
+ "swapFeeFactorForBalanceWasImproved": "0xadd2c67471f951b61e2eff6f7decbdf8c2ef20f48059afcbdea87d9a435d01c5",
+ "swapFeeFactorForBalanceWasNotImproved": "0x31edee4dfd4291a0492f60b88b76f2f0752edfe619e20e30710894daac78e1ca",
"atomicSwapFeeFactor": "0xaa1e103bf62db569d5534ff50ca53b37314f09c697813b0f9d753cebcb252601",
"swapImpactFactorPositive": "0x36e871427ac1ce490403c9351e871024aaee072fa90fafeea3a09ee1296c5100",
"swapImpactFactorNegative": "0x6a34903a427c705b14eebd04e3d807ce9465c22b28c84ae75b83b142bc0e34ab",
@@ -2214,8 +2214,8 @@
"maxFundingFactorPerSecond": "0xbc1f8614236a23d18e95db9ce4af307af690e5ab8206ffea12ca642c6cd6dea7",
"maxPnlFactorForTradersLong": "0xcbb5ee9549df2459619925fd79c95020edd6b39393c707c37ca096d31570720a",
"maxPnlFactorForTradersShort": "0x4e7efb010dd37130af7c8133f32a850a2390afd139b7893e47fb75df081b7eea",
- "positionFeeFactorForPositiveImpact": "0xb65ad101925e7990ccca3a06feb91cffe0d80cbcb201841f6b5b7ca816079b4e",
- "positionFeeFactorForNegativeImpact": "0xef6385c6a2f181806f748dd22a2c0ccc32882d9fb08e7747514a1b41929100fa",
+ "positionFeeFactorForBalanceWasImproved": "0xb65ad101925e7990ccca3a06feb91cffe0d80cbcb201841f6b5b7ca816079b4e",
+ "positionFeeFactorForBalanceWasNotImproved": "0xef6385c6a2f181806f748dd22a2c0ccc32882d9fb08e7747514a1b41929100fa",
"positionImpactFactorPositive": "0xc2acf82f196514ddbcfb4250e4aaf2765fb3fda2f0e09da76e552cef2f83a8fa",
"positionImpactFactorNegative": "0x78bf708597d31ecf8d57abcec8dabfa5c0d21147ac154d5d288f5c20f5f220c6",
"maxPositionImpactFactorPositive": "0xb0a73010ecdba53705c694d2f936d18e4a05df0f17c700bdace6271ca813c9a3",
@@ -2226,8 +2226,8 @@
"minCollateralFactorForOpenInterestLong": "0x43fd25f73c5ad7cfa51e170a8e62c4b5267f167b881d77c8db40d0fff9b0cbfd",
"minCollateralFactorForOpenInterestShort": "0xbe919143794d2b200798bb5ce729615b2c0da3f4918a5928f7020ea6fd19899d",
"positionImpactExponentFactor": "0x68e38c9e7e097fb2dca604ab440cc4c81ec75b7cb19de8a626c93bd00019e02e",
- "swapFeeFactorForPositiveImpact": "0xed597aacfcc0d2c97088b29821bc7c5481db8decbdc266300b3998ae014dba2c",
- "swapFeeFactorForNegativeImpact": "0x605173de6a0cb1f167f584339ff5b46851ceff4ddd725a1db918231f9912a43b",
+ "swapFeeFactorForBalanceWasImproved": "0xed597aacfcc0d2c97088b29821bc7c5481db8decbdc266300b3998ae014dba2c",
+ "swapFeeFactorForBalanceWasNotImproved": "0x605173de6a0cb1f167f584339ff5b46851ceff4ddd725a1db918231f9912a43b",
"atomicSwapFeeFactor": "0x572c7a723c1c49a0e78bd8ffa219de256d375f1098f3accf55ca7c0d303d141e",
"swapImpactFactorPositive": "0x208c6acc0507566d2cb55884616eee785678beeba5542607b18d32de7007639e",
"swapImpactFactorNegative": "0xbc075ce4fb66dc695cd10edf51e201ae23591004d823be69ee8ad5ab0ccf87f5",
@@ -2266,8 +2266,8 @@
"maxFundingFactorPerSecond": "0x5d86ad2a0ee3b0f58abf8bb7c1aa17dc35b005d746a5b027877a3d0ef626ee1c",
"maxPnlFactorForTradersLong": "0x23941bc4b4dbc0978d113bb410060704c55e1a0adb646b54e5a3de1c46715451",
"maxPnlFactorForTradersShort": "0xa854cfc761aecf46ad9aba88804d4ea337d88de6716e057ee78c6774832fd66a",
- "positionFeeFactorForPositiveImpact": "0x8feb0270a20287d1a5124b49803492bfae97c6b5638dc765bbf3114a5439b54a",
- "positionFeeFactorForNegativeImpact": "0xf4fd4b73132ab0990fec091ab4316539ebc88b4981c0449fdb89f91d0cb90b49",
+ "positionFeeFactorForBalanceWasImproved": "0x8feb0270a20287d1a5124b49803492bfae97c6b5638dc765bbf3114a5439b54a",
+ "positionFeeFactorForBalanceWasNotImproved": "0xf4fd4b73132ab0990fec091ab4316539ebc88b4981c0449fdb89f91d0cb90b49",
"positionImpactFactorPositive": "0x495905a35817f5fff10ae3f21225d5e5522efded696273bf51f1669dd880ca91",
"positionImpactFactorNegative": "0xd9f43c76d06fc8135a75b267ffb77032a20aed233064fe4a1cdace0201339441",
"maxPositionImpactFactorPositive": "0x01e8f1ec1cca444aff7fb4841c5e04551eca12a3e3f40d802057aea21b946eec",
@@ -2278,8 +2278,8 @@
"minCollateralFactorForOpenInterestLong": "0xb41bba385bea8b61ee3a31a77f9b22ca93ddd1ddd4c0b2122a1479c41245a918",
"minCollateralFactorForOpenInterestShort": "0xa3cfc4f602f38bf736284ff16d11b328ba89cdf571d87a27d801101fe18a89d3",
"positionImpactExponentFactor": "0x4717cfc01a1a24ef675701768beb7343fad800404065332a016f33c3fec290d8",
- "swapFeeFactorForPositiveImpact": "0x712f5742039b496858cdc383ea6f4f6db9dafd98bd4bc0682e8bec1036758869",
- "swapFeeFactorForNegativeImpact": "0x39ff0ec8537e6c67dc3aeb20d22f14835a509939dd4c2535b1d83677bdb58dfd",
+ "swapFeeFactorForBalanceWasImproved": "0x712f5742039b496858cdc383ea6f4f6db9dafd98bd4bc0682e8bec1036758869",
+ "swapFeeFactorForBalanceWasNotImproved": "0x39ff0ec8537e6c67dc3aeb20d22f14835a509939dd4c2535b1d83677bdb58dfd",
"atomicSwapFeeFactor": "0x70b27f118f4f8264a881ff28afcf50d90a22ddd062536d52cfc0c09831ce599d",
"swapImpactFactorPositive": "0xf36010feb1e7e5bf88eba48c62b7cdc9a00bbd23007f4afb33cc373619624b2c",
"swapImpactFactorNegative": "0xfb915dffefd667c9f6211dad9e8b7236026971701504f4c5b591c964d750c9aa",
@@ -2318,8 +2318,8 @@
"maxFundingFactorPerSecond": "0x2f69beeaf53db976baa8d119d7c271708c4813cf85476d76004568544ef32779",
"maxPnlFactorForTradersLong": "0xa2800b3ce78a5d0389732d81038e88feff40e3bd49f09ffee56811f40ee38803",
"maxPnlFactorForTradersShort": "0x1450231125af74d89355c10b08e1244c6930ae82e7c6a43f541a02c87e85b32c",
- "positionFeeFactorForPositiveImpact": "0xbc139966b077397a4c0f20ac3b08651b6c91952888bf60fc6b03879a297c4b4a",
- "positionFeeFactorForNegativeImpact": "0x4dd266ff9795afbab0849ca9b10a61a56f7b9b3df788cdd4a427a615d9ef59e8",
+ "positionFeeFactorForBalanceWasImproved": "0xbc139966b077397a4c0f20ac3b08651b6c91952888bf60fc6b03879a297c4b4a",
+ "positionFeeFactorForBalanceWasNotImproved": "0x4dd266ff9795afbab0849ca9b10a61a56f7b9b3df788cdd4a427a615d9ef59e8",
"positionImpactFactorPositive": "0xb5dfa58ab68838cfab396a23a6458a19b08332f7a04cebb1c6f71f2821947e9a",
"positionImpactFactorNegative": "0x56823d6116f0891a5d4838c542ef05dc745c9ae5c68f9a99f22a8b55b4d230f7",
"maxPositionImpactFactorPositive": "0x1ceebfd867b9918efbe8423ec199d06ce78ca441d305aa9662d3764ab7a9faf5",
@@ -2330,8 +2330,8 @@
"minCollateralFactorForOpenInterestLong": "0xc777cb82bf5fcf2085423ebb02d83a2e797ee69fe92e28bb541585d6d3ef9776",
"minCollateralFactorForOpenInterestShort": "0xea1786adf77d76ecc08ae1ddfb961397bbf8037fcc1f39f407ca682bd0cd31d2",
"positionImpactExponentFactor": "0x9fb394e7a8ca562a80c61ff34aafa3780f223eae1c7bab55bdd65f3e74d7c10d",
- "swapFeeFactorForPositiveImpact": "0x8fe25e4cd1a3645c942c5754cb52f61d884f867f40c795ac14d8c0c4cb5a58f0",
- "swapFeeFactorForNegativeImpact": "0xfe43f1671a9753bc846216959f80192c4bd06d228525f64f1bb0ec0b21616e08",
+ "swapFeeFactorForBalanceWasImproved": "0x8fe25e4cd1a3645c942c5754cb52f61d884f867f40c795ac14d8c0c4cb5a58f0",
+ "swapFeeFactorForBalanceWasNotImproved": "0xfe43f1671a9753bc846216959f80192c4bd06d228525f64f1bb0ec0b21616e08",
"atomicSwapFeeFactor": "0x98488815b3e5a70a0181740e0bd65220f81a07d1c039b338bbe14abe54844499",
"swapImpactFactorPositive": "0x79e2b21fccda79427457db054b84bc2dd39d6e71e802603330463debd9e2cf2e",
"swapImpactFactorNegative": "0x3fb93539d5a21b0bfb035b684c90c976559174c5b3cb61a31eda7052cd0a8df8",
@@ -2370,8 +2370,8 @@
"maxFundingFactorPerSecond": "0xc99b408fa3abdf793c7508311103c10f75b6459450a8f7ba205fbc854f11848e",
"maxPnlFactorForTradersLong": "0xdec4bd5c55d0af82123c937bd7b6f886e517f0c7e1c940459a068e346a47fa1a",
"maxPnlFactorForTradersShort": "0x99a75d71a9aa0d00fde825a755f89eea3f4fb0c905591fdfe52f37099e98c49e",
- "positionFeeFactorForPositiveImpact": "0xdde7cf99fc26d3c9e7e5ae67f7558d1d21fabe5b5881f645ecd574acbc1e999e",
- "positionFeeFactorForNegativeImpact": "0x5c6320bcdc9efacd98b6a01febab34934936dd529ac3c8158b58232b6692cdba",
+ "positionFeeFactorForBalanceWasImproved": "0xdde7cf99fc26d3c9e7e5ae67f7558d1d21fabe5b5881f645ecd574acbc1e999e",
+ "positionFeeFactorForBalanceWasNotImproved": "0x5c6320bcdc9efacd98b6a01febab34934936dd529ac3c8158b58232b6692cdba",
"positionImpactFactorPositive": "0x12350a6709e67181b6145c62f115ee66069858250ea4eb2b0dec9ee9da2f1a49",
"positionImpactFactorNegative": "0xc7c8e8dd75f9b18d858379050bfcddc53b2f2d1f7092df2a35e079bc529dfb85",
"maxPositionImpactFactorPositive": "0x66f52be66a69bc53a3985ef3c01c7c7906e8b0ab5b51f155f5fb827401b8c716",
@@ -2382,8 +2382,8 @@
"minCollateralFactorForOpenInterestLong": "0x3e352a600ba2709aa41ad9fe571943bf3119a5d4e2ed56b8d9c26f6b61c24df4",
"minCollateralFactorForOpenInterestShort": "0x74cd50f69586972d5835b60030fc59197abcd83dc5ed4952cf7211769bf9303c",
"positionImpactExponentFactor": "0x5be4f5dd05e107edd86e920723f94647246b593d1e08b704e42721024d182c3c",
- "swapFeeFactorForPositiveImpact": "0xb7614344f2d22e57b6d2476711c7aad17d112f92c7f0b87606553bffaa0e7588",
- "swapFeeFactorForNegativeImpact": "0x3c744c1515881778c9d315637561923c3d185bb0922e2816b2672425cf9c942f",
+ "swapFeeFactorForBalanceWasImproved": "0xb7614344f2d22e57b6d2476711c7aad17d112f92c7f0b87606553bffaa0e7588",
+ "swapFeeFactorForBalanceWasNotImproved": "0x3c744c1515881778c9d315637561923c3d185bb0922e2816b2672425cf9c942f",
"atomicSwapFeeFactor": "0xb1d430a0cefc57e981a25023afc486a84ea4adff0e5dc45ed25b930df872e0c6",
"swapImpactFactorPositive": "0x88f491f2b910faaca2409fa56898c9873596d94f61459a799f22aed18c3f0024",
"swapImpactFactorNegative": "0x063d716f2663e42baa3255283db6cadd96bc6e066eea5397683e050758613f72",
@@ -2422,8 +2422,8 @@
"maxFundingFactorPerSecond": "0xe567c9d6c7b881eadf4a419a3f7a800435fac673e27db053fda52f9513755994",
"maxPnlFactorForTradersLong": "0x9cbacb634cf93a6fa613b31a68ce1ded9aca5143679ab689a82e9bbfc7c8783b",
"maxPnlFactorForTradersShort": "0x8de9a79752873cb14006e67313ab378ec606bb658c2d296b165bf145345a2593",
- "positionFeeFactorForPositiveImpact": "0x8e33a75ecab6ae62818b3a34b74cecec08237ff1bdee24a6df2afee80d3cf513",
- "positionFeeFactorForNegativeImpact": "0x5fc7dc3aabe90cf80ba4506802d75ca1fb6af53d099cd8d4526168b0ccd7db5a",
+ "positionFeeFactorForBalanceWasImproved": "0x8e33a75ecab6ae62818b3a34b74cecec08237ff1bdee24a6df2afee80d3cf513",
+ "positionFeeFactorForBalanceWasNotImproved": "0x5fc7dc3aabe90cf80ba4506802d75ca1fb6af53d099cd8d4526168b0ccd7db5a",
"positionImpactFactorPositive": "0xfc9f106532cffec12b6d284757fb145910b0ec592a415c981d5fe42f068d661e",
"positionImpactFactorNegative": "0x6db1edf5d6b901c21934667c8dbbfe802f182c1572aec99759ea829a18554844",
"maxPositionImpactFactorPositive": "0xcdbb8852bd100d2a2c9e96c3df6c8a3a1fa5166d2b0e6c0a026ff47efdfcec3d",
@@ -2434,8 +2434,8 @@
"minCollateralFactorForOpenInterestLong": "0x1b990975b2ec9cb3d7800bdcf4c2483ad891a580d9bb318b533b40c52c2f9ba8",
"minCollateralFactorForOpenInterestShort": "0xa7ab6290b680865cdb9d52ee69ecbff08162372ac6787a60fa23c1576752b9ef",
"positionImpactExponentFactor": "0x4e8013515d6c6158dbe6773d5523bd3aa689ceca388b13daebe66b8535a1141d",
- "swapFeeFactorForPositiveImpact": "0xe7891c63da843b7666b5eb17a233335244d607ef5e28491ff80a739409753cc1",
- "swapFeeFactorForNegativeImpact": "0xff76682edc62a55d824fb3027104a8eeefc1aedcefe710468bda4a16e940df65",
+ "swapFeeFactorForBalanceWasImproved": "0xe7891c63da843b7666b5eb17a233335244d607ef5e28491ff80a739409753cc1",
+ "swapFeeFactorForBalanceWasNotImproved": "0xff76682edc62a55d824fb3027104a8eeefc1aedcefe710468bda4a16e940df65",
"atomicSwapFeeFactor": "0x53fb9a87309e0503a17a7cb3eb74b75cde5bd7b36a87ca33a03323ea8fed03ea",
"swapImpactFactorPositive": "0x914773be0246bae3852f2415f162581641c3fcbff05d9f9968dc8831bf8182c0",
"swapImpactFactorNegative": "0x736841319b2b2e9d22670e879ec64651e9e2ffd751de069908bc1edbedd8d0d7",
@@ -2474,8 +2474,8 @@
"maxFundingFactorPerSecond": "0xaeb94b425d4f56f779214c9f9e87c4ee626cc51a74837db1a49b47432059c161",
"maxPnlFactorForTradersLong": "0x1faad52e65ed438f621fcc8af05068c362aa4ff4c660f93606ad9fa95d5aa83d",
"maxPnlFactorForTradersShort": "0x23729526acd13b670a94585d21a25c4293bb7b5fb8f1ebedb8af840b2d984b4b",
- "positionFeeFactorForPositiveImpact": "0x25c6091da422459bf8e56ea2176383d6a14ab920c5a588df462db76cf3da7d69",
- "positionFeeFactorForNegativeImpact": "0xe8c215ead248d58af1e22f00e423ada0096f747e49179f83f4c8bcdf9bb010d7",
+ "positionFeeFactorForBalanceWasImproved": "0x25c6091da422459bf8e56ea2176383d6a14ab920c5a588df462db76cf3da7d69",
+ "positionFeeFactorForBalanceWasNotImproved": "0xe8c215ead248d58af1e22f00e423ada0096f747e49179f83f4c8bcdf9bb010d7",
"positionImpactFactorPositive": "0x2511daf43d5a9e3063f5e74f46def864a7d94cac6b5430bde3553e0bf2f920d9",
"positionImpactFactorNegative": "0xd994d099044c3dff63fb5cd824e94e19ed41dbf6d984c2635aa607257de07f56",
"maxPositionImpactFactorPositive": "0xb6030074cf76d818b5e23fff7d930392bdfaff530804a4c269f43ea0c743bdcb",
@@ -2486,8 +2486,8 @@
"minCollateralFactorForOpenInterestLong": "0x7aba0e66c4752d2788a33b21c7156bee0a7e7db1ddec971a23e4745cb4af6a44",
"minCollateralFactorForOpenInterestShort": "0x7877dc6df20ea3c1896337e048ee1dad2b313d2753a43186a3d574f71f06069c",
"positionImpactExponentFactor": "0x15f86469a0ce25e4d194855ed6445f3c23aea50cb148f365967050da0ce93cde",
- "swapFeeFactorForPositiveImpact": "0x4db5b6b4f93926225227f3e2887f72c9730b813d441fe6ce335cacd22f2461d4",
- "swapFeeFactorForNegativeImpact": "0xac158b78400849537bf0f83aade16c435943f4194a4767e602aca8c41e366e77",
+ "swapFeeFactorForBalanceWasImproved": "0x4db5b6b4f93926225227f3e2887f72c9730b813d441fe6ce335cacd22f2461d4",
+ "swapFeeFactorForBalanceWasNotImproved": "0xac158b78400849537bf0f83aade16c435943f4194a4767e602aca8c41e366e77",
"atomicSwapFeeFactor": "0x8dc037ec9bd8964e45b14319b948aa9956a0c8db71bd5a78d1d06130e76ebae5",
"swapImpactFactorPositive": "0xa3b7813df6db3b7ed3edef24c4e1955bd5e9062c80ff1abdb528cd2c550e8abd",
"swapImpactFactorNegative": "0xa77511e977f042648b2b03ea93d721a59db658e5437b141a25987849ea22dea2",
@@ -2526,8 +2526,8 @@
"maxFundingFactorPerSecond": "0xa738498ce60a1e9fb8a472d19570e7f4d00f74c31c36a97b171f906801db7c7b",
"maxPnlFactorForTradersLong": "0x47aed923299f3fc09a40d6edc10f33df888b0ad47bfb0310fc4c733d2ca23d69",
"maxPnlFactorForTradersShort": "0x5869feb1e30115c20d820201f07c0022f6c4fc17de5dbe34fc6068e433873514",
- "positionFeeFactorForPositiveImpact": "0x89539fbe79008640ad6cb051248458e02b54818bb63a2d7ebb190095335b23da",
- "positionFeeFactorForNegativeImpact": "0xf21f4e2bdd357839c21dcf6d38fc0acc4342a53b79215e4658eae1d6cd4c775b",
+ "positionFeeFactorForBalanceWasImproved": "0x89539fbe79008640ad6cb051248458e02b54818bb63a2d7ebb190095335b23da",
+ "positionFeeFactorForBalanceWasNotImproved": "0xf21f4e2bdd357839c21dcf6d38fc0acc4342a53b79215e4658eae1d6cd4c775b",
"positionImpactFactorPositive": "0xd28bfb3ca08c7494e67067bf0119c7bdba424b1387c306a28aff5dda8b377789",
"positionImpactFactorNegative": "0x39f461176d6cc8c5c445eea54a55500c067e773445570b228b27e5493c720160",
"maxPositionImpactFactorPositive": "0x985ded2301ade7f01d33f689a689b151bc07de2912a960554b32ff02786eaeb3",
@@ -2538,8 +2538,8 @@
"minCollateralFactorForOpenInterestLong": "0xe92ef25b6ac87cf0fe6420ff0b94dedb1dbcb99afdf6c01f4b0db2532a75bcfe",
"minCollateralFactorForOpenInterestShort": "0xb35e315882bf52eca4d8f8a1c1d0d0e47e8bf6d2e607efee31f62929e397ad33",
"positionImpactExponentFactor": "0xfd23c3422c995f8918ebd2dd7c73eeeff142ce0c12d07195868aa9d28d66cacf",
- "swapFeeFactorForPositiveImpact": "0xcb64f5f3f45dc3723f11856db5925f30725fccf1bc1b2a79a60b5604b7b28fd6",
- "swapFeeFactorForNegativeImpact": "0x440a1479e78766ccba8b1bda85ea239877dfbb362fc1ca7e790944538d1b11f5",
+ "swapFeeFactorForBalanceWasImproved": "0xcb64f5f3f45dc3723f11856db5925f30725fccf1bc1b2a79a60b5604b7b28fd6",
+ "swapFeeFactorForBalanceWasNotImproved": "0x440a1479e78766ccba8b1bda85ea239877dfbb362fc1ca7e790944538d1b11f5",
"atomicSwapFeeFactor": "0xbdd876ef95fe02c21b1be1058a8d1de9fdf924a675eec857ed69c3a03f82231e",
"swapImpactFactorPositive": "0x45a4bf705485557d4d27f88259722f6f264abf19c6067e7e7c80cdc45091f812",
"swapImpactFactorNegative": "0x102f11c727669364e295911cf2eeec0f717be0aa5c2954b9271ab9f497dd878a",
@@ -2578,8 +2578,8 @@
"maxFundingFactorPerSecond": "0xeb92533e6e161f74bf676c89ee359ec5c068d6c778fdb591257e578e71d2454c",
"maxPnlFactorForTradersLong": "0x1a2f6559d9f91c12210d3b6aff192fadd82f4cc3d8b2909e8c279bb5f36331ca",
"maxPnlFactorForTradersShort": "0x5bcc0c5f30cd53d5ed94d21c9caca0f4759ba82e89ae1dd7338d58ba3c46b0cf",
- "positionFeeFactorForPositiveImpact": "0x69452664e040373e176a46455a6c69626760edcf593b9748b6e49fcdb9207a89",
- "positionFeeFactorForNegativeImpact": "0x821b76dbcb68243ea72fd9f2f17fe6b225854dda300a06e396d151a436a4bfb5",
+ "positionFeeFactorForBalanceWasImproved": "0x69452664e040373e176a46455a6c69626760edcf593b9748b6e49fcdb9207a89",
+ "positionFeeFactorForBalanceWasNotImproved": "0x821b76dbcb68243ea72fd9f2f17fe6b225854dda300a06e396d151a436a4bfb5",
"positionImpactFactorPositive": "0x2478343077084acd3c7216ac2b5c943c00327604671cda4c7972e45006652fc9",
"positionImpactFactorNegative": "0x6cf62baa4a882cd293413510ffd531011af5693c6d0581ea345c50272f78bfe8",
"maxPositionImpactFactorPositive": "0xd17fe776c6710be10212b8230e5bc255c13cc6af2b50cac277a13f8c4d6cd675",
@@ -2590,8 +2590,8 @@
"minCollateralFactorForOpenInterestLong": "0xe51ceab2786b6da44608fcf1c9da64d1760bf55d57ff7ea1f9376b82886cbb20",
"minCollateralFactorForOpenInterestShort": "0xb0560b186b7882b503fcbe17a89c5103ccfa322beb5d1f323dc56c929db3ab3e",
"positionImpactExponentFactor": "0xb5eece59faa64c0cdbc8ee882453fb67959494a8c73137a924d203b375a1468e",
- "swapFeeFactorForPositiveImpact": "0xbee33858c2f53747681135515053cc556c047320c641ae43bf2ff98c77b29113",
- "swapFeeFactorForNegativeImpact": "0x0bfde157fd2ee3277abf7b7ff6c1c7fab4f935d0af6f51626219ff39a43792c2",
+ "swapFeeFactorForBalanceWasImproved": "0xbee33858c2f53747681135515053cc556c047320c641ae43bf2ff98c77b29113",
+ "swapFeeFactorForBalanceWasNotImproved": "0x0bfde157fd2ee3277abf7b7ff6c1c7fab4f935d0af6f51626219ff39a43792c2",
"atomicSwapFeeFactor": "0xd73ce0d7096bf317aa16e7d1245e8e75965719f1f557bad58a9c567a6b75bd19",
"swapImpactFactorPositive": "0xd4a5ae415f77d62783af1a2f28e78949cc864fd201805dbe149f5ba71a7bb5f0",
"swapImpactFactorNegative": "0xfca9588687c74abf7fbde4beebb4a829136a5a82f3f370b2de4e0c73e1579aac",
@@ -2630,8 +2630,8 @@
"maxFundingFactorPerSecond": "0x5a28cc017bae74342dc55e0306a1689f0ebd446d7a5fd1e4f69c62e6bb7d1e45",
"maxPnlFactorForTradersLong": "0x7ee64b10ca3672add3b5595621a0a85b1464e5baa88109cf21dd92d2de7b37f1",
"maxPnlFactorForTradersShort": "0x44444fe884bda49dea6f16541f03a6f19bc4816a798201061bcc080868400340",
- "positionFeeFactorForPositiveImpact": "0x4213ddb8b15cfe22e449464885b90c34587d1348102935814128d4f93564924d",
- "positionFeeFactorForNegativeImpact": "0x24284ef4308f320d77eabb3547f89f1511230c1f7623cd72bcc5ce402ead1526",
+ "positionFeeFactorForBalanceWasImproved": "0x4213ddb8b15cfe22e449464885b90c34587d1348102935814128d4f93564924d",
+ "positionFeeFactorForBalanceWasNotImproved": "0x24284ef4308f320d77eabb3547f89f1511230c1f7623cd72bcc5ce402ead1526",
"positionImpactFactorPositive": "0x7f3f29d1890b46600da48478685b3d055d9a4d094541f910d3c572bd6ffbcd18",
"positionImpactFactorNegative": "0x05fc07d81775825dd074d3658bb264d33c01c3ca320ebb478359e5d42f42e10d",
"maxPositionImpactFactorPositive": "0xf859b25857e23b61ee284c499197fb6f73683db766cd2b2637edd28191f7e629",
@@ -2642,8 +2642,8 @@
"minCollateralFactorForOpenInterestLong": "0xf326ae64850d57c362abbe3e1a2223c94f4a69b17e96139800b5016fe434d4ba",
"minCollateralFactorForOpenInterestShort": "0x1140f50b1bdc82bc058279354f46501bfbec07ddf4351360e7fa48c5b974f4f5",
"positionImpactExponentFactor": "0x024d5e4b55579b3102b32e4abfad4d3ea602e20e4ee9e2f3c8b64f3724f0f580",
- "swapFeeFactorForPositiveImpact": "0xa18cd10451678dd24a842554853984bdea8ee65419c7424c47fbdacee4ada0d4",
- "swapFeeFactorForNegativeImpact": "0xb49a685327e0d1c29eec16feea9c99a0d4d0b5e7ed7de8c46fb83c37ab54cedc",
+ "swapFeeFactorForBalanceWasImproved": "0xa18cd10451678dd24a842554853984bdea8ee65419c7424c47fbdacee4ada0d4",
+ "swapFeeFactorForBalanceWasNotImproved": "0xb49a685327e0d1c29eec16feea9c99a0d4d0b5e7ed7de8c46fb83c37ab54cedc",
"atomicSwapFeeFactor": "0xfbff4d8c9a7c549991c154234f48ef32736e27536dc2cc91124e03e3f1ee71ec",
"swapImpactFactorPositive": "0x04d496484fc2cfc2e5031d2700045b81467c218ed0e70e99c4c5964389cd3fe2",
"swapImpactFactorNegative": "0xc7bdfaea94692f0b55dbdaafc9983db489cbc376bf88b3776f57f175713b2ed7",
@@ -2682,8 +2682,8 @@
"maxFundingFactorPerSecond": "0x2dd5ac4c1223f9d1263588914bea5e89f3e0e779408819eb63989dba9e247547",
"maxPnlFactorForTradersLong": "0x247c69fdf78c9dfad71d03fc086389723570353fbc52843b757c314410b003a3",
"maxPnlFactorForTradersShort": "0x7cc5c8fcda211a9b92cd626a408e3fbc393f0c4ea81281a504770dbe89999911",
- "positionFeeFactorForPositiveImpact": "0x9f42b71783cc6ced4d228c3a1cdb3ee53eb1c3934339f151155df532bb4d1a2b",
- "positionFeeFactorForNegativeImpact": "0xf9f088871c68a5c744fa762744110706e273b6e17c512b9c7c683fe3dc9064c1",
+ "positionFeeFactorForBalanceWasImproved": "0x9f42b71783cc6ced4d228c3a1cdb3ee53eb1c3934339f151155df532bb4d1a2b",
+ "positionFeeFactorForBalanceWasNotImproved": "0xf9f088871c68a5c744fa762744110706e273b6e17c512b9c7c683fe3dc9064c1",
"positionImpactFactorPositive": "0x10eb2d755e495c24fcd89f3a54b10d05972c0f759d2424c2d6fab44d8cb6e626",
"positionImpactFactorNegative": "0x48e3f3213c6b90f6705565760463eee86b3cb17c6607f33593ae8eee66567f8f",
"maxPositionImpactFactorPositive": "0xe24fe8e0a7bf583053b0850fa5a89ae870e0f4c7f1056a941f3c5119e9b626de",
@@ -2694,8 +2694,8 @@
"minCollateralFactorForOpenInterestLong": "0x7c973b82d160218ec7405501b5ddc34bb772866294bff340a0046a665e2247d3",
"minCollateralFactorForOpenInterestShort": "0xd3f8f45c87c1735b5bd16535061d0f4515b1e7f673b9877125011e406f02c6ee",
"positionImpactExponentFactor": "0x2987c92bacb9397e9b34e5f025f773730c282ee0ee4d7af7955d65f401508660",
- "swapFeeFactorForPositiveImpact": "0x588f3720f115097a80ad6bce732ba1b277c43fd71d9bd09abb31b5ec5ecc4244",
- "swapFeeFactorForNegativeImpact": "0xcac53996c0bcd4b4376d5cca41f5ec9258a4d089c1b0362ece54643a97a16547",
+ "swapFeeFactorForBalanceWasImproved": "0x588f3720f115097a80ad6bce732ba1b277c43fd71d9bd09abb31b5ec5ecc4244",
+ "swapFeeFactorForBalanceWasNotImproved": "0xcac53996c0bcd4b4376d5cca41f5ec9258a4d089c1b0362ece54643a97a16547",
"atomicSwapFeeFactor": "0xcf6703dd9a4ed9e9beeb69c09936e37c791dc0114c3fa334fad308359fdcc2d9",
"swapImpactFactorPositive": "0x2a5710804a712f5b0eb07536474d337dc633791ed8ab8adf49ade86114305f9d",
"swapImpactFactorNegative": "0xbc15a6da3861fdc596e77225e3d77376b10df0f3f60809dee735fa659a3a094f",
@@ -2734,8 +2734,8 @@
"maxFundingFactorPerSecond": "0x3f5f9c81a311ffb195588d8d2a1406b6be0843e754ead6c42d4e3a9a228958d0",
"maxPnlFactorForTradersLong": "0x50f46e76f53049cbfac213b70bbaa631e0b7f6ec49d7e8f4ceb2ae193c7e6686",
"maxPnlFactorForTradersShort": "0x90d010e60b9c6c085d351ee1bb8b290ccae5fbf0f488a39c8425d8996cc7b7b0",
- "positionFeeFactorForPositiveImpact": "0x3a1710a087639aa8cd40aa7622d69edc8b5aeda3d09b2050db1191033990a818",
- "positionFeeFactorForNegativeImpact": "0x3def1740be201793d19f1907d81f57467fe3358a18a0f657b2c26dbb7633a398",
+ "positionFeeFactorForBalanceWasImproved": "0x3a1710a087639aa8cd40aa7622d69edc8b5aeda3d09b2050db1191033990a818",
+ "positionFeeFactorForBalanceWasNotImproved": "0x3def1740be201793d19f1907d81f57467fe3358a18a0f657b2c26dbb7633a398",
"positionImpactFactorPositive": "0x55ade57dff077ae0cfbc8e7e87dac0abee5631f5854005f418ee719fcd9a1de4",
"positionImpactFactorNegative": "0x1574bbdec27482f6cd0b9503c89d23f2ffb3fa62ea5c2409cc0f453213464031",
"maxPositionImpactFactorPositive": "0x9e02885d6622621808b0428cad1e6f86b729d3743d3f4917ca6887d62137b8a9",
@@ -2746,8 +2746,8 @@
"minCollateralFactorForOpenInterestLong": "0xb67d83d1aa168418e39a9e63db05fc226ef950870c88cef6489ba60614555ec3",
"minCollateralFactorForOpenInterestShort": "0x3fa9ef62043d4b2c98b738e3e792a2cd7dfa6a906403619d068417f199d3e51d",
"positionImpactExponentFactor": "0xf40ffc6279286522266a0f262193cd2f2e3ab58182dd4ac525ffa47de5d45fac",
- "swapFeeFactorForPositiveImpact": "0x5e06aa364ca3ec60ae841d9563ab289f341be788b71e1195751a1f5a6608d83f",
- "swapFeeFactorForNegativeImpact": "0x379a330b77e5901172434cb0ea61bccadbe9ccddbe4c4b44574312ca7e8f9cf4",
+ "swapFeeFactorForBalanceWasImproved": "0x5e06aa364ca3ec60ae841d9563ab289f341be788b71e1195751a1f5a6608d83f",
+ "swapFeeFactorForBalanceWasNotImproved": "0x379a330b77e5901172434cb0ea61bccadbe9ccddbe4c4b44574312ca7e8f9cf4",
"atomicSwapFeeFactor": "0x2caf89716bc0a40f6c0098a2797798ec47de5f269eed4bb0766c6a14e1a80180",
"swapImpactFactorPositive": "0x4dfff87fbccb5b88103d2c18923fe113cabf5ea0683519bdf5aaa014901e5485",
"swapImpactFactorNegative": "0x948eb486fa79aecc31b6f33201e895a7a280dd196b0d44d58826f51052959432",
@@ -2786,8 +2786,8 @@
"maxFundingFactorPerSecond": "0x4ee72ac3d07cc7996644888cd430c9b2af6663ade143269b0f163c30e60711b1",
"maxPnlFactorForTradersLong": "0x2007ac1281a64c05a58188dcc4746347dc8baf24093eae44e9d0adf74e2aa161",
"maxPnlFactorForTradersShort": "0x258ea651931bbfbd89ab1b0c50961f9af713c552128cd62335d38f7454fb3e7c",
- "positionFeeFactorForPositiveImpact": "0x7f6b38e2af31f0e1d6193d5cafffacbf10ce3c9e34654d9a6d8e012c3d23dae1",
- "positionFeeFactorForNegativeImpact": "0x9ee47e77eb16355b9e0f26f0b3d35d3007c23828886d90fbbfef792d34c83613",
+ "positionFeeFactorForBalanceWasImproved": "0x7f6b38e2af31f0e1d6193d5cafffacbf10ce3c9e34654d9a6d8e012c3d23dae1",
+ "positionFeeFactorForBalanceWasNotImproved": "0x9ee47e77eb16355b9e0f26f0b3d35d3007c23828886d90fbbfef792d34c83613",
"positionImpactFactorPositive": "0xa6b8dc22fae5a3a3d30c9dc1fc679924822f3ce06151f15e5a699d28f4c5090a",
"positionImpactFactorNegative": "0x2b7ab6b910c3fd27027b1fe63a7d384342777c75bfa768d924743b609662362c",
"maxPositionImpactFactorPositive": "0x68831a394cdb16c32bf312f5c948d383c58754a438caaaf51383d97ab6c97e4d",
@@ -2798,8 +2798,8 @@
"minCollateralFactorForOpenInterestLong": "0xac1d1a8dd04b4b1ce72264801861bb8c24d7085a54a992bd00af1c678dab9606",
"minCollateralFactorForOpenInterestShort": "0xeb291f3c33fe4214bc3c2127cb7b4e5531517e60b055d0cef9f35e20144b85ad",
"positionImpactExponentFactor": "0xe2a98a7ee53e527429ff24a4bc99e39428f49da9eb48d9cce1b3814e1fe30893",
- "swapFeeFactorForPositiveImpact": "0x7c8c38c435c69d053cda438aec9ba9b3b04cbed369c8ebf00855a4e5fe237e1c",
- "swapFeeFactorForNegativeImpact": "0x520be5e89bd1667cf2473019ce4efe8c6c8844418027fbdb89c72725fc7c87f6",
+ "swapFeeFactorForBalanceWasImproved": "0x7c8c38c435c69d053cda438aec9ba9b3b04cbed369c8ebf00855a4e5fe237e1c",
+ "swapFeeFactorForBalanceWasNotImproved": "0x520be5e89bd1667cf2473019ce4efe8c6c8844418027fbdb89c72725fc7c87f6",
"atomicSwapFeeFactor": "0xb649f84aef632b821933f087fdf47095e2959db56fff928b569c0034c646a71e",
"swapImpactFactorPositive": "0x5c8a37f30c9ecc13ee46d77b70d4331b6132fc1d387d3d6c8b4874daa9e45ee3",
"swapImpactFactorNegative": "0x728f7a1b5e5c7393136e513b4f434934682e69750993b9eda930b21a7aced4f7",
@@ -2838,8 +2838,8 @@
"maxFundingFactorPerSecond": "0xb00a848de94a4e84ad04a054b52b29dbeecffdded85d5bfe0937842fa610f9c4",
"maxPnlFactorForTradersLong": "0x09bf3a2601ed70a79d530344658e77d36302a0255588684fb388734a57452389",
"maxPnlFactorForTradersShort": "0x3cd79d723dadb79c31c7239fed102b724ce23ffe698a6df53486cfcf2bc4e980",
- "positionFeeFactorForPositiveImpact": "0x8d56dcf0c488d0b86f23175f78a65a0c4b91eb4c7781b4f4c0c475159b64324d",
- "positionFeeFactorForNegativeImpact": "0xd1af617cd6a3e2647dc6d7425372ea0a453f414ae9e49b372f3b1cb97cfff5b8",
+ "positionFeeFactorForBalanceWasImproved": "0x8d56dcf0c488d0b86f23175f78a65a0c4b91eb4c7781b4f4c0c475159b64324d",
+ "positionFeeFactorForBalanceWasNotImproved": "0xd1af617cd6a3e2647dc6d7425372ea0a453f414ae9e49b372f3b1cb97cfff5b8",
"positionImpactFactorPositive": "0x56832fc87dbbbc799267fec5d6f05ef0d548d625dfb016efc230a8ff62dba3c3",
"positionImpactFactorNegative": "0x75fc8c5f45563729360cb9c59219ae3a7ba5e7fa35881282062efd1bda8ffa22",
"maxPositionImpactFactorPositive": "0x4830dab4380c54ddb0ef53e357ed6fa3a58a90317544a59a3a4672828f16a9c6",
@@ -2850,8 +2850,8 @@
"minCollateralFactorForOpenInterestLong": "0x3b95e2164fa00e54a136f46ac7791ab382b33ca305385943a18908b26110b691",
"minCollateralFactorForOpenInterestShort": "0x92f543ff91b7e17ebe09b0a5632ba8fe800907683b0400e11b507585b22485dc",
"positionImpactExponentFactor": "0x0fff84ee08b85a7dc2f7064113bb23bba06f731bfb6fcaf0b0924fdb86198310",
- "swapFeeFactorForPositiveImpact": "0x10a5906caf61db02617a22f487386bcaa73018c7170652ac5f829a8d9fc61204",
- "swapFeeFactorForNegativeImpact": "0xd9cfb7f87d3d639a348d35889198ee8deab2cf9d84a50e57dda704d84fd6e960",
+ "swapFeeFactorForBalanceWasImproved": "0x10a5906caf61db02617a22f487386bcaa73018c7170652ac5f829a8d9fc61204",
+ "swapFeeFactorForBalanceWasNotImproved": "0xd9cfb7f87d3d639a348d35889198ee8deab2cf9d84a50e57dda704d84fd6e960",
"atomicSwapFeeFactor": "0x061c448fae50d49a8f50a8d32e134e7649e6a815cc71e5341389655a702cf9a1",
"swapImpactFactorPositive": "0x1ca2c01d2280bd5ce2953044135a4ac1612cbc1e51eb4789094d5277695ea547",
"swapImpactFactorNegative": "0x12d72f558e812074fe92ca12d0b09ec2fce12f75ad277ade95bb96d90d0d5feb",
@@ -2890,8 +2890,8 @@
"maxFundingFactorPerSecond": "0x1221c040547c0b2c832ae1ae21ea71b6cfe703bbcce79da15d6bfb97b8fce14d",
"maxPnlFactorForTradersLong": "0xd0c316afb75722d83ac95f036d09c9c42e2875fd6ea447493e057d14d21cfc83",
"maxPnlFactorForTradersShort": "0x556e053b351738204ceb961c323050c2dcb5b167160fbec74dcef7ac665ce1a8",
- "positionFeeFactorForPositiveImpact": "0xaccd9226cb98a1157f4dd7aaa3bca3867c8711717f02e1024679623e69ef1267",
- "positionFeeFactorForNegativeImpact": "0x1b389553bcb979e53eefe32cf5b32de096277c55c6a9fb516e998e1d29483f8d",
+ "positionFeeFactorForBalanceWasImproved": "0xaccd9226cb98a1157f4dd7aaa3bca3867c8711717f02e1024679623e69ef1267",
+ "positionFeeFactorForBalanceWasNotImproved": "0x1b389553bcb979e53eefe32cf5b32de096277c55c6a9fb516e998e1d29483f8d",
"positionImpactFactorPositive": "0xafeb1e085d75e737b9082bafa645b5ff9d88c86101ce1eb9bf53086eda79fce4",
"positionImpactFactorNegative": "0xeeb2de5e802c7deefc7506ee2ed78ef90c42f81562339b7ac4dbf9989c8c66f6",
"maxPositionImpactFactorPositive": "0x951fa1a7252ce2217d6e71fdf8b445f94f389b7b73ecf1297df051acf958fbc3",
@@ -2902,8 +2902,8 @@
"minCollateralFactorForOpenInterestLong": "0x7ee7a2ce8cf97ae51b250ef153c4e47b752fe2a51865364cd7e5e0d96213560a",
"minCollateralFactorForOpenInterestShort": "0x038f5c86febee95ef8fa08667309942a2242cce1fd1b73e5c9f889fb199e8bc5",
"positionImpactExponentFactor": "0xf20108440f12472008e2502eb559780bec72ab8a376f5f4ce9d978642f37134f",
- "swapFeeFactorForPositiveImpact": "0xa3be727905b20731888cc2db25d31e4e8a41bbeaedb036c2aeb9570b03eade4a",
- "swapFeeFactorForNegativeImpact": "0x73f6253a8128c8d5eb5486d65b6bbef9e92a29d142827a94e16d7c1e0d1c8c78",
+ "swapFeeFactorForBalanceWasImproved": "0xa3be727905b20731888cc2db25d31e4e8a41bbeaedb036c2aeb9570b03eade4a",
+ "swapFeeFactorForBalanceWasNotImproved": "0x73f6253a8128c8d5eb5486d65b6bbef9e92a29d142827a94e16d7c1e0d1c8c78",
"atomicSwapFeeFactor": "0x69b16fd7680e79a4444e31dc65f69ef65097908b8c7d378fcae8e1fd420204e7",
"swapImpactFactorPositive": "0x21b32f554b31bdc78df56611840c5b22c3f83e6cf98ccfa40a961b576bb8f27a",
"swapImpactFactorNegative": "0xc2d2bcf31bf9a8344f5325216298aad7e5db29a9da562598e268aa22650ac8ae",
@@ -2942,8 +2942,8 @@
"maxFundingFactorPerSecond": "0xa716fed1ac79547e9a76aeacfac182f569aa0051b9adce527be60494b1970788",
"maxPnlFactorForTradersLong": "0xebab50cf54031c7f5a039b99599bd02c6ce508826096b21939bdd5404531adac",
"maxPnlFactorForTradersShort": "0x739d43d5c438663669936efa064b6da0f27b4cba3025b28bc441d48f9ab5a4bf",
- "positionFeeFactorForPositiveImpact": "0xcb5daf2eecf37ca9cfb7d2b481dd87a9f2ce982e0f9246e6343002ad028cee96",
- "positionFeeFactorForNegativeImpact": "0xfa33e9a8d5a686dbe77ec54459519c9f4eb83f3e948e4494952afedc0bbf5905",
+ "positionFeeFactorForBalanceWasImproved": "0xcb5daf2eecf37ca9cfb7d2b481dd87a9f2ce982e0f9246e6343002ad028cee96",
+ "positionFeeFactorForBalanceWasNotImproved": "0xfa33e9a8d5a686dbe77ec54459519c9f4eb83f3e948e4494952afedc0bbf5905",
"positionImpactFactorPositive": "0x660dafad2e4c7acef21088d044cb91771c793f9ec1ab1ecc89905e726a703017",
"positionImpactFactorNegative": "0xd5146ea76962da49c37a3cf7cb089ff75f8ac2593f10c4acddabb68005b6e686",
"maxPositionImpactFactorPositive": "0xdd5137f15d530282126920738b90327f8b0900665509f7244b3f790125559213",
@@ -2954,8 +2954,8 @@
"minCollateralFactorForOpenInterestLong": "0xdbe85b764eb648e48f9fc7ee2ca91b67515bd3c9e5093fc110b0db61825fc00b",
"minCollateralFactorForOpenInterestShort": "0x90d4beb803fbe580d51f0aef508be25221595bad32eead1bbf3c93bd37e876e2",
"positionImpactExponentFactor": "0x1a0c0dc2b23888100da389151b52c1ce3fc7b82e3e5347ff425be72c6fa91b05",
- "swapFeeFactorForPositiveImpact": "0x18e4dfabef67599963a713e17ab75a97ae9a856c7f928a774b55a854d2e8271c",
- "swapFeeFactorForNegativeImpact": "0xbcd1f183a9fef531ff9db7158ef135533c7dad2c76a4539fa8ffb261613b5941",
+ "swapFeeFactorForBalanceWasImproved": "0x18e4dfabef67599963a713e17ab75a97ae9a856c7f928a774b55a854d2e8271c",
+ "swapFeeFactorForBalanceWasNotImproved": "0xbcd1f183a9fef531ff9db7158ef135533c7dad2c76a4539fa8ffb261613b5941",
"atomicSwapFeeFactor": "0xa80450c5250a5e1c80e3ce7ff5da3a8ad5b40b0206abfcc350e25b68fa9f96a4",
"swapImpactFactorPositive": "0x8678662699138feac68d6aaeb7318df4d064532ecb21d27591c5329cd16e1df5",
"swapImpactFactorNegative": "0x37fb6cda1dbc827e2bed64832211f7e3b22fd76d68eafc898864d33e3d28f7d7",
@@ -2994,8 +2994,8 @@
"maxFundingFactorPerSecond": "0x5d7e2d74fcbc72cc8ac54171254ef83eeaa67ea9384263799cefc2dea798ff7e",
"maxPnlFactorForTradersLong": "0x2dd25d7a9185ab192d7157198769a10d3bc22b4adf53a49989ff8b5cc9f22f5c",
"maxPnlFactorForTradersShort": "0x894227f8a19303a369a7d58c20474e716b64d037c5344c283486f994ef540be3",
- "positionFeeFactorForPositiveImpact": "0x8de3360a74370e5a1deb4c0584cd2b2a8f370807bca4a40dd63c6bd13677e148",
- "positionFeeFactorForNegativeImpact": "0x24abce2c1fa286b1f26e955d5c9f81027f81a3e969fe6ac068954c5c7020d495",
+ "positionFeeFactorForBalanceWasImproved": "0x8de3360a74370e5a1deb4c0584cd2b2a8f370807bca4a40dd63c6bd13677e148",
+ "positionFeeFactorForBalanceWasNotImproved": "0x24abce2c1fa286b1f26e955d5c9f81027f81a3e969fe6ac068954c5c7020d495",
"positionImpactFactorPositive": "0xf0377e82644972b454a3b5daed12bd739ac82c6c2cb07157150bd15940e0fb31",
"positionImpactFactorNegative": "0x240cdb280108e1b493cfa7a4cb0e18c8b7958c63eaaebe43f11044f3799ff0d7",
"maxPositionImpactFactorPositive": "0x16df3f537a8c0c960d6eb333e2954d65c3ca572a594869e3d2e770d2ea872c69",
@@ -3006,8 +3006,8 @@
"minCollateralFactorForOpenInterestLong": "0x74c0a14f2a215ff8ff5908b12fbaa3065d35c06a533007ed5e577223ebf46e4b",
"minCollateralFactorForOpenInterestShort": "0x94f50bb5bf06625aa0686259c5aaef25ec277ae0d18952431e8a79c424b16c4c",
"positionImpactExponentFactor": "0x19d95eb25a54270fdff0e791d1ebdbd32acf1ee56f11502fa019a1fad987c154",
- "swapFeeFactorForPositiveImpact": "0x0b4f9aafd26ffb34fa8ed5f7ac3afcaa2fa8eb3bc6674abf977dcc940b58fef3",
- "swapFeeFactorForNegativeImpact": "0xd57dd2fb2b0d6bf254f2c7ce4bc34f29a69d0274fdba121d2678558e6aec1ae0",
+ "swapFeeFactorForBalanceWasImproved": "0x0b4f9aafd26ffb34fa8ed5f7ac3afcaa2fa8eb3bc6674abf977dcc940b58fef3",
+ "swapFeeFactorForBalanceWasNotImproved": "0xd57dd2fb2b0d6bf254f2c7ce4bc34f29a69d0274fdba121d2678558e6aec1ae0",
"atomicSwapFeeFactor": "0x7e9b13adb16b9ae09bd6f2530cfe171baf41e3e8e18c3fbe63b818aa15cf5f1e",
"swapImpactFactorPositive": "0xe3b67132e0f4393269e4b1a857cf64173c3f439061273ecf56a280f4c93de89a",
"swapImpactFactorNegative": "0xbb17be4a833e071fcd118fd099e5441fa4853dd41297654cc57483bad2c4ad04",
@@ -3046,8 +3046,8 @@
"maxFundingFactorPerSecond": "0xefc3b2ab35080c2dbd038bc152b9a74d5c3b8bdd2fc6bf5dfa1f31e8caa7e985",
"maxPnlFactorForTradersLong": "0xe75fffd4d448c87a46cca3a9b7098d406e8f3bc9bf311da298a989b6d7d7976d",
"maxPnlFactorForTradersShort": "0x6c91f5580ab490648e285bdbf7a64d395f922610dbeb6bd3476696c0ffe94b74",
- "positionFeeFactorForPositiveImpact": "0x246b89f9c45166ddd8149156fc0378e4a85ba91a41847d89e589c775b613f608",
- "positionFeeFactorForNegativeImpact": "0x2fdd80b2d1a7b2ba121fcc94d39910377653574bb900257f8f16822f91cf36ea",
+ "positionFeeFactorForBalanceWasImproved": "0x246b89f9c45166ddd8149156fc0378e4a85ba91a41847d89e589c775b613f608",
+ "positionFeeFactorForBalanceWasNotImproved": "0x2fdd80b2d1a7b2ba121fcc94d39910377653574bb900257f8f16822f91cf36ea",
"positionImpactFactorPositive": "0x2a0b4b3beab009559d0ba4e7ebc3ce46814186fa089bceee28a8cabb128b8734",
"positionImpactFactorNegative": "0xee45a29138dcd27cec55588b13a476457b6f59098697700e870f332212b00ccf",
"maxPositionImpactFactorPositive": "0x96f96a3dcbac9181d1291533d01cfb863334e4841412fd3bbb89fc252fca1590",
@@ -3058,8 +3058,8 @@
"minCollateralFactorForOpenInterestLong": "0xa588997b3b52f45c5ae3dd23491184ecdd8c73a4a3ad208d2d9b4b83d653cf2e",
"minCollateralFactorForOpenInterestShort": "0x5b71809f9c6cc7c5456b1a517e15e37bb710f1e8f8178edc89be82aa6922432a",
"positionImpactExponentFactor": "0xd6579b433a10d66cea53361ab3fd4b674bc36ae60752875ea1bb45c8bb96460b",
- "swapFeeFactorForPositiveImpact": "0x02db1c795da4d08231be629c36bdd0b0300c763404833b049786d618d4c5cb3b",
- "swapFeeFactorForNegativeImpact": "0xafc8b06e138caf77b195ea98c6b1454b3d1a80d39a3225b2ccb155c31a8562d8",
+ "swapFeeFactorForBalanceWasImproved": "0x02db1c795da4d08231be629c36bdd0b0300c763404833b049786d618d4c5cb3b",
+ "swapFeeFactorForBalanceWasNotImproved": "0xafc8b06e138caf77b195ea98c6b1454b3d1a80d39a3225b2ccb155c31a8562d8",
"atomicSwapFeeFactor": "0x7b40bd1154f0c0b63a4a7e8d0b508e5ed5e8b6f36a99fa352b3d24383cce2d18",
"swapImpactFactorPositive": "0xd8dccee431a28e96dad6b7fe8268ab59607042762992a7833e78b16764e5239b",
"swapImpactFactorNegative": "0xbeadf9c02cf8cffd063af197414f3af86d3691554a06b63f4130db8e86501697",
@@ -3098,8 +3098,8 @@
"maxFundingFactorPerSecond": "0x571381c79d99d2433da47300740ac2cf56d5f573288d81765d1dcfe1d5509f98",
"maxPnlFactorForTradersLong": "0x1bc7dcf41411799ea846b1e435d7207e87bd8470d6bcabf006e773c3ccf650b1",
"maxPnlFactorForTradersShort": "0xa10652486af799bdf9fc52fcd7b78bd2edeae561dbd6921f1f3f01b5a14944bb",
- "positionFeeFactorForPositiveImpact": "0x485e5ba479fe14d7297e82caa9a6dfebdd1090537a5f3ebc8595a0a0a3e24143",
- "positionFeeFactorForNegativeImpact": "0x85691dbbbd49dbc8267640716d91d7101c592ba4e5af6e7309067de0bfd2a092",
+ "positionFeeFactorForBalanceWasImproved": "0x485e5ba479fe14d7297e82caa9a6dfebdd1090537a5f3ebc8595a0a0a3e24143",
+ "positionFeeFactorForBalanceWasNotImproved": "0x85691dbbbd49dbc8267640716d91d7101c592ba4e5af6e7309067de0bfd2a092",
"positionImpactFactorPositive": "0xd807ea14f321cb31d2d947d5ff941382054f9569c4bc7424ea5fb53b7691c4ec",
"positionImpactFactorNegative": "0x3163150b4a2ddbfc6e2d00a08e2d3db1f1a08878af03cc5f906e4876b7d9412a",
"maxPositionImpactFactorPositive": "0x82fd63cb2e91678055b06933cdfb846823e9c3b1481501047881465cb095afc2",
@@ -3110,8 +3110,8 @@
"minCollateralFactorForOpenInterestLong": "0x23d5a4de10d52ac5736f00723cb93b596ccb210a54534daf46984afe304838d6",
"minCollateralFactorForOpenInterestShort": "0x1a58e0ba8fc5c636b76d61a8c60ec71c99b9f3745706c79766c8cf0dcafed224",
"positionImpactExponentFactor": "0xb9cae052e8bfcce30a99ba0cc4f0812cb630723820d72a1110b112396114aa81",
- "swapFeeFactorForPositiveImpact": "0x49b65dbdf43ce39b69e841c6230ae6627ceacc9334c4d819b206a8b0ef2d8e6f",
- "swapFeeFactorForNegativeImpact": "0xf2ba731e689b507ae2035884b13ec6c67d222f165fba0061d615a11954f6e421",
+ "swapFeeFactorForBalanceWasImproved": "0x49b65dbdf43ce39b69e841c6230ae6627ceacc9334c4d819b206a8b0ef2d8e6f",
+ "swapFeeFactorForBalanceWasNotImproved": "0xf2ba731e689b507ae2035884b13ec6c67d222f165fba0061d615a11954f6e421",
"atomicSwapFeeFactor": "0xa31641fa0e5934a15bde4d72e8cef277ea19728e3d27bbff3839f1b2292adfd5",
"swapImpactFactorPositive": "0x9978b4eb0dfa425718a72f52aee70a622401b0ea0398043e50e286fade3369df",
"swapImpactFactorNegative": "0xe602c87380a47190b95ca4de2c92202818d7e26fa1ca73c8e1005fe7f1d2ce7c",
@@ -3150,8 +3150,8 @@
"maxFundingFactorPerSecond": "0x958ff648969e44b4659d79a393f28042f97cfcfdc8fc698c9010fa1da452fd3f",
"maxPnlFactorForTradersLong": "0xd8ccd387611f6b39a5f16eb0f13c0835179bf58208af7938f7a6ea98ffcfbfae",
"maxPnlFactorForTradersShort": "0x626e1b71533247a7b932b107904f1433bbc09b1de4bbd51932958fa8d444f613",
- "positionFeeFactorForPositiveImpact": "0x3ba3e82158ca7a20ec5ac93874ab157c9467cb8ff224e0b0a1b7e1e2dc21f874",
- "positionFeeFactorForNegativeImpact": "0x699524c62e892e3db59c9a3c858ed04d9f514dcb47513187c9aad9ae3815269c",
+ "positionFeeFactorForBalanceWasImproved": "0x3ba3e82158ca7a20ec5ac93874ab157c9467cb8ff224e0b0a1b7e1e2dc21f874",
+ "positionFeeFactorForBalanceWasNotImproved": "0x699524c62e892e3db59c9a3c858ed04d9f514dcb47513187c9aad9ae3815269c",
"positionImpactFactorPositive": "0xdc6271c18394b8a7062c7e9b84361c35e34e920fac4f7e13f9ef1a4595aebb9b",
"positionImpactFactorNegative": "0x156aa170f4820ef2479670eb20af8fc7ea2e5491f603493dbc2b9070cc948e52",
"maxPositionImpactFactorPositive": "0xeca13146281a419baa821b94f4498cbc4276ff0992e34aa2737f8fb79b508223",
@@ -3162,8 +3162,8 @@
"minCollateralFactorForOpenInterestLong": "0xdc7d2b11c98f133ad856f4e38b92fae525d6a2ae80ceeb3b420e240dfad9849a",
"minCollateralFactorForOpenInterestShort": "0x5c5f8d9af53545a1214654f78ad1e9a6ab37aecd5469c2e5c4cbcf8cd2e63551",
"positionImpactExponentFactor": "0xcc823670635973134c5087c8d47979affcca515532603cc92ebc945c51ed08c4",
- "swapFeeFactorForPositiveImpact": "0x014fda6121726da59e193a952cc3a1cfd31b925febc198a559b2cc1e4d27f819",
- "swapFeeFactorForNegativeImpact": "0x1a0c447e52ff673b57162b390edd27e8040ee4be5e52ea646e13630bf98457ba",
+ "swapFeeFactorForBalanceWasImproved": "0x014fda6121726da59e193a952cc3a1cfd31b925febc198a559b2cc1e4d27f819",
+ "swapFeeFactorForBalanceWasNotImproved": "0x1a0c447e52ff673b57162b390edd27e8040ee4be5e52ea646e13630bf98457ba",
"atomicSwapFeeFactor": "0xe7b3759bff35df68019e544ae31cdc1a6e3cd561db220208b66e655b27d1c681",
"swapImpactFactorPositive": "0x2f10e629b89a4e353d8d563afb62870a006f03e0cbd77759101e3e646d7f9631",
"swapImpactFactorNegative": "0xe6988279f833b1014b0483425d0eb061c1b244073b18b54d1eebf3a9de1f75cb",
@@ -3202,8 +3202,8 @@
"maxFundingFactorPerSecond": "0x2ad9d83577d571a8ce3521912811bf5b7c2770021a2c8af368fe8848a1bc4395",
"maxPnlFactorForTradersLong": "0x0f01b59ae43dd839e912fd5b24f5406c50afa7c2c37fce4f2268023e9c569959",
"maxPnlFactorForTradersShort": "0x46626df8db05a87d31252ce589cf2d44633ae1b0a2593ff6e43642ac83380acf",
- "positionFeeFactorForPositiveImpact": "0xa17412d9fb8836576acf564f6b7d917e2523edc2b22e54160bf847b075938f12",
- "positionFeeFactorForNegativeImpact": "0xa283b96249bd91fa6bf8027982b11be3b157850d5a7a9409a1bd92993b352d34",
+ "positionFeeFactorForBalanceWasImproved": "0xa17412d9fb8836576acf564f6b7d917e2523edc2b22e54160bf847b075938f12",
+ "positionFeeFactorForBalanceWasNotImproved": "0xa283b96249bd91fa6bf8027982b11be3b157850d5a7a9409a1bd92993b352d34",
"positionImpactFactorPositive": "0x98286b1d1ff96f67cba51e90d3335fa9395fbffee6ea6d6188f2f4d785fa5730",
"positionImpactFactorNegative": "0x8a2e5ca0fcd5b03675d20b12386f3b185a06f71604235ef8d305d427e65161cf",
"maxPositionImpactFactorPositive": "0xc81436f5558cb283c8c590d8b08d2685f138a0a10bf14cf46e547a0bda68720b",
@@ -3214,8 +3214,8 @@
"minCollateralFactorForOpenInterestLong": "0x632d6bc9d36199ead3660e1d54803d97147abc31e2cac1b18dd386d250f44a2a",
"minCollateralFactorForOpenInterestShort": "0x03289b688ce32f30e096f9f305f6f1e4d654785db89ccc5a81812876233e02ab",
"positionImpactExponentFactor": "0x6af5e63b59afc60c71a45a325ded80a245d81947f6c9a9bff20d5f97e402fbc8",
- "swapFeeFactorForPositiveImpact": "0x4f5ebafeb87725474637f4b264962f556c830765f047576f68ff7e5dde5ba384",
- "swapFeeFactorForNegativeImpact": "0xec05b3db52f1252fa492f3bfd694cbe7c6b86bfba73abfea88f0a55026e61f3c",
+ "swapFeeFactorForBalanceWasImproved": "0x4f5ebafeb87725474637f4b264962f556c830765f047576f68ff7e5dde5ba384",
+ "swapFeeFactorForBalanceWasNotImproved": "0xec05b3db52f1252fa492f3bfd694cbe7c6b86bfba73abfea88f0a55026e61f3c",
"atomicSwapFeeFactor": "0x7d5cd589e9c54faead67eea92b39d394d3dee91b21670112950f08cbc2cee5f5",
"swapImpactFactorPositive": "0x40d4a5c09e6e2f7d78e3dccf44cdd2813b205c5f57942264bda60aee2add42db",
"swapImpactFactorNegative": "0x60918f5a146bcc03569cbf6e35e786a85e270d98a4db0043a431be58ecb5a3fc",
@@ -3254,8 +3254,8 @@
"maxFundingFactorPerSecond": "0xb8b59b8e83c4387f3137e1d93b17e05ebb5ee09657a23e38be51a0b166871b30",
"maxPnlFactorForTradersLong": "0x0db2cfd5722d5941892740a8f929ca0005e95b48a333cede62a8e8baf05312c0",
"maxPnlFactorForTradersShort": "0x227e06582e069889ac13cbb616d3fdeeae60ecf7f8168d1c6735b88a0e1d43f3",
- "positionFeeFactorForPositiveImpact": "0xd25728fc562ef369c5f9ca0569746770730f799eaf63c4b0eaa0ec16a272b652",
- "positionFeeFactorForNegativeImpact": "0xe22b635fa6d9a5d645504462c7a6d08eef0c7bd5fd22a5c51e6fff32ab045a34",
+ "positionFeeFactorForBalanceWasImproved": "0xd25728fc562ef369c5f9ca0569746770730f799eaf63c4b0eaa0ec16a272b652",
+ "positionFeeFactorForBalanceWasNotImproved": "0xe22b635fa6d9a5d645504462c7a6d08eef0c7bd5fd22a5c51e6fff32ab045a34",
"positionImpactFactorPositive": "0xc6dc725a1219aff8e142a456a399c768a7ba63b3cf8c7bba44991324511dff23",
"positionImpactFactorNegative": "0xc4425eddf8a89bbd5df8ec5c5f26ef4066769441bb055defcc4171293450155d",
"maxPositionImpactFactorPositive": "0x8cc4653a53206f190ed9e6141322f03b880455663553ae906eaea51d7f7f9593",
@@ -3266,8 +3266,8 @@
"minCollateralFactorForOpenInterestLong": "0x635e26e9daa2510e295f35fa17f561563e7428351b9282c13d5c56878aa57f83",
"minCollateralFactorForOpenInterestShort": "0x632cd25d22c65823f350addf0c66e3d333b599100702c61f455fd6404350eebd",
"positionImpactExponentFactor": "0x3d6458a712d40d0d9feba464a4d7cc2541ceaca6a3cd139baf5acedb67490c82",
- "swapFeeFactorForPositiveImpact": "0x07679aa91501709e499e12f6f80e0ee1b50c26cf4fe198f1d57b702626c8bc62",
- "swapFeeFactorForNegativeImpact": "0xe92bea4730d8e0aeddb90dc9ab5aaaa8c2ca3f9602b8cd47d3e73008fc60315f",
+ "swapFeeFactorForBalanceWasImproved": "0x07679aa91501709e499e12f6f80e0ee1b50c26cf4fe198f1d57b702626c8bc62",
+ "swapFeeFactorForBalanceWasNotImproved": "0xe92bea4730d8e0aeddb90dc9ab5aaaa8c2ca3f9602b8cd47d3e73008fc60315f",
"atomicSwapFeeFactor": "0x9ffb7fa432de58e38ffdd8a092e66367438d3c576f448a16519c6ea37a68e4a4",
"swapImpactFactorPositive": "0xe7ce551847a9a3c438d4b9e7a4099b50291bf4ab3242383a4b621ac959238f8d",
"swapImpactFactorNegative": "0x599c414476937eeb2a4b91d90d9ca824d874a17112d7a5b7a7a7a6f6aad5628a",
@@ -3306,8 +3306,8 @@
"maxFundingFactorPerSecond": "0x165feae3bd1ab2eb1c9b96390f8e1fca5e9672ef7dfba842db1fa1ef6565ea1a",
"maxPnlFactorForTradersLong": "0x77b27385bab5c8d5ed0fa84f2066e56cb9e87c0ba5ba36c35644129d849638dc",
"maxPnlFactorForTradersShort": "0x0571bc79d5f2e7ac963ef77dcc8db61ab10117ece969811a6111959a54ee76fc",
- "positionFeeFactorForPositiveImpact": "0x988dfbd600a0d356c99e2d7cdb6472503b3c188edf670ff9baf49bddba8da86b",
- "positionFeeFactorForNegativeImpact": "0x97be254933fc6763edb5aba3e16fd3195f269f9344ffb3477c65e2557f1b8cff",
+ "positionFeeFactorForBalanceWasImproved": "0x988dfbd600a0d356c99e2d7cdb6472503b3c188edf670ff9baf49bddba8da86b",
+ "positionFeeFactorForBalanceWasNotImproved": "0x97be254933fc6763edb5aba3e16fd3195f269f9344ffb3477c65e2557f1b8cff",
"positionImpactFactorPositive": "0x2ae31cc08f53dccf910ca8d14bff6f143a1daeb6308c48417e93dab69ba2cf37",
"positionImpactFactorNegative": "0x939bf505096c7330665342c1763b56d68b607607ea69f5afcc92b2bc753e28db",
"maxPositionImpactFactorPositive": "0x9feaaedae8e2a793d61085d2d1545f6b03b5ddc48e06a8a4492c2c66701797b9",
@@ -3318,8 +3318,8 @@
"minCollateralFactorForOpenInterestLong": "0xbc8a5091e0c1ff7f8b613fe045ad5ada27f7f46e2025bd0365840c89e99bbdbc",
"minCollateralFactorForOpenInterestShort": "0xf612745ffdf98a5dc5d3c7043463ad56ee7554569609b8329755e5dac407e1cf",
"positionImpactExponentFactor": "0xb9f2ac464580caead32af83210f8ec22c484b3987a0f6a817ed0cb94f08e41fa",
- "swapFeeFactorForPositiveImpact": "0x8607c2a1d0ee1c4c21a541044c8adb91d9a89509c6c861cd6b9a197f272bcedb",
- "swapFeeFactorForNegativeImpact": "0x67659dc676411b9d0f40e02dcb934b664abc8f22a45fd6934a1dfd6cfcd9deb1",
+ "swapFeeFactorForBalanceWasImproved": "0x8607c2a1d0ee1c4c21a541044c8adb91d9a89509c6c861cd6b9a197f272bcedb",
+ "swapFeeFactorForBalanceWasNotImproved": "0x67659dc676411b9d0f40e02dcb934b664abc8f22a45fd6934a1dfd6cfcd9deb1",
"atomicSwapFeeFactor": "0x064cd155fd94e4059e207e32db7756c0097be19306c57bf61774e0a1024d2d24",
"swapImpactFactorPositive": "0xc99541a0a2b9d346b58261c0f9438a8b0406a64d5bcd334a1b4671a81191c4a0",
"swapImpactFactorNegative": "0x6d6b01ffa99d507be49eb5b27911ed5c7682570a8105329a96ac502a102003e1",
@@ -3358,8 +3358,8 @@
"maxFundingFactorPerSecond": "0x58ece9ebee476c6992b7e4411b02419d81d20383d2f311d307465a9f9e00aa56",
"maxPnlFactorForTradersLong": "0x0f923bb0dd0946e1050b7ba75dd88bf9967278e4dfe561715889540d385495a2",
"maxPnlFactorForTradersShort": "0xc9fe228bf6e22c68a23fdd312a66fd5ad61f9ba483081749b95cf2996d66e476",
- "positionFeeFactorForPositiveImpact": "0x2dfe4e7a40a54d4735a5af55c781797d9b9a06190405585b6df4df42a0bd00b6",
- "positionFeeFactorForNegativeImpact": "0x92a73e06bc1f50304c5efd275d352907f5e631cb1894e723d750b208b6eb231b",
+ "positionFeeFactorForBalanceWasImproved": "0x2dfe4e7a40a54d4735a5af55c781797d9b9a06190405585b6df4df42a0bd00b6",
+ "positionFeeFactorForBalanceWasNotImproved": "0x92a73e06bc1f50304c5efd275d352907f5e631cb1894e723d750b208b6eb231b",
"positionImpactFactorPositive": "0xfe23009c84d86851927ecd97ec6347799ff32715b0fe20b75501e126ef8eb443",
"positionImpactFactorNegative": "0x824d020df218432323640679d977c7c98fe3f3029ccafbd63195aa2422eaf290",
"maxPositionImpactFactorPositive": "0xb50a00942d131a9cdc67aeb2b021f253c5f7770f1a1ba680495a485f25d9e13b",
@@ -3370,8 +3370,8 @@
"minCollateralFactorForOpenInterestLong": "0x12be7656b291987a3022965d8be409d4ed7feb1d382eeec36e6d67225d120789",
"minCollateralFactorForOpenInterestShort": "0x5c18aa8765ecd905d817d6f09fc2d40fc0793a5b3e88ef7e071dea5e352eea51",
"positionImpactExponentFactor": "0x1cda6cde74b36b50f765db60993e7a63bf269f5b217d1279cf5f84cefc42ab75",
- "swapFeeFactorForPositiveImpact": "0xeb2fab73e9fdff0596c8c72b854279382d79404b4aade537b8b8c1dbf352f45b",
- "swapFeeFactorForNegativeImpact": "0xf589ab4da11879eaa7be922fbdb14ad14e6be45d55021a50ed0f509c5a5ac0e5",
+ "swapFeeFactorForBalanceWasImproved": "0xeb2fab73e9fdff0596c8c72b854279382d79404b4aade537b8b8c1dbf352f45b",
+ "swapFeeFactorForBalanceWasNotImproved": "0xf589ab4da11879eaa7be922fbdb14ad14e6be45d55021a50ed0f509c5a5ac0e5",
"atomicSwapFeeFactor": "0xd23b9d2924fefa998a226ea0487fa1d4c1f94ebe2e71bc8b03b027659190d2a1",
"swapImpactFactorPositive": "0xb87eba0a263b57b8d2a7dff56d73ab92c164811cd1e56f479690b134e73821ce",
"swapImpactFactorNegative": "0x21eb71230a7c89a8134055d6cd127bc1cbd69041800989e1a5ee25ee1186e241",
@@ -3410,8 +3410,8 @@
"maxFundingFactorPerSecond": "0x54fa90bc24f8ec4d11915477e376d3a3ba2eaff68805cc56f3010ee26ee58df4",
"maxPnlFactorForTradersLong": "0xc096c65bba34dae39facecb48ff0681b31d49086bb6d5de9b06e8ccc7a4d683d",
"maxPnlFactorForTradersShort": "0xf52d306b64f46f2b063e645f3774377ec308c0968723bb3ab0fca3423c4d0496",
- "positionFeeFactorForPositiveImpact": "0x369579ab28cf003f555199fa0ad696810a2b5ce6c6b99b68c651421dccf9eb51",
- "positionFeeFactorForNegativeImpact": "0xa8007eb5a7381de3671f24aa819ea3b3a78aee7c9af638c0ed219f4a94e006a3",
+ "positionFeeFactorForBalanceWasImproved": "0x369579ab28cf003f555199fa0ad696810a2b5ce6c6b99b68c651421dccf9eb51",
+ "positionFeeFactorForBalanceWasNotImproved": "0xa8007eb5a7381de3671f24aa819ea3b3a78aee7c9af638c0ed219f4a94e006a3",
"positionImpactFactorPositive": "0xf2b3a944c7ff519fc4a0e90e963750bde57de840a4e834a2bb1c84e7c3e3536c",
"positionImpactFactorNegative": "0x5d775398a3a1d3decdf0c0b7ff2f38c4245a2585a4bf7e2414b181c550825889",
"maxPositionImpactFactorPositive": "0xef1ee058e62d2940f4c6bdb5d4284a74a47fdfd67bf40881d81675898d995c53",
@@ -3422,8 +3422,8 @@
"minCollateralFactorForOpenInterestLong": "0x561ab444da9e0a84f33004689eaee0620921f53832690234974beadbb2874c16",
"minCollateralFactorForOpenInterestShort": "0x9fa2d3d66e68869a791c2035796e490049a5eef5abb51228c8c92aa66eb2abd2",
"positionImpactExponentFactor": "0x96e4e16197024832d8c5faa031a256a9ce1bc452407a2f713fbfb49a4ea1eb38",
- "swapFeeFactorForPositiveImpact": "0xa6143605375dc242962140d0c9e0f878d85c68e51a3d8e88fe5a56ca06960270",
- "swapFeeFactorForNegativeImpact": "0x412275642d4466535fa1e10c5215a27411e8188aacf2c49e83198b5cdf636ebb",
+ "swapFeeFactorForBalanceWasImproved": "0xa6143605375dc242962140d0c9e0f878d85c68e51a3d8e88fe5a56ca06960270",
+ "swapFeeFactorForBalanceWasNotImproved": "0x412275642d4466535fa1e10c5215a27411e8188aacf2c49e83198b5cdf636ebb",
"atomicSwapFeeFactor": "0xd240a56b63cd3c73e77f4732bce5e8f1f988d267f3a144307ac69a9f9a5923ba",
"swapImpactFactorPositive": "0x697ece2ce23e93349986cb04edc1fd3fb4307a573d679f243701ae39bb87132a",
"swapImpactFactorNegative": "0x19c2660bf05157a6c1248cb90af79be47b7804b52b52bf200a7732aa186c43e0",
@@ -3462,8 +3462,8 @@
"maxFundingFactorPerSecond": "0x5c4885506d3cfcf7c3c3df4da8ba4c32705fbde03ce01fbf66ca63641f5db6e5",
"maxPnlFactorForTradersLong": "0x878e83953134a8b7aae4a5eb5da30d033850a7ea4d2fdec59d0637637d767f7b",
"maxPnlFactorForTradersShort": "0xba6beb80a04dabea3486aa3f32e902bf27f5bfbdde4e3123993c5c17e7900097",
- "positionFeeFactorForPositiveImpact": "0x50e88ebd0aa012a81bca5764a77610505af3166c0f8ecfd5ae63b6357988f677",
- "positionFeeFactorForNegativeImpact": "0x40f2441d2587c304daeb28a5bdc047acd878b49efa716575ffc8f4a77374d0b6",
+ "positionFeeFactorForBalanceWasImproved": "0x50e88ebd0aa012a81bca5764a77610505af3166c0f8ecfd5ae63b6357988f677",
+ "positionFeeFactorForBalanceWasNotImproved": "0x40f2441d2587c304daeb28a5bdc047acd878b49efa716575ffc8f4a77374d0b6",
"positionImpactFactorPositive": "0x26b2e3333bc77d9220de66a9684adafda830b2dd3984fc0135d832c9c9aebda2",
"positionImpactFactorNegative": "0x1d33b34963c591c09fb0dc2f8250ffbb341eb9eb1dd6498b4148137181d6072a",
"maxPositionImpactFactorPositive": "0xf3bc0955f963d0405f9e49d759d533014c9d06e7e60049c1b11ad3cf51b02cd4",
@@ -3474,8 +3474,8 @@
"minCollateralFactorForOpenInterestLong": "0xcb36c8d66209bda963fcd3a7029ca669b114218607d825722851aa897eba7ee6",
"minCollateralFactorForOpenInterestShort": "0x53c5a6626ef4a008718fb02907498f647eb955e8d2e9db15607b547a0e9e0d66",
"positionImpactExponentFactor": "0x6a63ed472aa0faeb03e4fe460e669a1671d1ca63f2fdb32c39f1c11786c97460",
- "swapFeeFactorForPositiveImpact": "0xea517b49e33c27e75463e484f6c8b1fa64d533a6148e33a64a825cce02e3c6ce",
- "swapFeeFactorForNegativeImpact": "0xa7d5519d3e5d0ce9c05ec4df62c4b00339295007b40272ed1284c5a9e47bd77a",
+ "swapFeeFactorForBalanceWasImproved": "0xea517b49e33c27e75463e484f6c8b1fa64d533a6148e33a64a825cce02e3c6ce",
+ "swapFeeFactorForBalanceWasNotImproved": "0xa7d5519d3e5d0ce9c05ec4df62c4b00339295007b40272ed1284c5a9e47bd77a",
"atomicSwapFeeFactor": "0xec0dc1c5be5c65cc62c6a41e7da4842a8b97475be0f2830a19705061d5d4c5f6",
"swapImpactFactorPositive": "0x42aaaeae3f86b5e671a389d5b004816565f03a19ee4da5165ac22336d040cad2",
"swapImpactFactorNegative": "0x33b9b4cb5a208b266e11de020970e508843c67544b51565d15e87b65c6aab0c1",
@@ -3514,8 +3514,8 @@
"maxFundingFactorPerSecond": "0xb24d1a91550b99c973ce6afa96c6ab8b46696ae228ad5f7df4b9e79527211acc",
"maxPnlFactorForTradersLong": "0x10abc2fb3642e6b77e373d7feb742ae7b4f43b8d165ccc63ed20cf7be3a38ff4",
"maxPnlFactorForTradersShort": "0x36f7436deb57e87fb5231f1e926f3c374c28799403850aea708cc0a0b7a13be6",
- "positionFeeFactorForPositiveImpact": "0x230d558789cdeaad85855af6d57dfb2579792b0e4bb659a8ca77e13403775717",
- "positionFeeFactorForNegativeImpact": "0x85d3d3c8408ed4186fb1d31418526ce075322c262bd78196a82be5f47f263d5f",
+ "positionFeeFactorForBalanceWasImproved": "0x230d558789cdeaad85855af6d57dfb2579792b0e4bb659a8ca77e13403775717",
+ "positionFeeFactorForBalanceWasNotImproved": "0x85d3d3c8408ed4186fb1d31418526ce075322c262bd78196a82be5f47f263d5f",
"positionImpactFactorPositive": "0xfb4ed8070ac47be8f9c3ce03faf5c8f0842e961739cd65e3b48883aa4adf73a1",
"positionImpactFactorNegative": "0x14d2c5a86f041487eb054bdc08827a46d9eef3a079e8275e703ec0b3ac5d7639",
"maxPositionImpactFactorPositive": "0xd13f53228e8d8bf025faddd4631cc12fd68e4d48f5aa750afad8589402adfa9a",
@@ -3526,8 +3526,8 @@
"minCollateralFactorForOpenInterestLong": "0x9b60006748c20ded25ebeb6cb5b8b4fa1637b243173d9721a4ccfbe3101e7de3",
"minCollateralFactorForOpenInterestShort": "0x348e708289c489fd0cf6075ef11f4fbf37d202d578080b4cd5b8ca83b27d8dff",
"positionImpactExponentFactor": "0x5069bbbb356975f0360cd8b8e434e3eef837db18168ba1a35726ab20805420b8",
- "swapFeeFactorForPositiveImpact": "0x2870d390da5ab2fb9809a727bb1edabb063250342120237e7333410a6c0685c7",
- "swapFeeFactorForNegativeImpact": "0x066947ada18828b53962d49069334357efc7942ad48f56a49ba67ad05f1492cd",
+ "swapFeeFactorForBalanceWasImproved": "0x2870d390da5ab2fb9809a727bb1edabb063250342120237e7333410a6c0685c7",
+ "swapFeeFactorForBalanceWasNotImproved": "0x066947ada18828b53962d49069334357efc7942ad48f56a49ba67ad05f1492cd",
"atomicSwapFeeFactor": "0x412adb54031393da1f49f36232cc914b0d967448a86304b21c03b564fd61ed8e",
"swapImpactFactorPositive": "0xbe6bf34b093a711520a573026f4af33708c3df6b22ab11fcb08a211a8f3651e8",
"swapImpactFactorNegative": "0xa04e19482a64c2873c80eee75fd5e05a21ea68458c3c31ba6514ceb2e6683954",
@@ -3566,8 +3566,8 @@
"maxFundingFactorPerSecond": "0x080d6f647980e27c4c29eb0fef0259e35b78776eb12952361b643a56d7467a88",
"maxPnlFactorForTradersLong": "0x5b6bc87065748793b2c2f058783f46c620cb13862d8f7be9c625d32ad3ffb1aa",
"maxPnlFactorForTradersShort": "0x5df3f831541534cfe8b567244ca81a1d1c17a339c5c44dd9ccf847dd420840ba",
- "positionFeeFactorForPositiveImpact": "0xe52a6cdd4d02804ca2087972e592e75b4c8448296c882ec0a5bb57428684b465",
- "positionFeeFactorForNegativeImpact": "0x8af552f6423c82c053f9f9a49d8976fc5bf979f90ffcfe60e48f75efe78159af",
+ "positionFeeFactorForBalanceWasImproved": "0xe52a6cdd4d02804ca2087972e592e75b4c8448296c882ec0a5bb57428684b465",
+ "positionFeeFactorForBalanceWasNotImproved": "0x8af552f6423c82c053f9f9a49d8976fc5bf979f90ffcfe60e48f75efe78159af",
"positionImpactFactorPositive": "0xd4030afb92b751b6cd3e4c23d70e48accf8185636083706bc6544769347ac75b",
"positionImpactFactorNegative": "0x4e56928b8af1c4dccfb8cc4fe83564a16bdbd4c86962b7cbd71ed3974d449937",
"maxPositionImpactFactorPositive": "0x81474e9f281247217a132604837f1a17c01f9718727675aad11a63ff67d7f77e",
@@ -3578,8 +3578,8 @@
"minCollateralFactorForOpenInterestLong": "0x84677935537cfc967f4cc379eda203039e555599457a5abe92b8d3be4ff80edf",
"minCollateralFactorForOpenInterestShort": "0x2d128850ff4630e5e64b78a9cc6f155791e11e268c1ee76a65a21a989aaeac95",
"positionImpactExponentFactor": "0xa5c274264328d204dbd59ba0c0c702d8968334ba38a54e107124afaacad4e265",
- "swapFeeFactorForPositiveImpact": "0x308a352f40b9c052ce7816de933a0a33bf97cc8e380329add568c24e7266721c",
- "swapFeeFactorForNegativeImpact": "0x9f6e5823120af6d9685bdd76e8b3305529cf50e322b43f7741bd5e944250a6fb",
+ "swapFeeFactorForBalanceWasImproved": "0x308a352f40b9c052ce7816de933a0a33bf97cc8e380329add568c24e7266721c",
+ "swapFeeFactorForBalanceWasNotImproved": "0x9f6e5823120af6d9685bdd76e8b3305529cf50e322b43f7741bd5e944250a6fb",
"atomicSwapFeeFactor": "0xb9c16ab0a352cd7cbdef66c7ec66d6f8c14b0d34563c4e7460065eecffb8422d",
"swapImpactFactorPositive": "0x6e393cae4a648e5c019243aba3839b664048e7fe1cde4d352859420fd07959b4",
"swapImpactFactorNegative": "0xc80a493f181476d72d586be4a7737108ccc7e4814d2219f4eff178a556f26fde",
@@ -3618,8 +3618,8 @@
"maxFundingFactorPerSecond": "0xf41eed297201b32337b5015b04637412f8c7cf877d9207165824065b9ce12642",
"maxPnlFactorForTradersLong": "0xed40a6622b17aa7f593f513d6c523e1394c152e8444f7d60fb9934ff0a0b3b36",
"maxPnlFactorForTradersShort": "0x3fab9e7f459753e306a6757c56d8494284da59067b34a6dd4e52c4bcb218000c",
- "positionFeeFactorForPositiveImpact": "0xab8c6a651eba9a48ac235d445205bbca5713698e9d67bb5ef0dc2f9426e6aa78",
- "positionFeeFactorForNegativeImpact": "0x032ac540578f841c629bd3639d9e6d77baf2627b1904afafd787db565f967ecb",
+ "positionFeeFactorForBalanceWasImproved": "0xab8c6a651eba9a48ac235d445205bbca5713698e9d67bb5ef0dc2f9426e6aa78",
+ "positionFeeFactorForBalanceWasNotImproved": "0x032ac540578f841c629bd3639d9e6d77baf2627b1904afafd787db565f967ecb",
"positionImpactFactorPositive": "0xedfc5f812a44c154869cc9f560a95108879fe5d9e62f9412566cc073e134fffd",
"positionImpactFactorNegative": "0x354deb6c75877b955292480f888e8b3234e16f3f0925fe00ee8498a4d2ba2fae",
"maxPositionImpactFactorPositive": "0x1eb9f2b1fe7a5cadc30bf113d195fea531766a1f93c49e2aa83237c6608dcc7b",
@@ -3630,8 +3630,8 @@
"minCollateralFactorForOpenInterestLong": "0x6e86a14a179aecf4b9c5d905c249fb4e36fcdaa1976cbaf81acccc340311036d",
"minCollateralFactorForOpenInterestShort": "0xe4d366912356c807f7849ae1df3147f1e7d208e9fc57e01fa4c2013876d14b79",
"positionImpactExponentFactor": "0xa3bd98ef7c63272fec0aae30edea3e455dd7d50b81934602367f7325466365d5",
- "swapFeeFactorForPositiveImpact": "0x13b14819e4af67beb4e9eebd58f4f859b45e51fd720169f4875c52069eaa93eb",
- "swapFeeFactorForNegativeImpact": "0x041dd49ae33ca7961f20bb8147d5da1eb80300c220f91b5bf5acc56d5ae6aba8",
+ "swapFeeFactorForBalanceWasImproved": "0x13b14819e4af67beb4e9eebd58f4f859b45e51fd720169f4875c52069eaa93eb",
+ "swapFeeFactorForBalanceWasNotImproved": "0x041dd49ae33ca7961f20bb8147d5da1eb80300c220f91b5bf5acc56d5ae6aba8",
"atomicSwapFeeFactor": "0x86de7a3b9168b9558a4e968927972ae16bca2c45c79f3c6582d82ac1bd287cd0",
"swapImpactFactorPositive": "0x3d6d4c367caf6195e2e17ccc844e61bfa11362e807edb31ed40c950aa0778457",
"swapImpactFactorNegative": "0x630de465fa6597dfddf3012c25720bad36ddc1f3887a52037a864fb66dc66366",
@@ -3670,8 +3670,8 @@
"maxFundingFactorPerSecond": "0x9100124446cae7a4786e50ca6761bdf352fc6a3d3204f14e120094302af3f3be",
"maxPnlFactorForTradersLong": "0x91d5ef2c1dfd5cdeaccda6be41c0e81b5ff5ca1cc70b18964d8838371a1e8b8f",
"maxPnlFactorForTradersShort": "0xc2e47e1d5f976a489e1e02f890681e390a7dbbb1a75c22b20e8b96fac15f6b7c",
- "positionFeeFactorForPositiveImpact": "0x17a1a4c5c12a42f5051a147fc90f77a01c548f6fcac70763eabbbda3a65cdd65",
- "positionFeeFactorForNegativeImpact": "0x76fe7348053bd8f758cd8e4789c39906eeb5d5ce84205afdd1eb44a7a975a9c7",
+ "positionFeeFactorForBalanceWasImproved": "0x17a1a4c5c12a42f5051a147fc90f77a01c548f6fcac70763eabbbda3a65cdd65",
+ "positionFeeFactorForBalanceWasNotImproved": "0x76fe7348053bd8f758cd8e4789c39906eeb5d5ce84205afdd1eb44a7a975a9c7",
"positionImpactFactorPositive": "0x64da39f22293431948db7537bad61f51ad1777bf4d4d6d4530bffcb919749832",
"positionImpactFactorNegative": "0xeb28da7fbe5a9e66cfaa0e19a9cfa3f394112a3fa0f8faee75b2f47ac283675a",
"maxPositionImpactFactorPositive": "0x7420c427b32409f5e82da6c15ead871dd919fcf1e1e92f384802d5bdb4e8c8f7",
@@ -3682,8 +3682,8 @@
"minCollateralFactorForOpenInterestLong": "0xc28f780855330cd16102ba6fdb7ab47699efa33c0df3fcef42a44026ab9cceac",
"minCollateralFactorForOpenInterestShort": "0x563eda60ad895862bb3e4b14cfeb79a20588ff0aa5e3d5bdfb2ac34f5e66d398",
"positionImpactExponentFactor": "0x3db4ca02007d0bcac3d2f0cfd17c0750e24ba25b8c5eed37cf4cc5eca26ad574",
- "swapFeeFactorForPositiveImpact": "0x1f03c21ebeb7b5ec284e3daaecc7cee0e823b4de3dc555fb313bc64f6e1b85fc",
- "swapFeeFactorForNegativeImpact": "0x79d8564cf98ebc7211cbbb5b36fa9ec46a18bf9b41c3b3ecedfd3adacbd145dd",
+ "swapFeeFactorForBalanceWasImproved": "0x1f03c21ebeb7b5ec284e3daaecc7cee0e823b4de3dc555fb313bc64f6e1b85fc",
+ "swapFeeFactorForBalanceWasNotImproved": "0x79d8564cf98ebc7211cbbb5b36fa9ec46a18bf9b41c3b3ecedfd3adacbd145dd",
"atomicSwapFeeFactor": "0x9ef96e052a9f2aaab829e2a1ef21cc3e919165b44193e112a554f2a07991f25c",
"swapImpactFactorPositive": "0x64e9abf3ebedf7ff2796a8a5fa366a70364fcd4f119fb9d15666e657f73eb729",
"swapImpactFactorNegative": "0x2e08c5b1453619c4951c31850c9f89a154d538c544a90b73e73ba2ef063c9f17",
@@ -3722,8 +3722,8 @@
"maxFundingFactorPerSecond": "0xfd17448b7052a0f4b2202a701bca57f6b687c5a0b7dadbebfd8279f57ddde32c",
"maxPnlFactorForTradersLong": "0xbd4594835ab977699226e141d169ebf31221364cb1e8c00ea02158785a1bd1e2",
"maxPnlFactorForTradersShort": "0x55bc4828ede3e74ebbf0451569d6e312d1109fe3e9a6bc5e40f2699cab82b71c",
- "positionFeeFactorForPositiveImpact": "0x1c2b58fd5a66982e684fc09abb9ddb006bbb7bd04b22776103837b4d22fb88dc",
- "positionFeeFactorForNegativeImpact": "0xfd77db7cb72af668ba7025a65dd934661476da45b8c10e28be6932247f634c66",
+ "positionFeeFactorForBalanceWasImproved": "0x1c2b58fd5a66982e684fc09abb9ddb006bbb7bd04b22776103837b4d22fb88dc",
+ "positionFeeFactorForBalanceWasNotImproved": "0xfd77db7cb72af668ba7025a65dd934661476da45b8c10e28be6932247f634c66",
"positionImpactFactorPositive": "0x7baa57849b07319aaf8c28e1b5d5212e6a673612f5769a366628a21473d4bbce",
"positionImpactFactorNegative": "0xba9cad4f66ee0de01e2762feedf92579733e81433bc367ab173a6d69bf710416",
"maxPositionImpactFactorPositive": "0xe82f4b73da79de37c6d8828c855bc39363701137c4aafac1e50dddfb3a9841cc",
@@ -3734,8 +3734,8 @@
"minCollateralFactorForOpenInterestLong": "0x979afa01e39a53a0ee59cb19c28a83db1f5ecddcf336a44541738671ea529f07",
"minCollateralFactorForOpenInterestShort": "0x6bd77d36ae31370d9b5b25f1b1a1301f9af23bfb9b7afbe1a76a2575570499ad",
"positionImpactExponentFactor": "0x94c1d7ae56d6ee75a8fd07d00a806ad9f19aca4164c883661e618f7bc589c887",
- "swapFeeFactorForPositiveImpact": "0xfda93cb94b8c430cc2c6a1e727953c276b7f78004466a98723415dc018dfca6d",
- "swapFeeFactorForNegativeImpact": "0xaac48c0c555c2263a72df8ed6ebb170df9a43485c970f655c433dd9bca37c935",
+ "swapFeeFactorForBalanceWasImproved": "0xfda93cb94b8c430cc2c6a1e727953c276b7f78004466a98723415dc018dfca6d",
+ "swapFeeFactorForBalanceWasNotImproved": "0xaac48c0c555c2263a72df8ed6ebb170df9a43485c970f655c433dd9bca37c935",
"atomicSwapFeeFactor": "0x8628ddab301e77531e29770e6c0b85c34631783ca617e9ee2e618c086f3005bc",
"swapImpactFactorPositive": "0x380f0aa935578c5e2efc586f4286a0954ecb8de9f0841a9369d5577638949f0b",
"swapImpactFactorNegative": "0x24a92c575b4320d859d42a38cd8c94af9b78339d66e79ecb7423c253d8bc732e",
@@ -3774,8 +3774,8 @@
"maxFundingFactorPerSecond": "0x1fdb4813d9578c34eba7d40e8be3385373c685a85ba9d2937a79ca54b533f862",
"maxPnlFactorForTradersLong": "0xcdea350cca22a37c0bee2fba1a00922504ebd7ecad69e18d81ebfe1cff20bc3f",
"maxPnlFactorForTradersShort": "0x16ccdaa5770845bf1770f898bb130a218207a1abfd694b328cbca0447eefb23c",
- "positionFeeFactorForPositiveImpact": "0xf89efb2df265c4bda64726efa91d82dfe2447cc6e1982d0a5df80b1a6c98e7bb",
- "positionFeeFactorForNegativeImpact": "0x094f55fa807320bc8c19374bf714f9e2fc2eb9909953c31a142756810ed90bbf",
+ "positionFeeFactorForBalanceWasImproved": "0xf89efb2df265c4bda64726efa91d82dfe2447cc6e1982d0a5df80b1a6c98e7bb",
+ "positionFeeFactorForBalanceWasNotImproved": "0x094f55fa807320bc8c19374bf714f9e2fc2eb9909953c31a142756810ed90bbf",
"positionImpactFactorPositive": "0xa1c42743459cc18584470bd7fcf394f287cbcd2426ee98e16b750c0cbe1843a9",
"positionImpactFactorNegative": "0xff8af72e7c6be7bfbf7ebd7235d6610b6495c46ab493997b3e98e6e8c31b8a02",
"maxPositionImpactFactorPositive": "0xd26604e096680008907eda5411c8f65b79e898f7fced8f2e8f3aeb2e113b2146",
@@ -3786,8 +3786,8 @@
"minCollateralFactorForOpenInterestLong": "0xc425f5ca4051c07b0ef0a474ce087918aff548677159081ce684e1832a0dbfe0",
"minCollateralFactorForOpenInterestShort": "0x6bbbbf6814e4de22856022d7020a208a63c369ae1fea354d25df0ff0deb385c6",
"positionImpactExponentFactor": "0x528ceff820b2cc4de63f384e46d279050c14c12bbe069780248ca35209c7aa98",
- "swapFeeFactorForPositiveImpact": "0xce4933def7de695772ebb91c5f48e74ddb76b3948fad48b878dd02ba9caec3f5",
- "swapFeeFactorForNegativeImpact": "0x98ead5e154c29c07125c1e4e8cf110f5a0419cc47ddd938b394d97e787fa587c",
+ "swapFeeFactorForBalanceWasImproved": "0xce4933def7de695772ebb91c5f48e74ddb76b3948fad48b878dd02ba9caec3f5",
+ "swapFeeFactorForBalanceWasNotImproved": "0x98ead5e154c29c07125c1e4e8cf110f5a0419cc47ddd938b394d97e787fa587c",
"atomicSwapFeeFactor": "0x07eb2d60889510925c10701aa6384befe1dd08bb022b06557431c4910710f550",
"swapImpactFactorPositive": "0xde03a55a07d901e98210970ac22f0cdf4cb6bfa89ac97a87aeb924e7382d4d8c",
"swapImpactFactorNegative": "0x295a64c0d9cccfd469c2db10ea4fa9661c3c1630db9f753eb6d33eb59a7c34d4",
@@ -3826,8 +3826,8 @@
"maxFundingFactorPerSecond": "0x3d07c1c798dda7f35e115b1f7b3294455811db0f6b332105e6cd7640ed8d2979",
"maxPnlFactorForTradersLong": "0x0643ab82acd1da935dccdca596b2467d15a15578392c8c1830c74d95cdf56bb5",
"maxPnlFactorForTradersShort": "0x161cd5203040492bf6c154ee5a97667b266446a4a5ca70282f126ecd7616f1ba",
- "positionFeeFactorForPositiveImpact": "0xa2642d8d9d5fb8e2ac0409d2db33e187719016ff7bf134045ae6182666bb05b8",
- "positionFeeFactorForNegativeImpact": "0x23dcc4cd943557ef8ccebe9232754e9ffde52c137f085598ac91e7192a17ac59",
+ "positionFeeFactorForBalanceWasImproved": "0xa2642d8d9d5fb8e2ac0409d2db33e187719016ff7bf134045ae6182666bb05b8",
+ "positionFeeFactorForBalanceWasNotImproved": "0x23dcc4cd943557ef8ccebe9232754e9ffde52c137f085598ac91e7192a17ac59",
"positionImpactFactorPositive": "0x6c77776d5e1445193adfe5b04337025ffcf54bdb11679bf34d87f421df699ec5",
"positionImpactFactorNegative": "0x2565ee54946347b057bf1b32306485f036062453defc85ae44d043c9cff511c4",
"maxPositionImpactFactorPositive": "0x1b5120ca944c5a33e540a1c6e406b523ce921000a984f97f95fa699d520cb7ed",
@@ -3838,8 +3838,8 @@
"minCollateralFactorForOpenInterestLong": "0x50d84922790ede06558e4ca6f2e96902c570c45e4f427cc6fcccdd32dddfecad",
"minCollateralFactorForOpenInterestShort": "0xef11b410c5d53d8e576c956acea505ed667e5d34bb227625e99d6514bc07de92",
"positionImpactExponentFactor": "0xbbea29388c648439a26a387b35619908b6b708893ec6e3555a1f26de057e27ea",
- "swapFeeFactorForPositiveImpact": "0x8ef96c28cee73d45619581b8a28340afbb3e3f7d496d55e1ca67286de61e5f95",
- "swapFeeFactorForNegativeImpact": "0xdf8618a78eede905a9aaa8a5ae18211a6a6bdb3737d54f794c8a999f091c0729",
+ "swapFeeFactorForBalanceWasImproved": "0x8ef96c28cee73d45619581b8a28340afbb3e3f7d496d55e1ca67286de61e5f95",
+ "swapFeeFactorForBalanceWasNotImproved": "0xdf8618a78eede905a9aaa8a5ae18211a6a6bdb3737d54f794c8a999f091c0729",
"atomicSwapFeeFactor": "0x3989f95dc50e51405be5cd609ce63faeb462947821d280425454f5fff74809e4",
"swapImpactFactorPositive": "0x77668158274b0da81643c91786fdaa3d98c20ae3ed3bef765d11798b06b5f5d8",
"swapImpactFactorNegative": "0xb4e19689f59f1f7a32a01249c2fce76b3af38202f0259d90af683019f13690a3",
@@ -3878,8 +3878,8 @@
"maxFundingFactorPerSecond": "0xc4150965d758d86afdcb22b1c6849fa84e8966c11a134af851b682fddf33e4a6",
"maxPnlFactorForTradersLong": "0xf3320cdc63c3a7d6f78ad9986ddb409c5134677e3ad4a0174891020a22b24fb4",
"maxPnlFactorForTradersShort": "0x228b126e5894d16fa46757d3a5a5b6d5710a5b23ea94753de3f9737c4d2c5b9a",
- "positionFeeFactorForPositiveImpact": "0x19a2a68bdbc66fa5dc4851a9378ede85ccdafe9acb99e62c017676872e343a6b",
- "positionFeeFactorForNegativeImpact": "0xd8d7ebb0ecd47d813c8dadf9c1af95bfe460bf83fc2315e7c4ce9f6d63f128c2",
+ "positionFeeFactorForBalanceWasImproved": "0x19a2a68bdbc66fa5dc4851a9378ede85ccdafe9acb99e62c017676872e343a6b",
+ "positionFeeFactorForBalanceWasNotImproved": "0xd8d7ebb0ecd47d813c8dadf9c1af95bfe460bf83fc2315e7c4ce9f6d63f128c2",
"positionImpactFactorPositive": "0x85203630052949e2750737f79f8d56725368a5c53228abbd1afe481db132006a",
"positionImpactFactorNegative": "0x1e7f9610ae2f0862b2ec16dd348ba826566595be72f4492f52ff26c34d673622",
"maxPositionImpactFactorPositive": "0x2de659890a4e8d1963570ff9b59d26e46be9b33cf7e136aacfcb2bb200550ccc",
@@ -3890,8 +3890,8 @@
"minCollateralFactorForOpenInterestLong": "0x6d7fcd1f8264f3f59c707af933ec7782df25287b0b6b5f420a319b58b4886f7c",
"minCollateralFactorForOpenInterestShort": "0xb605b4ef503f9544c442f94b2ac131cf5ee8da1d4e1316784bb9d7cce6d79138",
"positionImpactExponentFactor": "0x5d9ed32420efc0bcbf1596941636a999f62042da229abce2fdd8c931da675f9f",
- "swapFeeFactorForPositiveImpact": "0x062c0c2d730d24aa33c37d80bb065f727dbd4301b42a39c8d2459487d066749c",
- "swapFeeFactorForNegativeImpact": "0x00a2196092d604bf9fc2ea751e06405e37f231e0fff627ce7be4cabc40bf6ca9",
+ "swapFeeFactorForBalanceWasImproved": "0x062c0c2d730d24aa33c37d80bb065f727dbd4301b42a39c8d2459487d066749c",
+ "swapFeeFactorForBalanceWasNotImproved": "0x00a2196092d604bf9fc2ea751e06405e37f231e0fff627ce7be4cabc40bf6ca9",
"atomicSwapFeeFactor": "0xaa8b5f5925e8ddcab441df093f783c1d1c83bfac7ca60f14b8bc3b84c012f08d",
"swapImpactFactorPositive": "0xe317742a7019bf37820ea41ad199bdf4a6252562c7fe43a71abfce8e85ab80da",
"swapImpactFactorNegative": "0xa8e910e7748bd5c02441c6d1c9a77e48c61af20a8e089b02a61a90f7b6678acc",
@@ -3930,8 +3930,8 @@
"maxFundingFactorPerSecond": "0xfa6364fb56a11345b92d4983b9bd8ea66cacd614eb3b7520137399f55d354b09",
"maxPnlFactorForTradersLong": "0x13a27a353c7776ef31a2a496bec36eb5dfb23d8dcdde1c4873ac3c1e35e4313e",
"maxPnlFactorForTradersShort": "0x0b3a39ad3f7d8d1ae1a553ad21654b2fcfd1e55feb8c3efecdf91d53200b45c4",
- "positionFeeFactorForPositiveImpact": "0xfa2c3a7f66301b3059290169c87e11fb20c062c65383b5740c7d3b090bc98e04",
- "positionFeeFactorForNegativeImpact": "0xd3ebf9538ef9ea88d6f7ef51523bc2cf6669cb01aee98f1de1fec0fa53b4eda9",
+ "positionFeeFactorForBalanceWasImproved": "0xfa2c3a7f66301b3059290169c87e11fb20c062c65383b5740c7d3b090bc98e04",
+ "positionFeeFactorForBalanceWasNotImproved": "0xd3ebf9538ef9ea88d6f7ef51523bc2cf6669cb01aee98f1de1fec0fa53b4eda9",
"positionImpactFactorPositive": "0x3daf5ba49e3d385f7036de1ad15a6a638d9dd0a17a2cb765e1d772d5dcd7a91e",
"positionImpactFactorNegative": "0xbe0d09f14005110d076128a12f6a0f4cc2ed5f0048479ee1d1d2658480d07c11",
"maxPositionImpactFactorPositive": "0x07e3c045a079b6ba9dc07038336e09bce8c716941b675d352a7b05ba5b59ce60",
@@ -3942,8 +3942,8 @@
"minCollateralFactorForOpenInterestLong": "0x94a978d635ef737465b195eec16b7f19c6f1bff0017c978ca61a17e5fe8b7808",
"minCollateralFactorForOpenInterestShort": "0x2688ed464f128f747c02828d429a6aa3dccb40e2071454408f3296fbd87a16ec",
"positionImpactExponentFactor": "0xae78eeb8d250d69bc9255def1e262c819c19b3aac6ed2626248730ada04b108a",
- "swapFeeFactorForPositiveImpact": "0x50bf015e1af753131c148a7f0b5a8de5e482f08b30460d48e358105925cff626",
- "swapFeeFactorForNegativeImpact": "0xe248339af6d57cabcbf56a435449881c63af9318e4a9248d8d230f1596d112cb",
+ "swapFeeFactorForBalanceWasImproved": "0x50bf015e1af753131c148a7f0b5a8de5e482f08b30460d48e358105925cff626",
+ "swapFeeFactorForBalanceWasNotImproved": "0xe248339af6d57cabcbf56a435449881c63af9318e4a9248d8d230f1596d112cb",
"atomicSwapFeeFactor": "0xa3fa7dc8862b484cb29feed8cfe4dbf7538e686228f907b5d4d7024ea5aa1c3d",
"swapImpactFactorPositive": "0x1404bcb3b37fd6c73c429f0b67f0326ab072e3ed1c832a41cb8b3ed7eaf9047d",
"swapImpactFactorNegative": "0x5b5cb62ae90c344158744facbd2041a7a9fe2104d068c90945d76de7c5d7fc7b",
@@ -3982,8 +3982,8 @@
"maxFundingFactorPerSecond": "0xeae47123e370dddf6c9579930918a34f59c44b9945b68afb8a693a9444b9e6ac",
"maxPnlFactorForTradersLong": "0x5bc743b0161813f436c45d2bc88a64de29d05cd30d9c1f6e1924f0b138328f57",
"maxPnlFactorForTradersShort": "0xf95dd4ff89517f2fb139ba5f72e2b18bf7aa6ce454abbde2e24678c5e8c826e1",
- "positionFeeFactorForPositiveImpact": "0xbbaa199810a58a8b632296eac0daae34a5f24fdf8013d5ecb0c269f5e9fd4430",
- "positionFeeFactorForNegativeImpact": "0x668119f4388e461b52d33b9119d5fe66bab6e1612657d134841606b722fe5e21",
+ "positionFeeFactorForBalanceWasImproved": "0xbbaa199810a58a8b632296eac0daae34a5f24fdf8013d5ecb0c269f5e9fd4430",
+ "positionFeeFactorForBalanceWasNotImproved": "0x668119f4388e461b52d33b9119d5fe66bab6e1612657d134841606b722fe5e21",
"positionImpactFactorPositive": "0x82d8a24ed60b8b954daaaa4afae9b80786c1a1d3524000b6e8fa2616c79af74a",
"positionImpactFactorNegative": "0x8337e01de60f85dc0a20a5f6c2e0bdc5e8bfcdaf3ac72583acc8a80b1ebeec32",
"maxPositionImpactFactorPositive": "0x2a25ce604cef5d4243bebc4f18af4f6387cbbcd46d1293e23fdfe810cd6854b9",
@@ -3994,8 +3994,8 @@
"minCollateralFactorForOpenInterestLong": "0x4434267baa673353b931f72b997d623a8dbb24ad019fb1012b523e3445a9b522",
"minCollateralFactorForOpenInterestShort": "0x6b1db050ad4883d52b32633aa49159bddd02262af4439b457a32cdcc5988fd43",
"positionImpactExponentFactor": "0x79bfdbb2346f830a4c8d80f29a006b0baa9367418902e8b3c93a1213c9eed125",
- "swapFeeFactorForPositiveImpact": "0x0faa1337b525b28e6422cd472df6548c0da443bc9077ed0fe6fa694f8ee772c7",
- "swapFeeFactorForNegativeImpact": "0xf9975025f98c1742bafc5964493e42785f56e6673592097971feb7aba4729a0b",
+ "swapFeeFactorForBalanceWasImproved": "0x0faa1337b525b28e6422cd472df6548c0da443bc9077ed0fe6fa694f8ee772c7",
+ "swapFeeFactorForBalanceWasNotImproved": "0xf9975025f98c1742bafc5964493e42785f56e6673592097971feb7aba4729a0b",
"atomicSwapFeeFactor": "0x12fc02d199272ac56852e8a778bf732653628467efe2892262314456f4dbea18",
"swapImpactFactorPositive": "0x107517ca8068a2882de0bab37ab86b35e91cfd63473089cacda01bc81f1c7daa",
"swapImpactFactorNegative": "0x1e7d0f85278824210a3ce74721f888e34dee24c518278d80952dc9f1024b7f65",
@@ -4034,8 +4034,8 @@
"maxFundingFactorPerSecond": "0x0fe3f71d3f4e380ac4bd1d45ec26be57ea2ec86a9e893c45e824fddb3233e5a5",
"maxPnlFactorForTradersLong": "0xd9ccc9e84419059f691fdd180aecb410ad79540c2cafa902da62d54128d754e1",
"maxPnlFactorForTradersShort": "0x88354aedfe906b9fb49ba2f728bfd0ddd470c9a1cc85cc055f0d716a3f2f54fb",
- "positionFeeFactorForPositiveImpact": "0x5e34672fc4f42ab23d23213fa1d40cebe0a3e7bcf87eb11b76d2fcc1be32e252",
- "positionFeeFactorForNegativeImpact": "0xf8e3dafc3f767e6295802eac15d1b04db4698328bcc74af85b81335b8ff21c99",
+ "positionFeeFactorForBalanceWasImproved": "0x5e34672fc4f42ab23d23213fa1d40cebe0a3e7bcf87eb11b76d2fcc1be32e252",
+ "positionFeeFactorForBalanceWasNotImproved": "0xf8e3dafc3f767e6295802eac15d1b04db4698328bcc74af85b81335b8ff21c99",
"positionImpactFactorPositive": "0xff8e09a7151d33fcf5165e2ccf6ac14c30d229f18ee3a60a95abf260d1d243ac",
"positionImpactFactorNegative": "0xed76416203eb5df0eae69591d057f2870fc448171a7e014906c629b9e71cda12",
"maxPositionImpactFactorPositive": "0x5dae48e6dfe9c144cd58a6e4b90c070ef559116c76518323bed64e54cb43c85f",
@@ -4046,8 +4046,8 @@
"minCollateralFactorForOpenInterestLong": "0x24d067bde87a33817afba6f9159b1f879be5f907de489107e0e32433665c7c1d",
"minCollateralFactorForOpenInterestShort": "0x970902c830d69c75cf173a1493daf4144604122b2f7b75fe359cbe15ea3dcd4d",
"positionImpactExponentFactor": "0x099e85a8f05448a4731818fa874d8796b78a9a46cc87197eef4bb972b10e456a",
- "swapFeeFactorForPositiveImpact": "0x440a965a2877911c4c99d8a22338d137721fc202a2d1e7ca75cdc9f094ba65b0",
- "swapFeeFactorForNegativeImpact": "0xc926687ddd09ffe9ac71036d2dc7f560dc5b6ec92d888c1cf3e6195288dd6e80",
+ "swapFeeFactorForBalanceWasImproved": "0x440a965a2877911c4c99d8a22338d137721fc202a2d1e7ca75cdc9f094ba65b0",
+ "swapFeeFactorForBalanceWasNotImproved": "0xc926687ddd09ffe9ac71036d2dc7f560dc5b6ec92d888c1cf3e6195288dd6e80",
"atomicSwapFeeFactor": "0x7a0ebfae0537a6ec5958b1455006293dfae06de26368232249a3abdb986ab98f",
"swapImpactFactorPositive": "0xa49e8eda8b34c14886ad044ddd88d3fa227afc72878a3c40e5d79a9528d0828a",
"swapImpactFactorNegative": "0x5faab11fcfbefb319520e36256399baa608cde5c8dd19f2ca05aedf022d92b60",
@@ -4086,8 +4086,8 @@
"maxFundingFactorPerSecond": "0xa8772b6fe3e4bd1d145d63b633a14f0cc582e9e9e82d9f70afd965f3a00bcd03",
"maxPnlFactorForTradersLong": "0xc778833983adf3aa53bbacdea870efa89b5919c3541f7446c37fb4400a12a024",
"maxPnlFactorForTradersShort": "0xff7edb9cbc1b4d90d770d471c02a00bee32110e8343ec2fba13f34c52d474088",
- "positionFeeFactorForPositiveImpact": "0x0d3420aa928b1da5f586478312c805f7ae21afe9e7baa721059122518ef67f63",
- "positionFeeFactorForNegativeImpact": "0xd4ade9db9240512e1c696eb045235faf299ceac74180cf1a2027c662628aa3e0",
+ "positionFeeFactorForBalanceWasImproved": "0x0d3420aa928b1da5f586478312c805f7ae21afe9e7baa721059122518ef67f63",
+ "positionFeeFactorForBalanceWasNotImproved": "0xd4ade9db9240512e1c696eb045235faf299ceac74180cf1a2027c662628aa3e0",
"positionImpactFactorPositive": "0x5ce30f4b82ba55df0e987029ded936711b6d1aff9a7aaad80a7edaf4eccd1603",
"positionImpactFactorNegative": "0x05bfa4d4d178163c174ca600f23edd2beacb6251cc497dae969209ba7a28d586",
"maxPositionImpactFactorPositive": "0x985a11ed1a8a61ba0836724b434483e8888ebbe9e30d8ac70cf036fc4e7685e0",
@@ -4098,8 +4098,8 @@
"minCollateralFactorForOpenInterestLong": "0xf2505508b048b3a9f6cd5d4f0f28decb75a374a948a988d270c8da823ffd628d",
"minCollateralFactorForOpenInterestShort": "0xc3922e36cb2027c649f679b0f13d927854201b6e8c96cf50c664679c9ff837c1",
"positionImpactExponentFactor": "0x8d9148077d210c110220baff03e054b10b421a3f985a98fd1db1545c7318a3fa",
- "swapFeeFactorForPositiveImpact": "0xef5f72f2eb9555a8148a2e1401958032aacc197c1da4022f0ec23590e253b6fa",
- "swapFeeFactorForNegativeImpact": "0x95126626376b73774a4e8e523fb0db25be1726d1a0c5b08723b2efb6276b3561",
+ "swapFeeFactorForBalanceWasImproved": "0xef5f72f2eb9555a8148a2e1401958032aacc197c1da4022f0ec23590e253b6fa",
+ "swapFeeFactorForBalanceWasNotImproved": "0x95126626376b73774a4e8e523fb0db25be1726d1a0c5b08723b2efb6276b3561",
"atomicSwapFeeFactor": "0xbe395a7e6a556993f306449f4d11f63501a384176881647c46a37cc23d327072",
"swapImpactFactorPositive": "0xc131b1e245ee5a6f5be3d03064d8b0b6510fe566b50f6c0c7e65a42270eb68d0",
"swapImpactFactorNegative": "0x20f8d97e59061e27885e0d392886682d392172249b499132c6b686874c2353ed",
@@ -4138,8 +4138,8 @@
"maxFundingFactorPerSecond": "0x8daecf054a29b3068ae7b310026a2cfc33b6d325a507d8f38600c0cd4533e22b",
"maxPnlFactorForTradersLong": "0x5b696c70bfe0b7b753a58b050c1701e8d0d2a17895c180b9436a9b9a00072830",
"maxPnlFactorForTradersShort": "0xb5d1ce491c48ca9730b200fd60aaf94f616beb58f1c082d860911c0a8f7e0ad7",
- "positionFeeFactorForPositiveImpact": "0x9e7af6bbc811961fb58a5140293e936a7fc8e62662a854d73e063fab60dbb7a0",
- "positionFeeFactorForNegativeImpact": "0xcdd1ad112670f69342d21f543b820df3250e6d0b243b1b8aefc8345b89abb2ab",
+ "positionFeeFactorForBalanceWasImproved": "0x9e7af6bbc811961fb58a5140293e936a7fc8e62662a854d73e063fab60dbb7a0",
+ "positionFeeFactorForBalanceWasNotImproved": "0xcdd1ad112670f69342d21f543b820df3250e6d0b243b1b8aefc8345b89abb2ab",
"positionImpactFactorPositive": "0x7fea51d79d1e76d3cb89da3577667440e794d696ec37d7fc5f7f921a8bbfe41b",
"positionImpactFactorNegative": "0x03008449d0e3cf33fed94b24e8e058423e91206a57cbdb0b0f228173099744da",
"maxPositionImpactFactorPositive": "0xae8761a60ec47c251789ab4ba75ff174152d05306b538265b50ed7906a9edb99",
@@ -4150,8 +4150,8 @@
"minCollateralFactorForOpenInterestLong": "0x4634662dada17c503986cce2faed9f7fc072f1051ebdd20db92b238c9f9ca03b",
"minCollateralFactorForOpenInterestShort": "0x55718911d60d30d9b398b5790a01cfd8f83b42419d8e02cfaea4d5187c3f4b5b",
"positionImpactExponentFactor": "0xa44af56cb9b277271d9b9a56b3650c87c94903e5f5405288258716550afa72f6",
- "swapFeeFactorForPositiveImpact": "0xc4ba621aee7406ad5aee070791330082eca4849f02c5b02b28c722866a81e489",
- "swapFeeFactorForNegativeImpact": "0x3a9540bbf96991551bb54d2f395b5549386da9efb15ea31bd2b2324ffeb59f1c",
+ "swapFeeFactorForBalanceWasImproved": "0xc4ba621aee7406ad5aee070791330082eca4849f02c5b02b28c722866a81e489",
+ "swapFeeFactorForBalanceWasNotImproved": "0x3a9540bbf96991551bb54d2f395b5549386da9efb15ea31bd2b2324ffeb59f1c",
"atomicSwapFeeFactor": "0xa1424279e592282be92a583ce5c44f2eab6258665b0793dc39c5345a33a23464",
"swapImpactFactorPositive": "0xa8ef70684dcb1134f6786ae9427f62a50b92c4aef310158cd0f006bd34075508",
"swapImpactFactorNegative": "0xbf74a7204ca3863044e31f33237488f15c51f51ce170161904e97f6076dc6f6c",
@@ -4190,8 +4190,8 @@
"maxFundingFactorPerSecond": "0x9fe2c3a88553e6c8f1a937d605937e19ea8b8d768dfab0313ad6b0c4b727ed25",
"maxPnlFactorForTradersLong": "0xefd0786c97fd0c1e5efe12c265540afe49357b5ce9410f203116ef97dfcbabaa",
"maxPnlFactorForTradersShort": "0xef485852c8c3ee8c55de7e52d063da274901d0045a61839f7a8ffb2edee2037e",
- "positionFeeFactorForPositiveImpact": "0xbbedf3f173f1ef4c451104ab8d9e85c4a8668255fd6383313da5e39c7e3fdf8b",
- "positionFeeFactorForNegativeImpact": "0x2ef8737317c51e79612d985e398958d73119e5a3d176530ac7b67a2008c9176a",
+ "positionFeeFactorForBalanceWasImproved": "0xbbedf3f173f1ef4c451104ab8d9e85c4a8668255fd6383313da5e39c7e3fdf8b",
+ "positionFeeFactorForBalanceWasNotImproved": "0x2ef8737317c51e79612d985e398958d73119e5a3d176530ac7b67a2008c9176a",
"positionImpactFactorPositive": "0x46205b42a73fde3057a08e8a43372557878909432252cf53a39eb8b568acd1e1",
"positionImpactFactorNegative": "0x3fbbd6e4687059e8cd17798661898c1e6ac18c15305a69cba17f6aadb716996d",
"maxPositionImpactFactorPositive": "0x09ab49987e86f02b3648e2765ed1d4d25bd1b0112530f62e0a33b726318fa816",
@@ -4202,8 +4202,8 @@
"minCollateralFactorForOpenInterestLong": "0xb2a7bec849de6c6b7a38d4d561e876a210dbebde36c0a50dc37aad9083f73647",
"minCollateralFactorForOpenInterestShort": "0x08927937fa841003e009e8b483a7c0c26168f27b686c4bd9d2d6df5e5a0ceca5",
"positionImpactExponentFactor": "0xcfcb8341caceb9af4665161bc4a5585b88134830d36019917b0cc166b439155a",
- "swapFeeFactorForPositiveImpact": "0xd18573dc8f2a53bf9106216a900f943172999abf8f4b78c32a02ffb16fc9bb1e",
- "swapFeeFactorForNegativeImpact": "0x6c9413f2853edd95a6752ced7c2bc05d4a59510e00f373d505f141630abbc5e8",
+ "swapFeeFactorForBalanceWasImproved": "0xd18573dc8f2a53bf9106216a900f943172999abf8f4b78c32a02ffb16fc9bb1e",
+ "swapFeeFactorForBalanceWasNotImproved": "0x6c9413f2853edd95a6752ced7c2bc05d4a59510e00f373d505f141630abbc5e8",
"atomicSwapFeeFactor": "0x8523c99151414acbe1151e349da6bdad037043215e785e5ddaa7ac7536e34e11",
"swapImpactFactorPositive": "0x0466561a2291ccd4142344bd5609995bd96af67dda47cc7c6477b160d5fa60a4",
"swapImpactFactorNegative": "0x463b2d08a99a0fbee14d053a2dbb048bf69fea6fa054f72852401d083cff1e33",
@@ -4242,8 +4242,8 @@
"maxFundingFactorPerSecond": "0x84b82ffe4834b4f94641d9a3e2a60fbc0ff1d7e4937d430ee80a014b13175f04",
"maxPnlFactorForTradersLong": "0x5c42ebcdd5cc73bbf367156af70735b25897a6accb5699e2dd442a3e7aec32a8",
"maxPnlFactorForTradersShort": "0x4845b537832a8b591e75676444faad0887e9747c7624c43298a64ef95d1c2d9a",
- "positionFeeFactorForPositiveImpact": "0x379014e598d8d0024d508ff729cf9a31eaa22b3554e89bce3ed00e48534e7c5e",
- "positionFeeFactorForNegativeImpact": "0x62a50f7f748ef2572aa3c3f6f486616ea33a0067bab4b7269610a1cacde6300e",
+ "positionFeeFactorForBalanceWasImproved": "0x379014e598d8d0024d508ff729cf9a31eaa22b3554e89bce3ed00e48534e7c5e",
+ "positionFeeFactorForBalanceWasNotImproved": "0x62a50f7f748ef2572aa3c3f6f486616ea33a0067bab4b7269610a1cacde6300e",
"positionImpactFactorPositive": "0xf181edeb1432f629bf14e39df272865fcc52c85bc89c06fe329eead795328349",
"positionImpactFactorNegative": "0xb409ce5f332ad37f5a8f1dd25badc32e20e7526c80ac6cba8faa43afd32f748f",
"maxPositionImpactFactorPositive": "0x9acf59a110f586200c0fc1906a2b18a23d3033df529808b6dcf746e8a235e46c",
@@ -4254,8 +4254,8 @@
"minCollateralFactorForOpenInterestLong": "0x8c69704d7ad8d47b8fc79dd9f203c622ac43de9aaa60e25de14b70468e2d9b25",
"minCollateralFactorForOpenInterestShort": "0xfb46f190074aa0025c421e05d226229b80b32da2a638dc566c0ee9b31a62b25e",
"positionImpactExponentFactor": "0xfa76ae24b59f8ccb8233c444e1d247e8e7dd78cdb2a7e1ba29dfbb782c4d00da",
- "swapFeeFactorForPositiveImpact": "0x9108de9102344a53cfaba2ef2d276e027bb6b4051c3e818d7ecbddfc291f9e1f",
- "swapFeeFactorForNegativeImpact": "0xac6ef53ecc38b138b10d39e00eeabffd9e05f54cc9903fe59702b86960bef8c5",
+ "swapFeeFactorForBalanceWasImproved": "0x9108de9102344a53cfaba2ef2d276e027bb6b4051c3e818d7ecbddfc291f9e1f",
+ "swapFeeFactorForBalanceWasNotImproved": "0xac6ef53ecc38b138b10d39e00eeabffd9e05f54cc9903fe59702b86960bef8c5",
"atomicSwapFeeFactor": "0xfb5cf4b45d7ee1149347aeb46aef578efd22e69901f21d1f4092a2a870c59a33",
"swapImpactFactorPositive": "0xd6c74362814ea6fd65d9379cfd8fe06f850ac287b75940fd77e0bdc45264edcf",
"swapImpactFactorNegative": "0x1db488bdc1bc0726b938a5242b366c388f4ee2152ebfa088e8e35bec3646688d",
@@ -4294,8 +4294,8 @@
"maxFundingFactorPerSecond": "0x3c9d9d1f111fa67d6bd93cc0f9e4a1a5c246a21a0ca8f42c669cdd823bab1b9f",
"maxPnlFactorForTradersLong": "0x4a26b85b0edbcc0d6335cf602ad6819e51cf6dc24e391701e6bdd1fcffcd4544",
"maxPnlFactorForTradersShort": "0xa96b85aebd11c974023e9971202a74e79c3de43f9c6d4f88c15f593aed77c6ca",
- "positionFeeFactorForPositiveImpact": "0x08e0db12c4cbc02b52715243b24006c9e0b1ae4dd8a65bc497ce4500a7759354",
- "positionFeeFactorForNegativeImpact": "0x7ae5c5977ac6c2ff75b5c33f55891a1ee92ca01a91cace6d34537f7b086d0e39",
+ "positionFeeFactorForBalanceWasImproved": "0x08e0db12c4cbc02b52715243b24006c9e0b1ae4dd8a65bc497ce4500a7759354",
+ "positionFeeFactorForBalanceWasNotImproved": "0x7ae5c5977ac6c2ff75b5c33f55891a1ee92ca01a91cace6d34537f7b086d0e39",
"positionImpactFactorPositive": "0x0944db16ab1c5ed44b2f30434f9b1f20b11406eebd67e778867da43b508b1b85",
"positionImpactFactorNegative": "0x2ff6188ffe909ac033eee6b4e28cb823b6c9a8160eb32606cbed952f9befab63",
"maxPositionImpactFactorPositive": "0x44c15ba958ee8bbe1a9e5c73c10b75c6936ba34584c9547fedba2728646ee3c0",
@@ -4306,8 +4306,8 @@
"minCollateralFactorForOpenInterestLong": "0xdbaf0c15b855b2a4e1a68a581469b8c5d15f803cdeeb711edb1640fd38715903",
"minCollateralFactorForOpenInterestShort": "0x9500d9c8dd829f81ebe5f3ce2e2346a105d682ef0a0d35b37aeac9aa198cdf04",
"positionImpactExponentFactor": "0xe0b1128fdc394a8c3371e2492ddebebe5899f40de9d868c640a7b65d7bdf7626",
- "swapFeeFactorForPositiveImpact": "0xf7babb8373684c29ab67c7c832c6c4b2c9b94b8a48076a67d20626bb86628c7d",
- "swapFeeFactorForNegativeImpact": "0x4f1228c156db69f770af6b10bd34a80b2fef41dd296f68fb8ae17e9f3dfe963a",
+ "swapFeeFactorForBalanceWasImproved": "0xf7babb8373684c29ab67c7c832c6c4b2c9b94b8a48076a67d20626bb86628c7d",
+ "swapFeeFactorForBalanceWasNotImproved": "0x4f1228c156db69f770af6b10bd34a80b2fef41dd296f68fb8ae17e9f3dfe963a",
"atomicSwapFeeFactor": "0x31d209dbe461712a524e488388590e9540ae49400a417ef88110f2a7a977d43a",
"swapImpactFactorPositive": "0xb0b789da107bc523fb4849e8957a7d3df09235a6b2850f32e32fa6c800fd2d13",
"swapImpactFactorNegative": "0x3bdfc565c4eef3a98276ee71419fdc582ba1352266adce60e15cae7b1ab6a3a0",
@@ -4346,8 +4346,8 @@
"maxFundingFactorPerSecond": "0xc95e5766d063b66a9e4d828a8f343d3605b797acb939d8052f7cb165f12a720b",
"maxPnlFactorForTradersLong": "0x69314750ad39f2f926595327d9d5783f3a5792f33631e9218dcad706b2ce94e3",
"maxPnlFactorForTradersShort": "0x917f17d9d3c1f59b94587197bae5b84ca8b68cdce19ec0b0adb596e165a2ae8d",
- "positionFeeFactorForPositiveImpact": "0x4dab4716911af2ebdc1d72a2f2dc28f991adae1052770fd33ecba110bc7513ac",
- "positionFeeFactorForNegativeImpact": "0x69a65a7c1becf35bd454efc07b02f5463d4e2b98fb575ba61e25e43ad7206655",
+ "positionFeeFactorForBalanceWasImproved": "0x4dab4716911af2ebdc1d72a2f2dc28f991adae1052770fd33ecba110bc7513ac",
+ "positionFeeFactorForBalanceWasNotImproved": "0x69a65a7c1becf35bd454efc07b02f5463d4e2b98fb575ba61e25e43ad7206655",
"positionImpactFactorPositive": "0x5e6e2a363e7c6f89c43d49f1ba94149d918067ab1b7434f796fcf4a2f6c3fead",
"positionImpactFactorNegative": "0x4e8b3ce015d13d1bb91d976bcd74334b6cfbe4e745fb898e6c012e2c19c0f8e6",
"maxPositionImpactFactorPositive": "0xb47910941cab06e9dc81d5662459e379e94e34b4dfbdd0c7e28fad6ad30e3e76",
@@ -4358,8 +4358,8 @@
"minCollateralFactorForOpenInterestLong": "0x2a6d115de938ad85af12ca1d26a0f6644a2fe0599b2ab86f8acf87cb5624ae5d",
"minCollateralFactorForOpenInterestShort": "0x1ebd2256b3e588b811528c35ae535b13a6318727480afd98deddbc5642ccbc3b",
"positionImpactExponentFactor": "0xb245771c3ae81dfd3366eedd6e85e62cb81ded22f089f674bea08570fc61eb0f",
- "swapFeeFactorForPositiveImpact": "0x80dd606da911d750d12feac8732c5a270c3c995c4ca3d3e54079dbac2379b81e",
- "swapFeeFactorForNegativeImpact": "0x383121b58b83900c41c948bd2c559ea94adb05b4056fd61bbad4c59e84769e7c",
+ "swapFeeFactorForBalanceWasImproved": "0x80dd606da911d750d12feac8732c5a270c3c995c4ca3d3e54079dbac2379b81e",
+ "swapFeeFactorForBalanceWasNotImproved": "0x383121b58b83900c41c948bd2c559ea94adb05b4056fd61bbad4c59e84769e7c",
"atomicSwapFeeFactor": "0x4f9d4884fbe826892eb18a9bdc05b6e6dc722527913d699264560a50c0939931",
"swapImpactFactorPositive": "0x4bba0afab3bdd086e0cd858248bfc9a06b6a3b70331b7d26f8a7bfa935a4359f",
"swapImpactFactorNegative": "0xb354aac74baaf2cae90e78e7317392d514e57f555419d292ed80602fc3024b5b",
@@ -4398,8 +4398,8 @@
"maxFundingFactorPerSecond": "0x3b7e464dcc32f8d2c77e860a0077bb7b6e7fc8714ace34540f4b6729f2eac88d",
"maxPnlFactorForTradersLong": "0xb208f47a51944a9a40b2a68077be5ea5fb7056fc84e61b956d48c8ceec66bc12",
"maxPnlFactorForTradersShort": "0x837ea7e37d8fd9b843af71b7807536a04c768cb06fd91ae0e50ce8dba9666314",
- "positionFeeFactorForPositiveImpact": "0x1f39632e8494b846449daae6b44f2092a07a39491e40fe93a9bf4db709fcc668",
- "positionFeeFactorForNegativeImpact": "0x07e92106a27e33237eafa3dafd9f7c37e6ad36c6f6e5ab7e0381c751bf12879e",
+ "positionFeeFactorForBalanceWasImproved": "0x1f39632e8494b846449daae6b44f2092a07a39491e40fe93a9bf4db709fcc668",
+ "positionFeeFactorForBalanceWasNotImproved": "0x07e92106a27e33237eafa3dafd9f7c37e6ad36c6f6e5ab7e0381c751bf12879e",
"positionImpactFactorPositive": "0xae5be4d434eba0b99dcad4871a12edc786a7da4fc7a10f3af9f1f64bc45bda4d",
"positionImpactFactorNegative": "0xd306cf22995c236c2a25bcada07a1dce802918a16cb408e62c4c52df3bd940b3",
"maxPositionImpactFactorPositive": "0x4f8676b09189ae01e2d7895f06b00bfd93fa644c104976a0e56d0ca82bd5f4e4",
@@ -4410,8 +4410,8 @@
"minCollateralFactorForOpenInterestLong": "0x52afa3711c1e690c0bf7e156928aa8384c28f540b26fc9b607b05ca73c18bfd8",
"minCollateralFactorForOpenInterestShort": "0xbad6087b3466806fabbea91fd5fc6f95036dd696fda16dc077d0b562c1ea1889",
"positionImpactExponentFactor": "0x0b1c98df3775838da85a0fdc248a1cf9af5f8bd89a1a352595f658ee771f879a",
- "swapFeeFactorForPositiveImpact": "0x0742e3f8db96ac05a07e004082428d900b556728a65c070a50e583aadb586cde",
- "swapFeeFactorForNegativeImpact": "0xb0bc201c5b3d7ab2b6ae7430be01c9c0e53c7c22156ba22a14e00d5c4a0e44ef",
+ "swapFeeFactorForBalanceWasImproved": "0x0742e3f8db96ac05a07e004082428d900b556728a65c070a50e583aadb586cde",
+ "swapFeeFactorForBalanceWasNotImproved": "0xb0bc201c5b3d7ab2b6ae7430be01c9c0e53c7c22156ba22a14e00d5c4a0e44ef",
"atomicSwapFeeFactor": "0x5ac6e757ce8023173330912b9cf86157c369be3398b55ba4a7c490064fa6a5cb",
"swapImpactFactorPositive": "0x05b1fb95bc342c7618a883a763fbbd253740020c12568b3c5841032ee9a91fb8",
"swapImpactFactorNegative": "0x282f8a9226a14b7842f6da9a0232abcd867444a585257987dd9f5335a699b1be",
@@ -4450,8 +4450,8 @@
"maxFundingFactorPerSecond": "0x905535745f7dcc7ead3aa76a0505be53c7023ed5513d92b1418438b715038a0d",
"maxPnlFactorForTradersLong": "0xe501de2bc8a93d96072b609a4fd425fc203869cef4c669dd5fb53c8a6c87783d",
"maxPnlFactorForTradersShort": "0x37d75f0c5eeee8bdbd315af93d214125900cf328a96dff2a73e020f133bd3f28",
- "positionFeeFactorForPositiveImpact": "0xba562318f5a151012be658e077d0d12ad906a8842a0a842a00cc28548f25da04",
- "positionFeeFactorForNegativeImpact": "0xdbcb16c248b9bf77d2fad4161594283cbf8a2ae70cee09903580ba9d7db32b7b",
+ "positionFeeFactorForBalanceWasImproved": "0xba562318f5a151012be658e077d0d12ad906a8842a0a842a00cc28548f25da04",
+ "positionFeeFactorForBalanceWasNotImproved": "0xdbcb16c248b9bf77d2fad4161594283cbf8a2ae70cee09903580ba9d7db32b7b",
"positionImpactFactorPositive": "0x35db73cdefabea11f6cd0fa43405fdda2426809523af9751022b923c4b11c3f6",
"positionImpactFactorNegative": "0x7e8250a02a5cba229d6b061c7c308617c8276ed6bfd08646425add04874f30da",
"maxPositionImpactFactorPositive": "0xb34426026ad3844ff8e007e94303faf42789223dfda616700ff05ac9bf3fb53a",
@@ -4462,8 +4462,8 @@
"minCollateralFactorForOpenInterestLong": "0xa7fc29d21ee4ffceb464f9889c70a3c5f92c8c48dbd5ffc824f088dda4b7515e",
"minCollateralFactorForOpenInterestShort": "0xc50491facbf7c3258a02e4353a0a8ffe64cc09fb4e9b86c8128e56b23b86d861",
"positionImpactExponentFactor": "0xa4552e9093aea5811829cf3a7fd9fdf23f2e84611cb07ff5aa35358e0b63be97",
- "swapFeeFactorForPositiveImpact": "0x193d6f23c11a79d96b193a6e7cf4b05bbb7992031f956951ce396da8ff34812b",
- "swapFeeFactorForNegativeImpact": "0xc6c49c25a6e5ba44da9722086f13b338b228602a55b3f441cf9e3088ae7bf488",
+ "swapFeeFactorForBalanceWasImproved": "0x193d6f23c11a79d96b193a6e7cf4b05bbb7992031f956951ce396da8ff34812b",
+ "swapFeeFactorForBalanceWasNotImproved": "0xc6c49c25a6e5ba44da9722086f13b338b228602a55b3f441cf9e3088ae7bf488",
"atomicSwapFeeFactor": "0x2d9e442b1a976ff0bfc39bce6bc7316886f81ca7027007be437ef906d687f99f",
"swapImpactFactorPositive": "0xb410710dbae13f219397473794d9620624cfe337962ea6caa4a702e0ee64f15c",
"swapImpactFactorNegative": "0x789b271f70ed1b702855f3068f9d21c8443b15374529527d1a2c45c1cb7664fa",
@@ -4502,8 +4502,8 @@
"maxFundingFactorPerSecond": "0x47e5eba0fec951108b66c2f06e9f318bc9453d6bd745b1b7e9abc20fd127cc56",
"maxPnlFactorForTradersLong": "0xd28e554a9db012d4ed8eeca3ac8cd3f086bff391c07e8af5a410d1758ebbab6b",
"maxPnlFactorForTradersShort": "0xd97bc32d7a6ec33719b5ac9e2b9b2d6f2db019c4f6d8170834ca4563475f58f2",
- "positionFeeFactorForPositiveImpact": "0xc7e8a7e9eaa0ee2272f8bd1739375f19a3e3173788db16906632bd75c8718f24",
- "positionFeeFactorForNegativeImpact": "0x29d9955cd26be376209096ce2ad3370e5b36ac80441815ba824f2d195e0ad0b7",
+ "positionFeeFactorForBalanceWasImproved": "0xc7e8a7e9eaa0ee2272f8bd1739375f19a3e3173788db16906632bd75c8718f24",
+ "positionFeeFactorForBalanceWasNotImproved": "0x29d9955cd26be376209096ce2ad3370e5b36ac80441815ba824f2d195e0ad0b7",
"positionImpactFactorPositive": "0x36fabe1eed7764e5e1ec15bb1ed069e590e7efaaa6f9e706ccb21400871ff524",
"positionImpactFactorNegative": "0x79aea67bc97087b08fd95200aab558b7a9646b9a26761bf62a1d3602c53fff0d",
"maxPositionImpactFactorPositive": "0x0d08c828dc9d769eeae616f4eb633aff60e0590d4e9f139ca4ed3896cc1ecef8",
@@ -4514,8 +4514,8 @@
"minCollateralFactorForOpenInterestLong": "0xb31a483d7cacd648d5b1cead2934dce80ffb22bbb0b1b5eacf4f680e7a7f51ef",
"minCollateralFactorForOpenInterestShort": "0x9ef84ecd0f238d5e66bd19a337209e1da9e3e0c64cd87235d596cafe0b151459",
"positionImpactExponentFactor": "0xd39d36b5e26e0afd6b2bf7741114b6c4bcf6a7622e6234600ac9eafdbeae8fcc",
- "swapFeeFactorForPositiveImpact": "0x418a49be80d3245ccf3c39d463131554ab2a57384eea5a6c25b22516862b90b1",
- "swapFeeFactorForNegativeImpact": "0x83e5cb7cd6c5e665bf17311da7f373e698f0da5dd2a33a7cfcf0e383d4b71d20",
+ "swapFeeFactorForBalanceWasImproved": "0x418a49be80d3245ccf3c39d463131554ab2a57384eea5a6c25b22516862b90b1",
+ "swapFeeFactorForBalanceWasNotImproved": "0x83e5cb7cd6c5e665bf17311da7f373e698f0da5dd2a33a7cfcf0e383d4b71d20",
"atomicSwapFeeFactor": "0x3f94f7663c8911ea518a485ce2d6502e19cd61a00dd5da82b412a37a16ab296d",
"swapImpactFactorPositive": "0xb1a8a4e762d68aa90bc460f82724feadceb7c265b17e612e1c139b531db2d0e2",
"swapImpactFactorNegative": "0x281cb6561593d80eabe053a76d638d6ef11760761af38ca3b1157d4549682d91",
@@ -4556,8 +4556,8 @@
"maxFundingFactorPerSecond": "0xd1fc06210a074798a3d8507eaf9f700de175c23098526798515da3d093ae3644",
"maxPnlFactorForTradersLong": "0x36decf951766da747b2bb875b646c43c9f4548d1db9bd2983230b1cef12460b1",
"maxPnlFactorForTradersShort": "0xad102f8399fa1b92ae45845f95f896d5bf61d8b53e3904b35d0bca50f2d16de9",
- "positionFeeFactorForPositiveImpact": "0xebf23a62b9be6bd236fe83a4a7cdaf4a0f22063071a2045354032286b1d0c088",
- "positionFeeFactorForNegativeImpact": "0xeb54a7af740d7a9353478e56d3482cd29b9c3afaae2669b1a47ccbc6ae975b96",
+ "positionFeeFactorForBalanceWasImproved": "0xebf23a62b9be6bd236fe83a4a7cdaf4a0f22063071a2045354032286b1d0c088",
+ "positionFeeFactorForBalanceWasNotImproved": "0xeb54a7af740d7a9353478e56d3482cd29b9c3afaae2669b1a47ccbc6ae975b96",
"positionImpactFactorPositive": "0xddf60db455866355beb69621cc530e07d254c81adc27b15a564d05b388f5ee2f",
"positionImpactFactorNegative": "0x456efec2eb744a5ec841bd0d4b515de7274f1ca8557472a4de5c42508c4efef2",
"maxPositionImpactFactorPositive": "0x3be668a8c7be13b0a349732303c4b95a907bd0e9668a4bbec4dc3f1ed5e7c2bc",
@@ -4568,8 +4568,8 @@
"minCollateralFactorForOpenInterestLong": "0x3a15736cf99d0f99680260b5422bc87fd69925adbb1387bf7048191f19cab935",
"minCollateralFactorForOpenInterestShort": "0xcf4ade53abb36ffbad4b0f4ae1379faa82afa998f3a47875c9986f82cedd274b",
"positionImpactExponentFactor": "0x376b7203a91e73beffcee3efd325eb4e5f07101811d7f211fc36009ca3c95b91",
- "swapFeeFactorForPositiveImpact": "0x0f8107aaf93b9fe210573d13194d9f77eaceb15b8771c42c821a0046b76f94d0",
- "swapFeeFactorForNegativeImpact": "0xc6659dc00cc2d64bc22cd4217267efab7bd990328add0b4bc154feee535e0c6d",
+ "swapFeeFactorForBalanceWasImproved": "0x0f8107aaf93b9fe210573d13194d9f77eaceb15b8771c42c821a0046b76f94d0",
+ "swapFeeFactorForBalanceWasNotImproved": "0xc6659dc00cc2d64bc22cd4217267efab7bd990328add0b4bc154feee535e0c6d",
"atomicSwapFeeFactor": "0x788e6796662b5dd7c35ce1b4ff0d9af55b38c49eca63a9d2560f226d15721a71",
"swapImpactFactorPositive": "0x915a610544b2e035a83207d2f281b51c24cd0d652142267d6d4eb3690a449afe",
"swapImpactFactorNegative": "0xf38fd5205d6308e37a289083eb9bf290becf831331de85ae14d6b8e2c0d9c839",
@@ -4608,8 +4608,8 @@
"maxFundingFactorPerSecond": "0xb91853fc411f43eb24c1a9cb597ea51291798489477cf5983c01a385db812d62",
"maxPnlFactorForTradersLong": "0x8d750459295a168d231d34ac38231e1d2ba6dfa008a6d164ff6a72509d095f4c",
"maxPnlFactorForTradersShort": "0xdf531b55429ddeadb59af967cb730b299076d579cdb25bb1cf017a0326f4284e",
- "positionFeeFactorForPositiveImpact": "0x0d325124b70072382ae96a7cd97da4d8a5a51f68468d67f742addfcf4a4f669a",
- "positionFeeFactorForNegativeImpact": "0x6fa4e6c42336bf8f1d32bb48964ba1c24df421fd3d1072a63b1528b2a8a4b609",
+ "positionFeeFactorForBalanceWasImproved": "0x0d325124b70072382ae96a7cd97da4d8a5a51f68468d67f742addfcf4a4f669a",
+ "positionFeeFactorForBalanceWasNotImproved": "0x6fa4e6c42336bf8f1d32bb48964ba1c24df421fd3d1072a63b1528b2a8a4b609",
"positionImpactFactorPositive": "0xc3112e11103bfb1a728062fd6fb789086df6e7819d99cadc56161673ec2f5747",
"positionImpactFactorNegative": "0xbcaa544b510afd8e66299f43b2457e58d68d5ee44a0e71314a9c54ccda29166b",
"maxPositionImpactFactorPositive": "0x885c542053b7fa77c9a4a2dc267dcb133edcfafd7c93d3e34b3aaaeb84d71e15",
@@ -4620,8 +4620,8 @@
"minCollateralFactorForOpenInterestLong": "0x6cf8feab7ea0d8a785b057c390baee97be69e93f87bd3b5ef1b32522ade977e0",
"minCollateralFactorForOpenInterestShort": "0x0b5cf2a96425f12b6771217757ad7d3eef0e1a618e0d28884219088615a51649",
"positionImpactExponentFactor": "0x54962ade4b4aac31514ded3d1b37063c949d3579f0ffb707be0d92b66cb3279b",
- "swapFeeFactorForPositiveImpact": "0x620fd8da66402524c473af3d4496c67b9d787ee9a73d0b1ebc33c2ca501999c8",
- "swapFeeFactorForNegativeImpact": "0x8b76d4be7c26e5330ccd659b7b84869b2521aee30ad02c0f64dde54d33ba740a",
+ "swapFeeFactorForBalanceWasImproved": "0x620fd8da66402524c473af3d4496c67b9d787ee9a73d0b1ebc33c2ca501999c8",
+ "swapFeeFactorForBalanceWasNotImproved": "0x8b76d4be7c26e5330ccd659b7b84869b2521aee30ad02c0f64dde54d33ba740a",
"atomicSwapFeeFactor": "0xa9b44fdca74a0013f9f5a792e7c24b494f5f530b98830110e47b0d42c5fbc47c",
"swapImpactFactorPositive": "0xa6ac9172d7f7529d6a77a02977721eee7008f596226749c98b3cd137f49b0309",
"swapImpactFactorNegative": "0xcbd4c14cf1648fdf9f19d309a2d11d4ac497544d25f3a913d864cb326abcf08b",
@@ -4660,8 +4660,8 @@
"maxFundingFactorPerSecond": "0x2830ae0739c9163de9cf708a6f6c32f662f2ad071c3499e9b12c675056298d40",
"maxPnlFactorForTradersLong": "0x36fcc2dbb30808ebaad7f8c9a844eb1b4689f9a62d90e552adbbe4343dfebdf1",
"maxPnlFactorForTradersShort": "0x3d08433ff57f425f4721425d4315941b31adf3f673530845a92056ba70004ace",
- "positionFeeFactorForPositiveImpact": "0xac00be90a0f05763ef66e50ae8ca9e0ff056b82fac3f307ce8a14e91af0899c4",
- "positionFeeFactorForNegativeImpact": "0x1a3121c3ff93d3120708ecebb47afb56c49c4c1363ea731e7b0bb8a2e228d1dd",
+ "positionFeeFactorForBalanceWasImproved": "0xac00be90a0f05763ef66e50ae8ca9e0ff056b82fac3f307ce8a14e91af0899c4",
+ "positionFeeFactorForBalanceWasNotImproved": "0x1a3121c3ff93d3120708ecebb47afb56c49c4c1363ea731e7b0bb8a2e228d1dd",
"positionImpactFactorPositive": "0x850a0dee7de0bfcf04be51d47c2f3668bc4fdaab5e29e2d589984376b5dd86ff",
"positionImpactFactorNegative": "0xb9e817b94ea5ac97ad5125913ad2807a275718730c2498740fc9c888d6b43a03",
"maxPositionImpactFactorPositive": "0x06870bc32614718b265349bf6300294056628d60ca10f5d35c63998d55a41f8a",
@@ -4672,8 +4672,8 @@
"minCollateralFactorForOpenInterestLong": "0xff9fe8e3365a18b999251316da505a550055626be033cf34378f1afd550a4f5b",
"minCollateralFactorForOpenInterestShort": "0x770be0a07523fcc86290097d7261ec89c9c2e6b811a5abde348eec9b6afb5bf8",
"positionImpactExponentFactor": "0xc64593f64cf0192c99b011e0843ca58075f1d4b6dbc285f91e812aef624b75f3",
- "swapFeeFactorForPositiveImpact": "0x4ef7984fde2237fdd6c76d410cd45733e29a8208a1a444d416a4cf2c552455e2",
- "swapFeeFactorForNegativeImpact": "0xe14d026478c114bfabffde611c4387b3c1ec943f2fc6b1304d98755239ac4946",
+ "swapFeeFactorForBalanceWasImproved": "0x4ef7984fde2237fdd6c76d410cd45733e29a8208a1a444d416a4cf2c552455e2",
+ "swapFeeFactorForBalanceWasNotImproved": "0xe14d026478c114bfabffde611c4387b3c1ec943f2fc6b1304d98755239ac4946",
"atomicSwapFeeFactor": "0xc4d687e7509a762728b1ea111a0ce1183ee56281a43f6b3c16a44a935ed87041",
"swapImpactFactorPositive": "0x4b1439a3ac79073d516183f0266a7545a2d55413d776d8837dbba0d3238f3744",
"swapImpactFactorNegative": "0x15e3223c9f47dc35339b9fcc3a24b9984db33d7a74d7e949f62e3f082f005e20",
@@ -4712,8 +4712,8 @@
"maxFundingFactorPerSecond": "0x2c064f54afa3c1d6d05b856843db27379f139cb7e88aa826aba60051b5a0c9bf",
"maxPnlFactorForTradersLong": "0xa8005a0f060de7da9b23e9af19cfef87a6e232331d9f356a74ac63f8df764658",
"maxPnlFactorForTradersShort": "0xc532b70d99e867d7eb5cb21b12c09a281e800f89ef7a7477438017caec63b4db",
- "positionFeeFactorForPositiveImpact": "0xf44b4bd2efe1f90144b6e87f9f83928ff11876ba474225b551b9728f684be6d7",
- "positionFeeFactorForNegativeImpact": "0x3f12c9cb349f4feec74d2fcbdfff7757fe630c8d65b95af0f23dd5a01cbf7f14",
+ "positionFeeFactorForBalanceWasImproved": "0xf44b4bd2efe1f90144b6e87f9f83928ff11876ba474225b551b9728f684be6d7",
+ "positionFeeFactorForBalanceWasNotImproved": "0x3f12c9cb349f4feec74d2fcbdfff7757fe630c8d65b95af0f23dd5a01cbf7f14",
"positionImpactFactorPositive": "0xe7e37a77797c58eed5479a474355840c4b068f56e66f1fd356518754d41e8d71",
"positionImpactFactorNegative": "0xaea38fd5a23fbdf8e436805ba7d16709b9587de0e613614a27e241159c532cc3",
"maxPositionImpactFactorPositive": "0xe58eaeb5cb769661e5812ed30888816663d04e418a2a2294a60dc183998bc24d",
@@ -4724,8 +4724,8 @@
"minCollateralFactorForOpenInterestLong": "0x8cbab030e059e5061c5844541de54fd884103976d5748b1afc27800eb6956781",
"minCollateralFactorForOpenInterestShort": "0x964f5425e2d87724d0e98f792e7d202ad30cd08d5b28a305041ef1365fd64c24",
"positionImpactExponentFactor": "0x1a4921b5ca5088e7e780e76a9b8c2cae1f8c46ad9238eecd0677d65eeb88c8a1",
- "swapFeeFactorForPositiveImpact": "0x6f04144bb368e6acb012e2a47ebfe5802a7aeb1a89c990f21c1c805091c45e74",
- "swapFeeFactorForNegativeImpact": "0x62632c19dc73e4144e7d5c11add032ee54ca6c78c5bf178800e5fc530e3f6c5a",
+ "swapFeeFactorForBalanceWasImproved": "0x6f04144bb368e6acb012e2a47ebfe5802a7aeb1a89c990f21c1c805091c45e74",
+ "swapFeeFactorForBalanceWasNotImproved": "0x62632c19dc73e4144e7d5c11add032ee54ca6c78c5bf178800e5fc530e3f6c5a",
"atomicSwapFeeFactor": "0x40fedddf9a8da6ade587f270ef4508b82a4eaeff05567fc8fffe4a1e958b4d49",
"swapImpactFactorPositive": "0x0b7287e535216c5171cff8248a990ebfd8cff085af5f7b8d599679ad5642795f",
"swapImpactFactorNegative": "0x2a313049a3fcf67138a26bc513f4c9fdd1b9585276633b01dd5de9092ab96423",
@@ -4764,8 +4764,8 @@
"maxFundingFactorPerSecond": "0x53278f7d22214bd9097904f84ff59ee91463aff495cdaf5e810dde8564083b73",
"maxPnlFactorForTradersLong": "0xe5e10ecab6bc07b943b0913ee1f61ca27256d563b5375b5c695809a2b59d0fb4",
"maxPnlFactorForTradersShort": "0x55ad52312b9a5bbcf07832826e1e59f7dd60ba801769b7e2b9b3e2278fa232df",
- "positionFeeFactorForPositiveImpact": "0x571589e332241341cdf027492e3d4374b2a93ef06874b73075cb7947f93534d1",
- "positionFeeFactorForNegativeImpact": "0xa5f763cab3d8762f2a7027c677bf7c9f5786542d01a7f59c96bedc648bb035ba",
+ "positionFeeFactorForBalanceWasImproved": "0x571589e332241341cdf027492e3d4374b2a93ef06874b73075cb7947f93534d1",
+ "positionFeeFactorForBalanceWasNotImproved": "0xa5f763cab3d8762f2a7027c677bf7c9f5786542d01a7f59c96bedc648bb035ba",
"positionImpactFactorPositive": "0x9810f2d2e180503c8290af9f276347ca3ce4791e1479fd6532913e67a424ba69",
"positionImpactFactorNegative": "0x95e072ed96f17673dc5ebc6fa2fdd7737b58d4200f69f9fe06451d81ede06b1b",
"maxPositionImpactFactorPositive": "0x7bb5f084d55a70ddca3fd48f65cca1a09c0709f02816844610198577d9f41498",
@@ -4776,8 +4776,8 @@
"minCollateralFactorForOpenInterestLong": "0x3ee6bddafa71cc4e83b9278ef2f015a79ffc105e946f4b46c521388432cd9939",
"minCollateralFactorForOpenInterestShort": "0x02a996d1421fa2442a1f27ce3c7f58aee300fe3089fc26ec58f76f12d1faf28f",
"positionImpactExponentFactor": "0x8ed469b25e2d0ab97824ae5523c62e7010f10d1777fefd34b5035c6cfc03a10d",
- "swapFeeFactorForPositiveImpact": "0x4ca3b7aa799d579bba5612492862b5bbf5f22db53b16b6f664e01e2089fff96f",
- "swapFeeFactorForNegativeImpact": "0x7892b0a32c16b5e6569488049b577a75dc35440887bd5ff698747b8e8b09e079",
+ "swapFeeFactorForBalanceWasImproved": "0x4ca3b7aa799d579bba5612492862b5bbf5f22db53b16b6f664e01e2089fff96f",
+ "swapFeeFactorForBalanceWasNotImproved": "0x7892b0a32c16b5e6569488049b577a75dc35440887bd5ff698747b8e8b09e079",
"atomicSwapFeeFactor": "0x980e9ca063510ef3ccf46dbbcfad2ab7317123c8c17b73377123f2b751281a82",
"swapImpactFactorPositive": "0x1feef3112a12fa7240eea516d9c5fc70ea06e89d908422e4232c8bbf77d9bf65",
"swapImpactFactorNegative": "0x5159d374359947b125e79c43605b0fc3a99c2ce395723b046cea6101d0c2cc6b",
@@ -4816,8 +4816,8 @@
"maxFundingFactorPerSecond": "0xa1d6b04d3383638cf84863ad9e37716f8c576f9000d419ef9909e4131ffb5fe5",
"maxPnlFactorForTradersLong": "0xc84854c769b03060ed2982322c35b638313b98d6884e5485b4a55ec74c8767aa",
"maxPnlFactorForTradersShort": "0x0f40ef579c4fbf10923b92970b0dd1ecbbaac182f90856a23bd4ae629f9941a0",
- "positionFeeFactorForPositiveImpact": "0x7a63c5bf1f71d763ce6eeca7382fc999d1fb9cf639ee124990e6d6466e40f06c",
- "positionFeeFactorForNegativeImpact": "0x36ca219c1c81bea677d62e2b2e5b22206cd385f69e1544fa978de4749b2f18fc",
+ "positionFeeFactorForBalanceWasImproved": "0x7a63c5bf1f71d763ce6eeca7382fc999d1fb9cf639ee124990e6d6466e40f06c",
+ "positionFeeFactorForBalanceWasNotImproved": "0x36ca219c1c81bea677d62e2b2e5b22206cd385f69e1544fa978de4749b2f18fc",
"positionImpactFactorPositive": "0x851dde81ea8d4ee781c8694a717fe043ef8d687bef17d6f4ed67a0e4b068dc8c",
"positionImpactFactorNegative": "0x5a4d44557ccbfc629001935ce839c93d7e73deecd01bd5d529c6c637e1d075b3",
"maxPositionImpactFactorPositive": "0xda40b2f3412500cccbeb10fe49e074350c9332e85d7f2ac70b628198eb5cbe19",
@@ -4828,8 +4828,8 @@
"minCollateralFactorForOpenInterestLong": "0x2397923fc51dfa26d6dac95bec87e8d79e15cf9c934d9cfe3b26e3462bcc2145",
"minCollateralFactorForOpenInterestShort": "0xcce46a44d5608dda488c9313a4ec985f8c2102f31fd7c96fb91156aae3911ca0",
"positionImpactExponentFactor": "0x707aa723bf3a479a8300aafd64736f2425a181ce672a79718ad6af650ff87cf8",
- "swapFeeFactorForPositiveImpact": "0xa90535e679944e8be6065b015c62d6a51632451ce684f9e398c1544929caa6d5",
- "swapFeeFactorForNegativeImpact": "0x8cda7ab8513c5de3476aa7c0474266c014d1298074d525ca18f1f04002df6891",
+ "swapFeeFactorForBalanceWasImproved": "0xa90535e679944e8be6065b015c62d6a51632451ce684f9e398c1544929caa6d5",
+ "swapFeeFactorForBalanceWasNotImproved": "0x8cda7ab8513c5de3476aa7c0474266c014d1298074d525ca18f1f04002df6891",
"atomicSwapFeeFactor": "0x40825caecd1cdc11f5c50fb7cbd67e8e4d02416e771c516e624c1b12ab6d8a2c",
"swapImpactFactorPositive": "0x5ba4c56931ed525a5b04e368b7c85d09ef955a121f1a28906a13a6724b5d8cdc",
"swapImpactFactorNegative": "0x45e04b88cc7e70f0735c51990a40628b581844ad76c1158d93ce57505753ce24",
@@ -4868,8 +4868,8 @@
"maxFundingFactorPerSecond": "0x47105b65f791d1f40086a1d5a655bb4666efbc5229212cec0927bbabf56ade3e",
"maxPnlFactorForTradersLong": "0x0b29dfb8a7685ae6f9cf9b6d3a2c914d24bc484bea6fbf87ab472447e77e2b26",
"maxPnlFactorForTradersShort": "0xd5e520348bde318f79a2b259ab5c1dd90b414994393279c9a8e729faa3e20ae6",
- "positionFeeFactorForPositiveImpact": "0xd0777dcb9da47555ce8b2b77dad364d19b48c036066ad3aea8237e599d73865d",
- "positionFeeFactorForNegativeImpact": "0x88d8852e314bfc2cf80165d339483901a2cc40302b93d830ae9f5214bbed895f",
+ "positionFeeFactorForBalanceWasImproved": "0xd0777dcb9da47555ce8b2b77dad364d19b48c036066ad3aea8237e599d73865d",
+ "positionFeeFactorForBalanceWasNotImproved": "0x88d8852e314bfc2cf80165d339483901a2cc40302b93d830ae9f5214bbed895f",
"positionImpactFactorPositive": "0x2991b8b03f8bbda42160bf02d03729611c46a37dc975195ca27fc317f24f5434",
"positionImpactFactorNegative": "0xc38d57490f22112f54b2f4af3fc063982f98dde1580822c4491a4d068e2e2dce",
"maxPositionImpactFactorPositive": "0x14edeb4f5ee66980440cdfd82bc36b526d86225c9d23444487094c41da526a25",
@@ -4880,8 +4880,8 @@
"minCollateralFactorForOpenInterestLong": "0xdd677dfaf255e6feb915781df3a369173f1ba6a2fdeab9b5042ec3fe4f996930",
"minCollateralFactorForOpenInterestShort": "0x54debf477ef3d09f2ef162dc9e624468c36c8e85f1e888837f6068c67b7aaf66",
"positionImpactExponentFactor": "0x5133495a189f1db6dc1f6e752ad0ec22aa469f193c9333ba9bd2fcd99903f55b",
- "swapFeeFactorForPositiveImpact": "0xf6498bb4fa2f2989961e3464a3947df93d9cac0bbce132a839479cdf8e09267b",
- "swapFeeFactorForNegativeImpact": "0x142b92fa5d0cf4e4757c0eae3b63d0bb49d6845429c32cc3dbf57eafa62d388f",
+ "swapFeeFactorForBalanceWasImproved": "0xf6498bb4fa2f2989961e3464a3947df93d9cac0bbce132a839479cdf8e09267b",
+ "swapFeeFactorForBalanceWasNotImproved": "0x142b92fa5d0cf4e4757c0eae3b63d0bb49d6845429c32cc3dbf57eafa62d388f",
"atomicSwapFeeFactor": "0x70bc5ab7094ea2c8739cfd003eccbe740c18d03242e18d4c23a943eea2fd5ab7",
"swapImpactFactorPositive": "0x4c21de75900510998632752943bdaae846fb3cd120da605ec2704287c27dae45",
"swapImpactFactorNegative": "0x97a9546d0e8771e3f65b56eb7a6faf815f6d257777ae8d7b03473eb0e1246ab2",
@@ -4920,8 +4920,8 @@
"maxFundingFactorPerSecond": "0x5cf677b3b1836a5324b2a974c9db309322a2e9ac6335f3a82639b1915a4daeec",
"maxPnlFactorForTradersLong": "0x1cf2cc01138a5b15358c77d1bb3bc7726748f718951ac707bbddb05d169d85ac",
"maxPnlFactorForTradersShort": "0xeb9383656f42f363d792368765a94c2b9484ea2881c93bf05af173918d33c5fc",
- "positionFeeFactorForPositiveImpact": "0x53f43ebe35bb75a4ee867704637ce5d443464239fcc35e163497e387be3ab150",
- "positionFeeFactorForNegativeImpact": "0x50fc727f8f54290d02a7258554829d16dbfd870ae3e74e06ce8188f6186073cf",
+ "positionFeeFactorForBalanceWasImproved": "0x53f43ebe35bb75a4ee867704637ce5d443464239fcc35e163497e387be3ab150",
+ "positionFeeFactorForBalanceWasNotImproved": "0x50fc727f8f54290d02a7258554829d16dbfd870ae3e74e06ce8188f6186073cf",
"positionImpactFactorPositive": "0x25e7d425bc1d7d56be537e4b15f50da3a4976eda1912e15a52e365447948b3d7",
"positionImpactFactorNegative": "0x0881517f1b4fb63898040c1a3861d9ff6f924a0abc44917078dd8a38f9522e12",
"maxPositionImpactFactorPositive": "0xc0e44af408c1c79ee19e0fef8f6b9c8307a67016336daee3621b3f615c652fe7",
@@ -4932,8 +4932,8 @@
"minCollateralFactorForOpenInterestLong": "0xfab6fae41bc596b1bfcfb94ae9584c0de545d379cd225cb9c25c487d0503e4f7",
"minCollateralFactorForOpenInterestShort": "0x4c1326fc073e6b1d85be6a3d20e1c8ad4cbb9954a3705d9143e1c9245907cd85",
"positionImpactExponentFactor": "0x01843a5efcc528e9c8ac7b8cd268b5bacd76a50ab8567b7642f774d15aaedd66",
- "swapFeeFactorForPositiveImpact": "0x88018f8220a21b3917d43ad26912e52e3b8ca361da3d8174be35567b0e24af1d",
- "swapFeeFactorForNegativeImpact": "0x548929a4495accb9b6cb141f314517f145ce7ea2b032738583b964b3c67b20c5",
+ "swapFeeFactorForBalanceWasImproved": "0x88018f8220a21b3917d43ad26912e52e3b8ca361da3d8174be35567b0e24af1d",
+ "swapFeeFactorForBalanceWasNotImproved": "0x548929a4495accb9b6cb141f314517f145ce7ea2b032738583b964b3c67b20c5",
"atomicSwapFeeFactor": "0x21e2089d1f40e0a0778c1fe9629870e40fd58fdeeca822dde9b9354502d6fbdf",
"swapImpactFactorPositive": "0xd4a7c4f352139efdc20b2198b165d123a241d6de0e2dd735b8acb612c061d0e2",
"swapImpactFactorNegative": "0x7f18362928b7b6e3cfe488252656020e312b67e2ce13853c49295f2c527cb640",
@@ -4972,8 +4972,8 @@
"maxFundingFactorPerSecond": "0x2f8ed037f4b86f410d55251a6e584e5118efd5645d4865848bc87ed7bdbaede5",
"maxPnlFactorForTradersLong": "0x76b2fe888bb64d0008c3995d3a6e048f9a303bfae1767930b7fd0eea879ac4da",
"maxPnlFactorForTradersShort": "0x923022b22940da2aa68b4cb6005d691ba6233e080c3623e941e43f2c430955ee",
- "positionFeeFactorForPositiveImpact": "0x05831240f177dd0955fadc960829380bf92e1c712f1859a742e5ea2ad4d4c05b",
- "positionFeeFactorForNegativeImpact": "0x69767d4f85a4b4005871a2809886deaf3f8b09d3276f87cb1791b2b54e520e3d",
+ "positionFeeFactorForBalanceWasImproved": "0x05831240f177dd0955fadc960829380bf92e1c712f1859a742e5ea2ad4d4c05b",
+ "positionFeeFactorForBalanceWasNotImproved": "0x69767d4f85a4b4005871a2809886deaf3f8b09d3276f87cb1791b2b54e520e3d",
"positionImpactFactorPositive": "0x47b7d1855a247fd82c8eecf0d326e5ae988891305f3a710e6c4561d05baf35d9",
"positionImpactFactorNegative": "0xc5c1a6f5484e0f94cc872be2da2b7cf82d5be7c99fd12ef686741b633eeae6db",
"maxPositionImpactFactorPositive": "0xbb9a2a0e8df90d35b1ecbc9a6db7bd441a601352dbcd99cdcbea0056619d0f0b",
@@ -4984,8 +4984,8 @@
"minCollateralFactorForOpenInterestLong": "0xe7dd7bf273ece58779bb00ae9a2e4ab2d1f6e2f112ee752f0a84ba30faea843c",
"minCollateralFactorForOpenInterestShort": "0x43b427a16d943f601dd6b7698573380c2a7a77ae99d8ef7cddfa8abdad16790f",
"positionImpactExponentFactor": "0x77063961ee3e498fb05ab39858f824d05c58816f9e207fe4bf16657af84815e0",
- "swapFeeFactorForPositiveImpact": "0x632b360e31d6b7c0caf0657bc4b336b0a87afd7750cfcc4f10d835b6874ccc13",
- "swapFeeFactorForNegativeImpact": "0x56e3a25432533027ea1aea296261935fb42abbf8d7511bf774f09b39b1b6af92",
+ "swapFeeFactorForBalanceWasImproved": "0x632b360e31d6b7c0caf0657bc4b336b0a87afd7750cfcc4f10d835b6874ccc13",
+ "swapFeeFactorForBalanceWasNotImproved": "0x56e3a25432533027ea1aea296261935fb42abbf8d7511bf774f09b39b1b6af92",
"atomicSwapFeeFactor": "0x4d154679eb20c8c9e3bc42655beb1e043cb33b0daf24b875b462ca85f3277609",
"swapImpactFactorPositive": "0x2564b478c28569a694e8e1fb47b526f33680c4f7655cc4899f1db2f21620bf68",
"swapImpactFactorNegative": "0xa57b6e86d1bd0290122b20c59ffec9cccc1f57d12b491a54bb852dcdaecc99ed",
@@ -5024,8 +5024,8 @@
"maxFundingFactorPerSecond": "0xee840dbdd37dbab6e21bd9dcdbcfbfe5284ae1a501fdabc50ce4150a97dd5770",
"maxPnlFactorForTradersLong": "0x5e6bd97d8b67a79878fb401aa439f382c2ce00faa792ff3bda9997bdf9f49b83",
"maxPnlFactorForTradersShort": "0xff4d30a24922db985d3abe365f9ffe5089d4bf1e0a0e28281658864067e11c9c",
- "positionFeeFactorForPositiveImpact": "0x003f9bfe07251be94e44da647dfc5ac14b546d29c05120ec71d8b78bfa305bb4",
- "positionFeeFactorForNegativeImpact": "0x7cb977b054e40ab743916d35fcc4f033211b0cdb90e910e4d092f141fc80d168",
+ "positionFeeFactorForBalanceWasImproved": "0x003f9bfe07251be94e44da647dfc5ac14b546d29c05120ec71d8b78bfa305bb4",
+ "positionFeeFactorForBalanceWasNotImproved": "0x7cb977b054e40ab743916d35fcc4f033211b0cdb90e910e4d092f141fc80d168",
"positionImpactFactorPositive": "0x0278a85160a96126d4130fd831ff4c5a9a5836e4fe2d3d568929efb9f3d40d32",
"positionImpactFactorNegative": "0x529d29bf23dcde0de61a3835c8b66c977a5e2bf880979c2865b6ea725424e99a",
"maxPositionImpactFactorPositive": "0x483000e66191fc8c744699dddee741439f87f05f61b1b3b300355642fde81ed3",
@@ -5036,8 +5036,8 @@
"minCollateralFactorForOpenInterestLong": "0xd7fbf50ca354ff2b3f6828cd7e94d4ed7aa174e32264de0c0aabd07a70d52335",
"minCollateralFactorForOpenInterestShort": "0x895bbd377e9a108c1b204b937d4a844252362e5be220248efe30bc9b8935381c",
"positionImpactExponentFactor": "0x28d3ce9203477c09d7c98c67792a73495a0073c0d280ff8ec79e13fe5054e79e",
- "swapFeeFactorForPositiveImpact": "0x52e150ad8d5dc548a6fb24c385f9a05225f9bd42eafa9af93b25572a445156b1",
- "swapFeeFactorForNegativeImpact": "0xb4c438e9e70648650f3498d02748bb64d17e2b4f7231db82ff4649ad5289e8f2",
+ "swapFeeFactorForBalanceWasImproved": "0x52e150ad8d5dc548a6fb24c385f9a05225f9bd42eafa9af93b25572a445156b1",
+ "swapFeeFactorForBalanceWasNotImproved": "0xb4c438e9e70648650f3498d02748bb64d17e2b4f7231db82ff4649ad5289e8f2",
"atomicSwapFeeFactor": "0x8474deeea21e6229bd4dfae50c5540804ed3a90a2dc43c65d48a15d6bab32d3c",
"swapImpactFactorPositive": "0x7ff382731e8dfa0db35f01ee8463833b919a2b6b67c270a7a120b70271e46f39",
"swapImpactFactorNegative": "0x32a66fa15048d75d0970f64a82100bf289c0de735a0e68eb6d26d2f4732a4013",
@@ -5076,8 +5076,8 @@
"maxFundingFactorPerSecond": "0xf5611db4775347e39747ed1c456b96e740dbcba6d01ce0979b9cfc4b5b80780d",
"maxPnlFactorForTradersLong": "0xf80fbd5a69a030c28a382e7651f4fb41c03f68d90aa1de4cacba5b2859b41682",
"maxPnlFactorForTradersShort": "0x270f5d9379748c17627fe9488d62cc5da2408ec415db81d38decac01627f4464",
- "positionFeeFactorForPositiveImpact": "0x570d2910c810c94dfa7f44eccaa32dca9b9f8171f3cf3c503b5da5918d780611",
- "positionFeeFactorForNegativeImpact": "0xf94d71fba5341183b697cdf3d1d488cebb016b48961b01f37bd045a5fadfe955",
+ "positionFeeFactorForBalanceWasImproved": "0x570d2910c810c94dfa7f44eccaa32dca9b9f8171f3cf3c503b5da5918d780611",
+ "positionFeeFactorForBalanceWasNotImproved": "0xf94d71fba5341183b697cdf3d1d488cebb016b48961b01f37bd045a5fadfe955",
"positionImpactFactorPositive": "0x9a1ba3f8a56c233e194a6da5424ed1fac6faf15b32579933605ed26debab95ab",
"positionImpactFactorNegative": "0x2670b9b3cf284a0eced68cce887acbe4ccdb7d12b689a5bbea55e9b035daf01b",
"maxPositionImpactFactorPositive": "0x41fbf5bebd182b215d84d8a6cfcd739da1f102035358c8e37161c10bb23bb5e9",
@@ -5088,8 +5088,8 @@
"minCollateralFactorForOpenInterestLong": "0x7d50ef920428f507294cd36c1782f6d973a2fe06024c91df3cde7689c79fed96",
"minCollateralFactorForOpenInterestShort": "0x11f7e8e55c8b9b9dd122a4b43e86c521b1c348c5f813cc016f22cdfd50f834c3",
"positionImpactExponentFactor": "0x815c6fefb00b14bbddc0e03e7c0f220de918f46c3dd67b8fd755edeabae8ecc4",
- "swapFeeFactorForPositiveImpact": "0xd87f563eee35ff644bbcbc81c285b4b9ba3c76774d5a1529bd482c790240b52d",
- "swapFeeFactorForNegativeImpact": "0x10af337efb0891fdc93cfc3f957b35e6e8b478cd80dc1dfe84fab10aafedc81e",
+ "swapFeeFactorForBalanceWasImproved": "0xd87f563eee35ff644bbcbc81c285b4b9ba3c76774d5a1529bd482c790240b52d",
+ "swapFeeFactorForBalanceWasNotImproved": "0x10af337efb0891fdc93cfc3f957b35e6e8b478cd80dc1dfe84fab10aafedc81e",
"atomicSwapFeeFactor": "0x862667862206eb72e1989351e89dcbc22cb14ba73b6b531c6d53ea7f7c8cd932",
"swapImpactFactorPositive": "0xc0cb03d2db382d5e9290eece3432fd194293e21ef1f83ad1a08567da811114cf",
"swapImpactFactorNegative": "0xd04dc2dc10cd11ac26ed96f19c2994147a753b9dd0645404de4d4f3ec46342fc",
@@ -5128,8 +5128,8 @@
"maxFundingFactorPerSecond": "0xb720d8c81a84ac462d6ad8ea0a9ccc2523ff17b5e0c0f15a8aafaf55cd6c53b6",
"maxPnlFactorForTradersLong": "0x4cf830df61af03df6e23af106054f616cb9a7ce443aba0fbd0e816de8b7d7f37",
"maxPnlFactorForTradersShort": "0x36314aac4793617375d3c0f447920154a9e0677c0a73deb623acb486bc5971ae",
- "positionFeeFactorForPositiveImpact": "0x3c6f2ca5835a333de5eeebc176cb9b6f23bd82af006ee38e94d499e3aac81d15",
- "positionFeeFactorForNegativeImpact": "0xca27165c5c39f5ccd9e46ccb45f6c09e7a534d3a375800993d3ca026f9c97bbc",
+ "positionFeeFactorForBalanceWasImproved": "0x3c6f2ca5835a333de5eeebc176cb9b6f23bd82af006ee38e94d499e3aac81d15",
+ "positionFeeFactorForBalanceWasNotImproved": "0xca27165c5c39f5ccd9e46ccb45f6c09e7a534d3a375800993d3ca026f9c97bbc",
"positionImpactFactorPositive": "0x81715340e5d4867f20c0e71ba4030c88632d88ebfaf0326c105e9389501597ca",
"positionImpactFactorNegative": "0xf3642a309bc16d8b2f0543b7719a7814ad020625035d830a111faca0a5cd5d73",
"maxPositionImpactFactorPositive": "0x810d342c12f39497d4bdaca55af877dbd05f964e4a6d626792683c2bb37ea46f",
@@ -5140,8 +5140,8 @@
"minCollateralFactorForOpenInterestLong": "0x5ae759fed69d3b0c091d183c77af7e0a17e8e28bf134058733d7e4f6c65a9803",
"minCollateralFactorForOpenInterestShort": "0x6b3ee35f5d240926128b2cd6d6e06959f849b8be18b92b74cccf3092dc4f17ea",
"positionImpactExponentFactor": "0xe567e59cfea800eb361efb60841f05c69cb32e748be6262247a2a421f040c9cc",
- "swapFeeFactorForPositiveImpact": "0x47ffe2b682a8bf31cf63778aad5f0eb07789da2a14cc68b4b2d225150807fbc4",
- "swapFeeFactorForNegativeImpact": "0xcc012787e83c0b903b1eb1aee64607e237da7ad41657778ff1cfafe6e680b371",
+ "swapFeeFactorForBalanceWasImproved": "0x47ffe2b682a8bf31cf63778aad5f0eb07789da2a14cc68b4b2d225150807fbc4",
+ "swapFeeFactorForBalanceWasNotImproved": "0xcc012787e83c0b903b1eb1aee64607e237da7ad41657778ff1cfafe6e680b371",
"atomicSwapFeeFactor": "0x1df5c00e70e1661c59e1d86e3fe88018b64b65e3f65a756a4b5103507ed3d495",
"swapImpactFactorPositive": "0x46909c5fad97c43653f9d5f3368abd6fbebc393ed3e03cac4b1e929beca08746",
"swapImpactFactorNegative": "0x09a07f2403de8c394c33d6b5a4546bd1c717e0b5b73b7a4093e0d8de38068017",
@@ -5180,8 +5180,8 @@
"maxFundingFactorPerSecond": "0x6549b6f8d7b08064cb0485409e72f4eb7a42fd9ed8e2fd25cb26ffe0d98dd323",
"maxPnlFactorForTradersLong": "0xbc279e968e78308cb4557b820b21e00749855574d8379d85706f1306e896f2de",
"maxPnlFactorForTradersShort": "0x7456fdb6d19e2d4c7d61b6c7293cb3b71b9e8e26eac6d1a6b44f6ab0537e768b",
- "positionFeeFactorForPositiveImpact": "0xa1835230a8d851762c1c01d2f7e523fdf1f5b85f8f0affb93b0feabbfcdbe56a",
- "positionFeeFactorForNegativeImpact": "0x4a50364bddba2784ddc1aab575088f8f740d30343b8e0b6eaca6fd68bc6cdbd7",
+ "positionFeeFactorForBalanceWasImproved": "0xa1835230a8d851762c1c01d2f7e523fdf1f5b85f8f0affb93b0feabbfcdbe56a",
+ "positionFeeFactorForBalanceWasNotImproved": "0x4a50364bddba2784ddc1aab575088f8f740d30343b8e0b6eaca6fd68bc6cdbd7",
"positionImpactFactorPositive": "0x9873a18090b7c56c11578568a8d0b49769743ad165bdff83f1f8aec8241a0736",
"positionImpactFactorNegative": "0x7160368f4494684e7a4d5086f623cb1cc84b4b05f87c2382e9d5110187041096",
"maxPositionImpactFactorPositive": "0xae1808bb11b54e6d0fe2b85630feb3c2ded4eb5fc8ac820c5178e8038b90ff71",
@@ -5192,8 +5192,8 @@
"minCollateralFactorForOpenInterestLong": "0x45eedbc7142301fe4c59155e6ebd1653a9ff0c9a978099ccb2e9d707967adbca",
"minCollateralFactorForOpenInterestShort": "0x2903f6e84538e5373d1f54d464ba5df3df4b3588d0d14741fece1716eb35f9a2",
"positionImpactExponentFactor": "0x8844c8b03bd3eaef0764ca1ba1b1d78473ea2cec2d9e6a21b41b938f1af0bae2",
- "swapFeeFactorForPositiveImpact": "0x2b6b19422df17ba8c28fced3c7d789005d1a0356b44c1c4c4c0164cc39331e71",
- "swapFeeFactorForNegativeImpact": "0xbc5189d59edc722196387581523527cb1d98b00ea7da4f20aac7c20e08b72a3b",
+ "swapFeeFactorForBalanceWasImproved": "0x2b6b19422df17ba8c28fced3c7d789005d1a0356b44c1c4c4c0164cc39331e71",
+ "swapFeeFactorForBalanceWasNotImproved": "0xbc5189d59edc722196387581523527cb1d98b00ea7da4f20aac7c20e08b72a3b",
"atomicSwapFeeFactor": "0xe173a809ced2500304a23dfa344ca6b3e827719804bd77f8acb525af28d6569c",
"swapImpactFactorPositive": "0xc37e7182e1a56e126c4733aecc60d53d29e2b3f102dcfca70d3a86ca928e8814",
"swapImpactFactorNegative": "0xc26f85c9450226223a1d4af07280496abe35a15674106503cf26c2c1b7757ff7",
@@ -5232,8 +5232,8 @@
"maxFundingFactorPerSecond": "0xd542499df9e7d24699d8ecc8f75aa401549a3b0ae9e80d5c6fbe14864ce032af",
"maxPnlFactorForTradersLong": "0x986987a2297981d099e91af2872dbe813e25706c4a933026830723cbd2bf48db",
"maxPnlFactorForTradersShort": "0x113f7f83548aaff453d477911793de665a501f3a279fc4dba114df9d1a14d422",
- "positionFeeFactorForPositiveImpact": "0x83a5a35f6638777558e5ce07e52e0ffdb233fbb2be93bd388cad801e523b53ba",
- "positionFeeFactorForNegativeImpact": "0x592d834e78e74865f3eca09aa13a218982d8f685c5efeb92cb33847c99851438",
+ "positionFeeFactorForBalanceWasImproved": "0x83a5a35f6638777558e5ce07e52e0ffdb233fbb2be93bd388cad801e523b53ba",
+ "positionFeeFactorForBalanceWasNotImproved": "0x592d834e78e74865f3eca09aa13a218982d8f685c5efeb92cb33847c99851438",
"positionImpactFactorPositive": "0xab8a73b8fe33ad230ba513a905a375d42d0a091419bb26f2652dbef04f62f039",
"positionImpactFactorNegative": "0x0c08812385bf9ddb26fa10c909560b93bd3b346dcc7bfc0552d34c8bca9e73de",
"maxPositionImpactFactorPositive": "0xe22c34e3ff7ef7fcb54504b4c66044899d1a384b96d04624c1dc5dabeb6e24a2",
@@ -5244,8 +5244,8 @@
"minCollateralFactorForOpenInterestLong": "0x29db49c2d35032fbaa6998ba219c6b02284f74bfd0acc163ee051df95ed68ca3",
"minCollateralFactorForOpenInterestShort": "0xa40cad44d05c973096a2efad341a66060c01fff6f46ea68b91b0b2bf3fba6c08",
"positionImpactExponentFactor": "0x756f45fc0ceffe9e5d95fa382724d0f2e89ef58b1420ec60110167e98b8eab13",
- "swapFeeFactorForPositiveImpact": "0x65de51630b94a759ff7b7fd83e2592f29f091279d19914ccdf27614d77d6bdc4",
- "swapFeeFactorForNegativeImpact": "0xee0edaec66c781a5fbc4bc1a3309d734eb0f66eea1a501f5db8b418e4fcddb53",
+ "swapFeeFactorForBalanceWasImproved": "0x65de51630b94a759ff7b7fd83e2592f29f091279d19914ccdf27614d77d6bdc4",
+ "swapFeeFactorForBalanceWasNotImproved": "0xee0edaec66c781a5fbc4bc1a3309d734eb0f66eea1a501f5db8b418e4fcddb53",
"atomicSwapFeeFactor": "0x5a0d29797f44932d02b08bc879eacb1bcb68e88d6abb2ad4ce3ed486b716738b",
"swapImpactFactorPositive": "0x84849cdedb39593852cf43252cd82e46a876f305e4ce1d974ee08fc8ec59d9f7",
"swapImpactFactorNegative": "0x09ecd5127f93d7213f6c1fcaf8804ee66808221cf2bf57983e1953fc99bcf9f3",
@@ -5284,8 +5284,8 @@
"maxFundingFactorPerSecond": "0x55d695443c4b50290b2c35ab4ae3670a19023d27d4c7588e6838c3b254970f70",
"maxPnlFactorForTradersLong": "0xa79de625f455941562c64463d65e8ccde24b967c7891abcf10a84ca42f8768e2",
"maxPnlFactorForTradersShort": "0x6411fd75d22e56aa0f990c53a99acaa487bf7a7260c253aecda50eb063d3cc96",
- "positionFeeFactorForPositiveImpact": "0x480caa020e0fe99251b3c9ab63ec9c6300cc5f1bdfbcc7893ea0b68d47aba2ac",
- "positionFeeFactorForNegativeImpact": "0xadc6faa886ee5047e61292441d823e4e0473167e7d00c08187cd3fff2d470328",
+ "positionFeeFactorForBalanceWasImproved": "0x480caa020e0fe99251b3c9ab63ec9c6300cc5f1bdfbcc7893ea0b68d47aba2ac",
+ "positionFeeFactorForBalanceWasNotImproved": "0xadc6faa886ee5047e61292441d823e4e0473167e7d00c08187cd3fff2d470328",
"positionImpactFactorPositive": "0xd0558f405ea9df084ccb4faa357f969f7ccc3f1a5681fef8022ad1fe8f331079",
"positionImpactFactorNegative": "0xbd84cae6ed3696ea71d13a21fcc8382099cd628f1cb5cdf2590b86018f9bd8cf",
"maxPositionImpactFactorPositive": "0x0555a94ebd0aca297889436c37ca360b21d9a1867d3413495097a4271eca412a",
@@ -5296,8 +5296,8 @@
"minCollateralFactorForOpenInterestLong": "0x8f3f572e97c9d9c670333b644f13a2d0f6e539e9c061ee0a857cd9792672d22e",
"minCollateralFactorForOpenInterestShort": "0x34f3aabf9a0899301758ec60b458136eedccf8190f866a24fb5752b22f439232",
"positionImpactExponentFactor": "0xb2ce75652d03556e0bc3788493523ca7fdebc934c6e54c6c632e181236ffddd9",
- "swapFeeFactorForPositiveImpact": "0x0589c40a90c42a9ebfc1efeb4b92aade95b9b797d8aa1d5a3157bf122b7d4c51",
- "swapFeeFactorForNegativeImpact": "0x1a598b463e1879679db300d3d2984300793cbf7707c66a39bbdd2d35d13f732a",
+ "swapFeeFactorForBalanceWasImproved": "0x0589c40a90c42a9ebfc1efeb4b92aade95b9b797d8aa1d5a3157bf122b7d4c51",
+ "swapFeeFactorForBalanceWasNotImproved": "0x1a598b463e1879679db300d3d2984300793cbf7707c66a39bbdd2d35d13f732a",
"atomicSwapFeeFactor": "0xe41d968c3b6e3f6edf6a01941130301b746bab7671905eb80ba9d50d65bb3aaf",
"swapImpactFactorPositive": "0xd1e65efb757541f80edfff9551b4826043c8e145abe10ae3ef3541fb538f07d1",
"swapImpactFactorNegative": "0x7cf01dde2b8fa10b9187d30fd71c411dcdeec784c219d8650622215ee0595300",
@@ -5336,8 +5336,8 @@
"maxFundingFactorPerSecond": "0x89da6ffa766e2bb3ff8a903aeb5e5317b11be4f883d2cb321a1d86d04dc167f2",
"maxPnlFactorForTradersLong": "0xcfc8c3f8c13b2c4398d6120c557c104931e11c73a21992df116452c5d2523914",
"maxPnlFactorForTradersShort": "0x66f86df6730745dd50e417a44bac9675a815fd2b0cff011e7d4e49d0f8f61f8e",
- "positionFeeFactorForPositiveImpact": "0x09ef3e68667ac1932aa3da09c082f3521ca03280960d931ab17c5fc2b610bd94",
- "positionFeeFactorForNegativeImpact": "0x8d2011dd8f0c59f59b6d50bfa9ee5e8128c82d9b0906177241687ed9b76ff0e0",
+ "positionFeeFactorForBalanceWasImproved": "0x09ef3e68667ac1932aa3da09c082f3521ca03280960d931ab17c5fc2b610bd94",
+ "positionFeeFactorForBalanceWasNotImproved": "0x8d2011dd8f0c59f59b6d50bfa9ee5e8128c82d9b0906177241687ed9b76ff0e0",
"positionImpactFactorPositive": "0xa762537645af98f083f258eea26bb39c97b5d6e2b7eeb7d008838577587a2416",
"positionImpactFactorNegative": "0x7af4efee5f0f9f89b838201e77ea1a99c065a8c3aeb2857c9dd06453fd16118c",
"maxPositionImpactFactorPositive": "0xc46b18667cb5e79692a544765cbf3b008b009c084a840f0716f07e49ffd33a82",
@@ -5348,8 +5348,8 @@
"minCollateralFactorForOpenInterestLong": "0x583df5e6f1edfb745d316e7bcd94e72ca9b5ca746577c020be7c18dd7dd4fe06",
"minCollateralFactorForOpenInterestShort": "0x36351baa910c7a93b9275819cd9a2692a2cd3a2e6ba054c08ee6b21a35de4d33",
"positionImpactExponentFactor": "0x7ce20313f86d1399be6c8e5a879b0f8444aadf143db8d96c0acb06d082131e5c",
- "swapFeeFactorForPositiveImpact": "0xa23ea26f349b7feb83ddc8a2a9fecd42486e44e6fc12a1801d13effd3586b489",
- "swapFeeFactorForNegativeImpact": "0x6426e51a54739e518248dcb47aa6a5ef9663cd0c4882d6e49f2c4a9e4e13fac1",
+ "swapFeeFactorForBalanceWasImproved": "0xa23ea26f349b7feb83ddc8a2a9fecd42486e44e6fc12a1801d13effd3586b489",
+ "swapFeeFactorForBalanceWasNotImproved": "0x6426e51a54739e518248dcb47aa6a5ef9663cd0c4882d6e49f2c4a9e4e13fac1",
"atomicSwapFeeFactor": "0x37af8cd2427637879560e4b804999bbc1df9abd6e4d2550024f191a228196de3",
"swapImpactFactorPositive": "0xccdda93d693c2b04ac36cdd1fcb740da6b9a9b761375c4315e1ce1b8474ce507",
"swapImpactFactorNegative": "0xa2277bc26726f7bfa667b90d37019e338cd90877358ef57a93296d388daf3b67",
@@ -5388,8 +5388,8 @@
"maxFundingFactorPerSecond": "0x80005808724cc96e2a097ee4c2a7f82e47d1a320388b4dc63476035d8973d9d6",
"maxPnlFactorForTradersLong": "0x8f32f5ad7e284bdbfeeeb70ebe1ef991953f55095e79351d35ca3d9497976253",
"maxPnlFactorForTradersShort": "0x274a6b8ec92a0bc3ba50a90e9f19dc2252961f33485ade4ce0f822cd5bc1b0cb",
- "positionFeeFactorForPositiveImpact": "0x81bd544cd8ceb46ea99b4bd10d6e56ed02222dcbed27f28ad372cbdc124a1cf9",
- "positionFeeFactorForNegativeImpact": "0x2d8a55901ecd0092c6089b9d517ed1667d3e1847c1694ed8f29c7ace94df16a8",
+ "positionFeeFactorForBalanceWasImproved": "0x81bd544cd8ceb46ea99b4bd10d6e56ed02222dcbed27f28ad372cbdc124a1cf9",
+ "positionFeeFactorForBalanceWasNotImproved": "0x2d8a55901ecd0092c6089b9d517ed1667d3e1847c1694ed8f29c7ace94df16a8",
"positionImpactFactorPositive": "0x5a05266478f4928dd9cde3872bd527fa16309411dffc0471ebbe70c025c0aa4d",
"positionImpactFactorNegative": "0xe1eae2c4d281cdee0d161a428cda3065b406412fd953c1f82db82b2691a9a9d2",
"maxPositionImpactFactorPositive": "0xf99eaaaab16734840b8d4300ca590da487556dcc8db34a9268d847536510b97f",
@@ -5400,8 +5400,8 @@
"minCollateralFactorForOpenInterestLong": "0x818e5181980953fa609b761f0ae96c7ca154f7f0646efb32703b8b00f9066681",
"minCollateralFactorForOpenInterestShort": "0x5755b8f70ab34aa48a6f09e98b3f0ea7d53f481a51bf3c43ea8eb29e944c99c8",
"positionImpactExponentFactor": "0x3b971039415093ccc226058fec1bbf78b3120fcce1cc233615f3e18b5360ebf3",
- "swapFeeFactorForPositiveImpact": "0xb843072f0f5a7464d8d1f7396c97cb7da8af935cae8e33176c8d5f175cc9a55c",
- "swapFeeFactorForNegativeImpact": "0xbdb97358626fd42e2914f666f839a6f60265e9ec51dccd6175f3c83aa463977d",
+ "swapFeeFactorForBalanceWasImproved": "0xb843072f0f5a7464d8d1f7396c97cb7da8af935cae8e33176c8d5f175cc9a55c",
+ "swapFeeFactorForBalanceWasNotImproved": "0xbdb97358626fd42e2914f666f839a6f60265e9ec51dccd6175f3c83aa463977d",
"atomicSwapFeeFactor": "0x9532ae7cbc6108a2afb6bc4567e4a7a60decca5cc940dde150db06998e8af445",
"swapImpactFactorPositive": "0x901b3d05b703f3c40f99b34c4ff2cba75269582be15a402353f187ed49ff5165",
"swapImpactFactorNegative": "0xa0e259f65f79fca5bec4d5341eaf9470dba0fc4d48ba1defd29a7572fd125ebc",
@@ -5440,8 +5440,8 @@
"maxFundingFactorPerSecond": "0x2f9dd902a53addb43038e9d24efe34c486a2911e7f672bb79365aa927e257c78",
"maxPnlFactorForTradersLong": "0x47c6b942963abe1930bcb6cea0d32323d424e1b4981f35c33c5bd81acd296b8c",
"maxPnlFactorForTradersShort": "0x0790c0bd1a893408eabd1ea57630663590c62ec1d13a4858c77460a7fafd2ec5",
- "positionFeeFactorForPositiveImpact": "0x633594b09c0e8b31be3792e4ff37f2252f8cc94b768efee52d747044f9a55dfb",
- "positionFeeFactorForNegativeImpact": "0x2bcf6671743d299f81ef6291530ecce27d3429a6fb61494a9ca8944a5b34c582",
+ "positionFeeFactorForBalanceWasImproved": "0x633594b09c0e8b31be3792e4ff37f2252f8cc94b768efee52d747044f9a55dfb",
+ "positionFeeFactorForBalanceWasNotImproved": "0x2bcf6671743d299f81ef6291530ecce27d3429a6fb61494a9ca8944a5b34c582",
"positionImpactFactorPositive": "0x221221e7b50c289b02ea5905c1f2379370338250693b13b8fd1087ac9e901b5b",
"positionImpactFactorNegative": "0x0954d88366713719281605b30c385e1b10b87ca6ef69733491e7e22dc4cea296",
"maxPositionImpactFactorPositive": "0x53277309fab06bd5cf4cd915cecab1990fbd08f2cfcdbbe96de2eaca6d3795d6",
@@ -5452,8 +5452,8 @@
"minCollateralFactorForOpenInterestLong": "0x27e803ec18d5fa51715be719542a289f7423ac9ba9b20f576973d66b2551bf5d",
"minCollateralFactorForOpenInterestShort": "0x5258e3c070aaebb888fd398d917ecf80832a6656f40d50a745b124f8ccb7e254",
"positionImpactExponentFactor": "0xc51909a330c2401736876b71a8cfd7c96f42890319cdb371a3b9dec9ecd409ce",
- "swapFeeFactorForPositiveImpact": "0x9102f6ad4161a08f0849b3c43c223e364bd4aff8f481d198a4eebeae069553f7",
- "swapFeeFactorForNegativeImpact": "0x67ecf17e7395492331fb10f81e89dea078a77a9e46f2fceda54099cc9797a959",
+ "swapFeeFactorForBalanceWasImproved": "0x9102f6ad4161a08f0849b3c43c223e364bd4aff8f481d198a4eebeae069553f7",
+ "swapFeeFactorForBalanceWasNotImproved": "0x67ecf17e7395492331fb10f81e89dea078a77a9e46f2fceda54099cc9797a959",
"atomicSwapFeeFactor": "0xe16a19c405ac3aff97f370f32424f0cd347870c1e04c55a2359c3be144d17f7a",
"swapImpactFactorPositive": "0x1e345ec4f6a863e7ebe4e075da4fcf31672a9182dcb21cd591068f690f2262fc",
"swapImpactFactorNegative": "0x4a493f0dc59ec102f37040fb63e5125680bdd15a0fcb2ff76badbcdf3db3fa86",
@@ -5492,8 +5492,8 @@
"maxFundingFactorPerSecond": "0x6cd221f1fe702a065c3d5d488eb64b15023dbd5ead70c58a0e8b1a7558e5b16e",
"maxPnlFactorForTradersLong": "0x164ea8b6a97c0ffc267213ba294b3058ee4387ecc19b87e31ffd5700554ee028",
"maxPnlFactorForTradersShort": "0xee0486fca5c436f99d4772832e3457cbfd2afa0eb06e079f5df49b1c68a287f3",
- "positionFeeFactorForPositiveImpact": "0x645a45b8c2066831a700ed199d13dc8dea613b7154569b827cd1c384062ee908",
- "positionFeeFactorForNegativeImpact": "0x1e7a0738deae0fdb87f558226e5bbafed021fc35d1e8a3cc8bb5f41227fa5fb5",
+ "positionFeeFactorForBalanceWasImproved": "0x645a45b8c2066831a700ed199d13dc8dea613b7154569b827cd1c384062ee908",
+ "positionFeeFactorForBalanceWasNotImproved": "0x1e7a0738deae0fdb87f558226e5bbafed021fc35d1e8a3cc8bb5f41227fa5fb5",
"positionImpactFactorPositive": "0x4ab1412183e3cdf2bc0183be8ce586927a7514a7c59547650caaec2deac8a23e",
"positionImpactFactorNegative": "0x7dd1eeecae673aa27159de19e7f7dc5dad8733c52b5f2d223e2baefde25790fc",
"maxPositionImpactFactorPositive": "0x0c431c9f06de832473be0ce2b10621da8568de58d41a129cf8dee1cad68e2d31",
@@ -5504,8 +5504,8 @@
"minCollateralFactorForOpenInterestLong": "0x8e08f3f7be11c7cf1e417bad78b67816cc018466d09dbc178cbf14e775ec84fb",
"minCollateralFactorForOpenInterestShort": "0xbdceb26bf2f98e5cc12acaa3f849b8d4b55bdda9afeb7ccf0290238518f1db47",
"positionImpactExponentFactor": "0xff24652bb0828da1596a0f12cb00abede91225f771ad892955193da803cbdf7a",
- "swapFeeFactorForPositiveImpact": "0x31e3930b9996b14fe6f38568e44639ccc50e56787240e19e98310ddcd4a92fda",
- "swapFeeFactorForNegativeImpact": "0x79ffe210749a415402ab9be45d30efda2ecb18e6812b20adb226da48d4ca5f02",
+ "swapFeeFactorForBalanceWasImproved": "0x31e3930b9996b14fe6f38568e44639ccc50e56787240e19e98310ddcd4a92fda",
+ "swapFeeFactorForBalanceWasNotImproved": "0x79ffe210749a415402ab9be45d30efda2ecb18e6812b20adb226da48d4ca5f02",
"atomicSwapFeeFactor": "0x032774c61cbf297fedbbf78bb87559d207fee070f6f33e2d7f5704a2821e886e",
"swapImpactFactorPositive": "0x2cab7d169dfb0076ae18bbbcc61065aee049442b6a4625d90829f74f1d431f17",
"swapImpactFactorNegative": "0xf62851c1a6f64e7d365044132259a31dd64a680ebb18db650df5aafbff986aa3",
@@ -5544,8 +5544,8 @@
"maxFundingFactorPerSecond": "0x5f65898b6df057aaff1a80e1fe7b4459c8bdbb538e96f4952cba9f5c29c547dd",
"maxPnlFactorForTradersLong": "0xc5618ce541d1aeea5346d6164351ee7f983bbcce8eecc05f8bfba0c314e57cfa",
"maxPnlFactorForTradersShort": "0x9750d780280359bf0a2069730d38874a1fd839050a59255fa453aa8515935bf4",
- "positionFeeFactorForPositiveImpact": "0xb6245117418c14e0b4c75a17449ff7390ff57f8a6b0afef0084679dfac296fb5",
- "positionFeeFactorForNegativeImpact": "0x4a7b08d27f8e7a95ea2a14564163d6f42a663ea247c9f297a278fd26b35514c8",
+ "positionFeeFactorForBalanceWasImproved": "0xb6245117418c14e0b4c75a17449ff7390ff57f8a6b0afef0084679dfac296fb5",
+ "positionFeeFactorForBalanceWasNotImproved": "0x4a7b08d27f8e7a95ea2a14564163d6f42a663ea247c9f297a278fd26b35514c8",
"positionImpactFactorPositive": "0x58529c64a00bf54d5a13ded16f36034aaa7dda5530f74cf23d46aac19acbbff7",
"positionImpactFactorNegative": "0x078d064d98101201466c1c551b0ca6a8a305140a5696dc99ff74821392d97c8f",
"maxPositionImpactFactorPositive": "0x6a348a258a1098bae9ec5b403d66b4e0b14d27f5ce1fb2b13767d6655c4ea428",
@@ -5556,8 +5556,8 @@
"minCollateralFactorForOpenInterestLong": "0x1ad4a9c2b4ce935ef436514c8854eedb430a2d63208a46b5b4c1a539c33e3d09",
"minCollateralFactorForOpenInterestShort": "0x9e8636270bb17fe8d5dee385bf6abb8ecc53da1f4a98c52ccef3b75eaf4895b4",
"positionImpactExponentFactor": "0xb6d3bd408c744959ffd59a568819258af55102649edb14de3f8c525ed02f5568",
- "swapFeeFactorForPositiveImpact": "0x9be51f5179ba5927f3ec2509daf80d5ccb06af86cac7f814d62123fdcd41cdd3",
- "swapFeeFactorForNegativeImpact": "0x8a9fe3c474ef4ef9d9693f2e0fbc6765169ed2b19284ae93a0ce93eb09b6e2fe",
+ "swapFeeFactorForBalanceWasImproved": "0x9be51f5179ba5927f3ec2509daf80d5ccb06af86cac7f814d62123fdcd41cdd3",
+ "swapFeeFactorForBalanceWasNotImproved": "0x8a9fe3c474ef4ef9d9693f2e0fbc6765169ed2b19284ae93a0ce93eb09b6e2fe",
"atomicSwapFeeFactor": "0x3f814b1990fcc2590ee1e6f34b76b7aa9820a7cbcfec9ebbf1eb526848ac6707",
"swapImpactFactorPositive": "0xab8e032738aa576a838476c84eb601e7e2f2a8b34e5dc5c536aa6f1b9264bb00",
"swapImpactFactorNegative": "0x89dd570058416dd9eabb37b9b0572fe09e54d9096bd0805a622035cd5858e426",
@@ -5598,8 +5598,8 @@
"maxFundingFactorPerSecond": "0xfbca942b223f41bd0fe94b280cf01a8646913b11864a69ce11b17538e7129cc6",
"maxPnlFactorForTradersLong": "0xcca14cbe5461dd8604717dd723e8fcb2511a1c803ef6b99d5fc49368a88f8a22",
"maxPnlFactorForTradersShort": "0x66ad3a6552e212142e97a1ca0e9f38be81f997c7c15016254f1e805c59387874",
- "positionFeeFactorForPositiveImpact": "0x3f73aa8aa2902b49a18adc8fcfc80f673b7fc9234a14b2206dc5076920fc3fee",
- "positionFeeFactorForNegativeImpact": "0xeee66d741c66a82695578446740ad96569e35f6d461874a00d2699d9e5e6b133",
+ "positionFeeFactorForBalanceWasImproved": "0x3f73aa8aa2902b49a18adc8fcfc80f673b7fc9234a14b2206dc5076920fc3fee",
+ "positionFeeFactorForBalanceWasNotImproved": "0xeee66d741c66a82695578446740ad96569e35f6d461874a00d2699d9e5e6b133",
"positionImpactFactorPositive": "0xfa4c51cba11d6919e4e3d3d0afdfd0f1d395c556e064f8d3d4a57e0ab392ab35",
"positionImpactFactorNegative": "0x9bd82d60d6308707faab3f5a82e1a88387143aa9dad017bc8895f6d7e675065f",
"maxPositionImpactFactorPositive": "0xc6e8ff82b7067dd8ba4d505f65921fa7ef232a09369691b1bccb4f36a5fc478c",
@@ -5610,8 +5610,8 @@
"minCollateralFactorForOpenInterestLong": "0xa4bfbf6c0ee876da9dcbfee32442a86b0f70ea215d40f50d6136531dde67e999",
"minCollateralFactorForOpenInterestShort": "0x1155b83e2cfe76f46bd264febe8e7e2cba6781f6ae11885ebbce9ddfc94c3d50",
"positionImpactExponentFactor": "0xf7ac92d06cfc6e497db204105052083fb5fbfb4ca5eae120a960a9a3ee379273",
- "swapFeeFactorForPositiveImpact": "0x9ff68505a5a6a99d8fcfaa7feffaf3845707beef48ea8496c9938dcc1c8cd659",
- "swapFeeFactorForNegativeImpact": "0xc122e6184657495f1328c62b42c211b809ac9f91bae19dcbfa431ea1ba12345f",
+ "swapFeeFactorForBalanceWasImproved": "0x9ff68505a5a6a99d8fcfaa7feffaf3845707beef48ea8496c9938dcc1c8cd659",
+ "swapFeeFactorForBalanceWasNotImproved": "0xc122e6184657495f1328c62b42c211b809ac9f91bae19dcbfa431ea1ba12345f",
"atomicSwapFeeFactor": "0xe28fd3f8caddb693b7f72402386369bf85b84285eaf07d50a09950d9240aa883",
"swapImpactFactorPositive": "0x76e9a37967d0130ab2ef994e9eb21736904cb97869b42ea63c2ecfb00b01f743",
"swapImpactFactorNegative": "0x782fdd24d86e31774c77cbb4cb2ccb0841cb0ccc392d2863a9ee28a52fa8dac8",
@@ -5650,8 +5650,8 @@
"maxFundingFactorPerSecond": "0xcc699ede2997c9256b1197a6b45fec1044e2a5f5cf19b6c5b0c1f6fa998cf188",
"maxPnlFactorForTradersLong": "0xc723c6695a9b5598af4de3e27a64e8bfb5c1079334ae20b2ac01a5dbf3fda13b",
"maxPnlFactorForTradersShort": "0x5bc9090529cd94bcbdfb42182bf165d6024d177072db492cec78c05bab9b00e9",
- "positionFeeFactorForPositiveImpact": "0xebe11e396eb1f9b2104202c8d05d730f6138cccc95a5a7cf183b235de07df730",
- "positionFeeFactorForNegativeImpact": "0xb0db1387c147d7aead4388becf2c94d3f2fa2e6f8960908338a21fbab5d12eb5",
+ "positionFeeFactorForBalanceWasImproved": "0xebe11e396eb1f9b2104202c8d05d730f6138cccc95a5a7cf183b235de07df730",
+ "positionFeeFactorForBalanceWasNotImproved": "0xb0db1387c147d7aead4388becf2c94d3f2fa2e6f8960908338a21fbab5d12eb5",
"positionImpactFactorPositive": "0x1eaff5142fbc691c04970ca9b0a261acfbbc76e2f052ad3b534055a8726b61aa",
"positionImpactFactorNegative": "0x80b4b7fdc25c6bc930765f247486bf3ca062f8b15113fbab0d41e05f1c13af98",
"maxPositionImpactFactorPositive": "0x30e99c791acc5aee7b6dc78ac7375ce3f9edf7745062239ee1b6fa54793ec829",
@@ -5662,8 +5662,8 @@
"minCollateralFactorForOpenInterestLong": "0x21af53e3b857539d49a91f80cd682c8386a7536bacee74a1e3694fcd304a8e46",
"minCollateralFactorForOpenInterestShort": "0x49e09964b342ebf117d63182ee4a5d8dfd68db919bc3246e63d6efe220a8936b",
"positionImpactExponentFactor": "0xfeab5aa4b409a9a9a3ac990b76057d6bc1959f9ee2fded5fcf41f952766de901",
- "swapFeeFactorForPositiveImpact": "0xff7943d5848e1ae0a03982cfab38f79b5e09eab5e5f62e140ecc2c6a2f85f271",
- "swapFeeFactorForNegativeImpact": "0x5a429e1ede60115ef530a2ca58fc82631d68c05947a67ca99fcc7620b9f5ac99",
+ "swapFeeFactorForBalanceWasImproved": "0xff7943d5848e1ae0a03982cfab38f79b5e09eab5e5f62e140ecc2c6a2f85f271",
+ "swapFeeFactorForBalanceWasNotImproved": "0x5a429e1ede60115ef530a2ca58fc82631d68c05947a67ca99fcc7620b9f5ac99",
"atomicSwapFeeFactor": "0x23378dcb748980f5601979fa6eca9aede2470a803a8fdafd86daef60715c771c",
"swapImpactFactorPositive": "0xc0cfe1a7954d25ec07bce3d66dab98e0e6f267790c569760cebf1bbab2261402",
"swapImpactFactorNegative": "0xfaeadc81caa528d9ef2ad32fae0acfde6fcd2b7caecb02a1636dd457cfbf8a6e",
@@ -5702,8 +5702,8 @@
"maxFundingFactorPerSecond": "0x339531b45d58d8d4022581103de344aa555609a986dee2271d571fdc908f4e33",
"maxPnlFactorForTradersLong": "0x503ad4b2fad7874abfbdc32026d94268af5857b707d8ccd6cdf5fa832772675e",
"maxPnlFactorForTradersShort": "0x2efd3f2a4ec3819cbf55352c533036ca3d65488c891c79372dadf02092df0fe7",
- "positionFeeFactorForPositiveImpact": "0xd0e35efb814d9ca4f45fdc44baf063dbcac15b6908cad3ee66c1cb92db7bd080",
- "positionFeeFactorForNegativeImpact": "0x03c3809639c69d28aa9ed9966d12d8b3fd8f6d025724c3493932916bfe67f32f",
+ "positionFeeFactorForBalanceWasImproved": "0xd0e35efb814d9ca4f45fdc44baf063dbcac15b6908cad3ee66c1cb92db7bd080",
+ "positionFeeFactorForBalanceWasNotImproved": "0x03c3809639c69d28aa9ed9966d12d8b3fd8f6d025724c3493932916bfe67f32f",
"positionImpactFactorPositive": "0xc344ccb8fdb0aa469744b8475e04e2635b7c780d96ed1e179192285000262875",
"positionImpactFactorNegative": "0x718de37c3d799a6004ef0742bd5d880f70abc00efce52e69a73701299d42b272",
"maxPositionImpactFactorPositive": "0x87906bb7a0d357d25f8ed21eabd489b025c321b2916e03f8694f319053bf1361",
@@ -5714,8 +5714,8 @@
"minCollateralFactorForOpenInterestLong": "0xcf807ed6fdcc8664b593225fc63bb816add4008d891a840fc6af82bb00f9bf3c",
"minCollateralFactorForOpenInterestShort": "0xd1aaec1d623b1045cdfb9e5e91e9ee1667fc872a64bab967a18ed039fbaf1c97",
"positionImpactExponentFactor": "0xe50ebe93dd21ce63048f6b6fc748a98f88786e0b798aa7bf3f8c594b729e06b2",
- "swapFeeFactorForPositiveImpact": "0x4bfc0ff68b6a51da4cd8b290dbdca223e00ed95be57f4ec4d0387d80893f6042",
- "swapFeeFactorForNegativeImpact": "0xd1f0eb18d1b70fd022efbaa081a9d9d49f5a66041f12a9ddd7d542b91dda9500",
+ "swapFeeFactorForBalanceWasImproved": "0x4bfc0ff68b6a51da4cd8b290dbdca223e00ed95be57f4ec4d0387d80893f6042",
+ "swapFeeFactorForBalanceWasNotImproved": "0xd1f0eb18d1b70fd022efbaa081a9d9d49f5a66041f12a9ddd7d542b91dda9500",
"atomicSwapFeeFactor": "0x348129bb3c99c81479947c66771ea7a63bc37b52fa6038a498dc9cd885ee1573",
"swapImpactFactorPositive": "0x419f18d9a5b531da198a09ba7ef2476b5eeae9c3a16e5c3d739aeac467d6a30f",
"swapImpactFactorNegative": "0x0959316b70af2ad02e67588267776e3771423d4755a6eec179108a4455b6703d",
@@ -5754,8 +5754,8 @@
"maxFundingFactorPerSecond": "0x4363b648ca091537e2c5408897e3c34bb6380b0c8870eb250431ddd4d9cf0fe5",
"maxPnlFactorForTradersLong": "0x3657770ac232bd911685198e77896550ac98ea07bd3be93000066572dd1fd8cc",
"maxPnlFactorForTradersShort": "0x2b6639dc74e8755ba6784ae540104e3b1c785ad41deb8ef4acc35eac48946a9f",
- "positionFeeFactorForPositiveImpact": "0xd08ce0583fe23ac92c70660cefeac56bbefd6b54b303dd1cb722c3fcabb538f9",
- "positionFeeFactorForNegativeImpact": "0xbe8cf5d2f567f1e7d9660088308c5a52b20c8068dbd2fe57c168ebed0d2f415c",
+ "positionFeeFactorForBalanceWasImproved": "0xd08ce0583fe23ac92c70660cefeac56bbefd6b54b303dd1cb722c3fcabb538f9",
+ "positionFeeFactorForBalanceWasNotImproved": "0xbe8cf5d2f567f1e7d9660088308c5a52b20c8068dbd2fe57c168ebed0d2f415c",
"positionImpactFactorPositive": "0x50bf2b50d5afe0943511cfe7e7f889efa38cc054fb783ba2e8c6672921681c81",
"positionImpactFactorNegative": "0x19533b0de3f3027fdb5f002bdaa315c9dd4cbf24b6a5fe39bc1754c1066141d3",
"maxPositionImpactFactorPositive": "0x2482cb95ad826a33a01a649439805f9295b2bffe6efe7b22a5b720cf7dfb7adb",
@@ -5766,8 +5766,8 @@
"minCollateralFactorForOpenInterestLong": "0x958a0b1e22336db2aa2a005c0f60bec36679d2f78effd8393d8faa699cb6f401",
"minCollateralFactorForOpenInterestShort": "0x6ec70b5f9ac71a65136fe6ef68e9cccd1641597d35bb772801bffd12156232f0",
"positionImpactExponentFactor": "0x2067b76344d2ef6c31a16da6d9c602f6f0b6c6083b623dc415b7c54e9227b51e",
- "swapFeeFactorForPositiveImpact": "0xf90922ccdbdf7bf5da782f778623194f62c4e1a1bf2feecd9c5d65cc21a052a4",
- "swapFeeFactorForNegativeImpact": "0x19b9bf256fd0b1fd3cb363b592c1a5f6fce3898af1562c22259551a5325fa8ad",
+ "swapFeeFactorForBalanceWasImproved": "0xf90922ccdbdf7bf5da782f778623194f62c4e1a1bf2feecd9c5d65cc21a052a4",
+ "swapFeeFactorForBalanceWasNotImproved": "0x19b9bf256fd0b1fd3cb363b592c1a5f6fce3898af1562c22259551a5325fa8ad",
"atomicSwapFeeFactor": "0x7c6db4ecbc64f7d30f081d2bd25be2c58442d77ab91b8d0afc618978d26d0722",
"swapImpactFactorPositive": "0xf5aaedb45293401a80c2272b02d76b9e9aaa280cd4b02ea183b8e8e8dd1ecdc1",
"swapImpactFactorNegative": "0xcac9b44754232c7262bb194373f9b73d63a1d935f0fbb466fac538af440f8ac2",
@@ -5806,8 +5806,8 @@
"maxFundingFactorPerSecond": "0xc60cb8ec9c7a2ddc7592215b67a9910c4a5e809a0a941acec4dbac6c84a710f0",
"maxPnlFactorForTradersLong": "0x4004e4cb4f7de39fad349b0ccfed00751e05dfb34548abbcd5315e41f829d125",
"maxPnlFactorForTradersShort": "0x387cb59e244352f770fa55d46004fd6f25bfa7184a60c4c0bf8d1fd120968064",
- "positionFeeFactorForPositiveImpact": "0x007d917567b487df00776907fbf3909e6e58e8bf6af6c915a571971d74fea386",
- "positionFeeFactorForNegativeImpact": "0x2a9bf82d99539da12193636e2446af64b47b5c20d7277629a281dfef45ad8efc",
+ "positionFeeFactorForBalanceWasImproved": "0x007d917567b487df00776907fbf3909e6e58e8bf6af6c915a571971d74fea386",
+ "positionFeeFactorForBalanceWasNotImproved": "0x2a9bf82d99539da12193636e2446af64b47b5c20d7277629a281dfef45ad8efc",
"positionImpactFactorPositive": "0xac6ea7f431089b9b98dc614c7fdd3090046b6c7d38d70e6f824e6d62fc09d18c",
"positionImpactFactorNegative": "0xc520bbf5ba1eb0f504168529d37814d8b0f495e3d27ab587043c8901c206642f",
"maxPositionImpactFactorPositive": "0x48932c41a37bb5d92ced58448a95e809e96961bd3f7832a7911e3041246e1be7",
@@ -5818,8 +5818,8 @@
"minCollateralFactorForOpenInterestLong": "0x5f9b7158e11769003f8be017ed1bf645a37c93d2c7f1a07fbcef8ec7f04cbb6a",
"minCollateralFactorForOpenInterestShort": "0x1de376a03ba431c6f254a42ac66ba838045ae552f87f4894d0ab5c0854f94ff1",
"positionImpactExponentFactor": "0xe4d2b50abb09343c53a1dfa74b24cbb4c5aad66c8e94cae1da7a611c0e637eba",
- "swapFeeFactorForPositiveImpact": "0x1e5f4c350cf2fbeb7312594b741013cab6f982ba880e400fb00a410cb3abad5f",
- "swapFeeFactorForNegativeImpact": "0x56c6c93fd5ef836406270f67fb0be7246f7414db276316b34265d269283dcf0c",
+ "swapFeeFactorForBalanceWasImproved": "0x1e5f4c350cf2fbeb7312594b741013cab6f982ba880e400fb00a410cb3abad5f",
+ "swapFeeFactorForBalanceWasNotImproved": "0x56c6c93fd5ef836406270f67fb0be7246f7414db276316b34265d269283dcf0c",
"atomicSwapFeeFactor": "0x1d242793f220d0a818aadfde2c9fe8c1a13017f1ddd5ef560b7b7628d73e23ca",
"swapImpactFactorPositive": "0xccc77f870ba42d778057d944e6c80fb332320084fea7acffec3838cc2c4b84e6",
"swapImpactFactorNegative": "0x581d1441b56c1e2c8de4ef60d65ab0f3ee119350688aa8214bc1f3f19f629eea",
@@ -5858,8 +5858,8 @@
"maxFundingFactorPerSecond": "0xe583c28fd1a56971b89b5ebafef4b397c75a891ecd2f3597eda555c9babc451d",
"maxPnlFactorForTradersLong": "0x260b5157f577177177d6e74a07933ed6d32ffd849c45791a0d8538ad1babb03b",
"maxPnlFactorForTradersShort": "0x43283c63738dfddde878706561d7fa7f4bb18ec01f2d9308279b83d303f0e4c7",
- "positionFeeFactorForPositiveImpact": "0x7ec81b3e05aff0463fc38a88e0778c5e06266089c1c1c9ff80375db1c09d0ad6",
- "positionFeeFactorForNegativeImpact": "0x5de7369530849ca490d75f556ffda8ccd56ba55bced76157c3810980600f0339",
+ "positionFeeFactorForBalanceWasImproved": "0x7ec81b3e05aff0463fc38a88e0778c5e06266089c1c1c9ff80375db1c09d0ad6",
+ "positionFeeFactorForBalanceWasNotImproved": "0x5de7369530849ca490d75f556ffda8ccd56ba55bced76157c3810980600f0339",
"positionImpactFactorPositive": "0xc2527ce6d7f8c869e87302ca90c44863224f17dd52e949cec5034fe7d6d1b506",
"positionImpactFactorNegative": "0x3f918c6ec9c1980cebaf33b83d31c052e45c7ee570447898dedf2860a7da2bfa",
"maxPositionImpactFactorPositive": "0x44883af09d61a5b41c7deb568c97737dc232031443215f6042ab1fa0054e99ce",
@@ -5870,8 +5870,8 @@
"minCollateralFactorForOpenInterestLong": "0x35b24de0a1a1af62333ba0be24b03cf0639b0e1395d94c4cedec839ca221b0e7",
"minCollateralFactorForOpenInterestShort": "0x7a3010bd5329103b10512f4947b9d5ac36e6bc5677729ec4f8f68f35924f787c",
"positionImpactExponentFactor": "0x337e63e32187ff3fc173f5011397d5eabbdc507646d2393fd8fbeb287fc4b868",
- "swapFeeFactorForPositiveImpact": "0x1d62b36458b3597ca93c501028c3de5017918bd9aca0ee3acd919329b2ff8ae2",
- "swapFeeFactorForNegativeImpact": "0x5cd08eeaa4133f740cfe2c8d7f4ac62db55fbf503024a0c08b306fd39b48c935",
+ "swapFeeFactorForBalanceWasImproved": "0x1d62b36458b3597ca93c501028c3de5017918bd9aca0ee3acd919329b2ff8ae2",
+ "swapFeeFactorForBalanceWasNotImproved": "0x5cd08eeaa4133f740cfe2c8d7f4ac62db55fbf503024a0c08b306fd39b48c935",
"atomicSwapFeeFactor": "0x9c34e983234a66a6e55681e0829a7d27ab358f9897eb04561eed25f40afcb787",
"swapImpactFactorPositive": "0xfb399f4414b807428dd2340b923793f8e3e223c3758d217c66c320265786db6c",
"swapImpactFactorNegative": "0xa7583e74286befd226ba820f162caca16ce41291b51dcf4210b99a53bf8d713a",
@@ -5910,8 +5910,8 @@
"maxFundingFactorPerSecond": "0x9c399ce61641bb1f0de20944b462410a44f2d09642ccf0a04c6d0f5d066aa031",
"maxPnlFactorForTradersLong": "0x4bfbce99eb77139d55e6df621e0cf75763a4593d151d8150bb501c048935acd1",
"maxPnlFactorForTradersShort": "0x242cc33a4317819d85f507e8d122cbaefed1ae2eac046c9dcd77511b6a3d023e",
- "positionFeeFactorForPositiveImpact": "0x72816d892a8d960262b4fe693b71a6b9de0ac694a154cd31dcd7284bf516cdb2",
- "positionFeeFactorForNegativeImpact": "0x6ba910a9a74e758085688e794fcbb3b0915c9b0cc0b288dff018b306dcad09e2",
+ "positionFeeFactorForBalanceWasImproved": "0x72816d892a8d960262b4fe693b71a6b9de0ac694a154cd31dcd7284bf516cdb2",
+ "positionFeeFactorForBalanceWasNotImproved": "0x6ba910a9a74e758085688e794fcbb3b0915c9b0cc0b288dff018b306dcad09e2",
"positionImpactFactorPositive": "0xb2c83f915182511fcb38344c11c91765c4152fe820e172cd68400029c8b937c0",
"positionImpactFactorNegative": "0xe6d1b89ac6f2ce52f9e9071a251b08d41ad0d7cb998360a09141c49b6bea4156",
"maxPositionImpactFactorPositive": "0x9a594d5ba6384739325febf4bddd5b6cca6fb616edfd9088afbee47fb41ff533",
@@ -5922,8 +5922,8 @@
"minCollateralFactorForOpenInterestLong": "0x58330b893e1565ce7732e4b4d3255dc018500d7aefd5d58946144d3067508cc0",
"minCollateralFactorForOpenInterestShort": "0x2d6e8b614741229e997e7f625533433018db60bb050980a288071b2228df61b8",
"positionImpactExponentFactor": "0xbcd5e535b6b2461dd01c0915177b85bdf2ca0974c38402810a2dc5ca974cb8ed",
- "swapFeeFactorForPositiveImpact": "0xa3ba4d614e29505bac315dee9664716cfa96cadb6207c8ead416299ebab8b69f",
- "swapFeeFactorForNegativeImpact": "0x8b990fd6ef7a24250b629c7fa3d3e965f2ee10c1b17c15d9b072aaf0d75d11b0",
+ "swapFeeFactorForBalanceWasImproved": "0xa3ba4d614e29505bac315dee9664716cfa96cadb6207c8ead416299ebab8b69f",
+ "swapFeeFactorForBalanceWasNotImproved": "0x8b990fd6ef7a24250b629c7fa3d3e965f2ee10c1b17c15d9b072aaf0d75d11b0",
"atomicSwapFeeFactor": "0x65cef630b6bd35dafd0d12f900765be7171b761240e6caaf01c21d18f5f78ee0",
"swapImpactFactorPositive": "0xdb794233f573199e11b2568c3c92f38a3744dece73525f013a685e528bdc6e00",
"swapImpactFactorNegative": "0xd579ac5d1571cd61c69c378ebd76a71638e7312306b99fbdfeece3fa47ada36d",
@@ -5962,8 +5962,8 @@
"maxFundingFactorPerSecond": "0xe7e734e4c1ee8b93b86880b6848f5b207f5b234caf98b8bc386b7e79ab7912b2",
"maxPnlFactorForTradersLong": "0x8f7a05cdbf1b297c4fcea4c609f84320afac0ebf972c4f616e17c44655115971",
"maxPnlFactorForTradersShort": "0x2a71f9cf361d204760610fd760b56d5b35a843c78755085077c75a48b6df8e1b",
- "positionFeeFactorForPositiveImpact": "0x3ff5c2fda86cb6ac7357de79b9bca5e1ef107ddab75f57c0e867404f228a60d2",
- "positionFeeFactorForNegativeImpact": "0x9cd7ddbb8e1b8f130805f1cffd550815ce4a4c2d07b961c3051da5f11f0669f7",
+ "positionFeeFactorForBalanceWasImproved": "0x3ff5c2fda86cb6ac7357de79b9bca5e1ef107ddab75f57c0e867404f228a60d2",
+ "positionFeeFactorForBalanceWasNotImproved": "0x9cd7ddbb8e1b8f130805f1cffd550815ce4a4c2d07b961c3051da5f11f0669f7",
"positionImpactFactorPositive": "0x5c0251c56debcff9b65ee9d854dbf08d1c881deddfbe7ef48d37e8d18fa17989",
"positionImpactFactorNegative": "0x5840e8072ec9ea74977c498a91feed3c815d61b5f3062818f45df2b9d7b363fd",
"maxPositionImpactFactorPositive": "0x030f83905621bfd3cd25bbfe083e31bcb71db9826b067f346ee05170950136dd",
@@ -5974,8 +5974,8 @@
"minCollateralFactorForOpenInterestLong": "0x68db012f561515480190c5a28c8b7c8bff8bcfefa9f2329aa4ebb00a64dfb027",
"minCollateralFactorForOpenInterestShort": "0x3e66b9a84db4568cb7137ffa35aae284f2ee5221724165a49f4fab30490c337c",
"positionImpactExponentFactor": "0x71f13bfb0b47f4087378469ece6811760e36e271d52c8b788af0871595bdb4b5",
- "swapFeeFactorForPositiveImpact": "0x82120bfaf43c7c864880c85bea94c8aed5961dce6c788d1b372783676253b5c4",
- "swapFeeFactorForNegativeImpact": "0x9d43fe0c42b447782429e2c237376e87968a70de628212c5900a269da92a6c55",
+ "swapFeeFactorForBalanceWasImproved": "0x82120bfaf43c7c864880c85bea94c8aed5961dce6c788d1b372783676253b5c4",
+ "swapFeeFactorForBalanceWasNotImproved": "0x9d43fe0c42b447782429e2c237376e87968a70de628212c5900a269da92a6c55",
"atomicSwapFeeFactor": "0x4d523175da4643979f545e13545036af4f14cdec8da5cdadd33ef6ff363b0521",
"swapImpactFactorPositive": "0x5ac0772f7d1d01adeca5890fd7a12efb194b042a949ff9676956a1b18a6684d8",
"swapImpactFactorNegative": "0x1fda8752104b3cec09d2f3deae9a845297c27bf555787375a5095da13b00a0a0",
@@ -6014,8 +6014,8 @@
"maxFundingFactorPerSecond": "0xf4a6e146dbba3de83c2a8aabcf4b4534960ef8f3dc3d3a65280175e9fee6ab1f",
"maxPnlFactorForTradersLong": "0x9273a00d6ed482033b858572f916738237adaabfde3490be6d0b711a5dfcf512",
"maxPnlFactorForTradersShort": "0x5a4471cae0c0e536aae769ddd3bbb923858fbc28cf44b3f334d627fde16722bf",
- "positionFeeFactorForPositiveImpact": "0x6a49a1b6a150b462c7840424e50779181c431198c05864aa79c2c0297d288f36",
- "positionFeeFactorForNegativeImpact": "0x34c8eee3a2807ea0c00ffd49ca20197cdbae2767ebb1b4bf906f6e4ee05b62c7",
+ "positionFeeFactorForBalanceWasImproved": "0x6a49a1b6a150b462c7840424e50779181c431198c05864aa79c2c0297d288f36",
+ "positionFeeFactorForBalanceWasNotImproved": "0x34c8eee3a2807ea0c00ffd49ca20197cdbae2767ebb1b4bf906f6e4ee05b62c7",
"positionImpactFactorPositive": "0x72390a7575ebd481acb4a269886445b8b8f18624dd31366204ea5f052a5e0249",
"positionImpactFactorNegative": "0x1dc71efbb909b75009ef1ecd28f125af6248efb7cce08016373e95750fb1a492",
"maxPositionImpactFactorPositive": "0xefc0e6f13b3331a365027b599cb8bceaaa44eba98e35841da10f95042ce2ffc0",
@@ -6026,8 +6026,8 @@
"minCollateralFactorForOpenInterestLong": "0x764b0b370f16745c38880c82893b0b0272f2631f1298984dce74474631a139fd",
"minCollateralFactorForOpenInterestShort": "0x0341fd2b324b8ef1cf6e9c3df7335e1ea580bf8a0dbeb293d36f45ccb4e7cd76",
"positionImpactExponentFactor": "0x6ee59d63c0332b05fdfd3c9c24565b31a667e9634f594ec3454331863bb0bec7",
- "swapFeeFactorForPositiveImpact": "0x2b53b9fd42b44447585ad140436a690598b97e3a3ac95e23f5fb572474e47b91",
- "swapFeeFactorForNegativeImpact": "0x3768b6cc037ee07054b27d75caca82f3c4fed7ad75cbb2cf6309c3bb6b558a1d",
+ "swapFeeFactorForBalanceWasImproved": "0x2b53b9fd42b44447585ad140436a690598b97e3a3ac95e23f5fb572474e47b91",
+ "swapFeeFactorForBalanceWasNotImproved": "0x3768b6cc037ee07054b27d75caca82f3c4fed7ad75cbb2cf6309c3bb6b558a1d",
"atomicSwapFeeFactor": "0xe25421b86db3537779e58211d2533e3a76b716d49a68233219f571797714db0b",
"swapImpactFactorPositive": "0x4d2ba8b5784292dddf36d28528876fe8c70b2c1a23eba9b543e83fe6ce4fde58",
"swapImpactFactorNegative": "0x98753b02e57caff21ef4bdd4d67181248ece31553487ccb8d253684f83680156",
@@ -6066,8 +6066,8 @@
"maxFundingFactorPerSecond": "0x4f793acfb9cb975268489ed8551b3f2f46d2d0f8a3cd7a43491cbf8acfc364a9",
"maxPnlFactorForTradersLong": "0xe5ce7dabbd210f062e994ea004dd7f12c8ea4a7050eaed2faf3fb9c82e210576",
"maxPnlFactorForTradersShort": "0x8b3ce0762bdf8219d617fbff36144b7969b899768039a47a4a8acd6fa666a696",
- "positionFeeFactorForPositiveImpact": "0xeb9630d085c018891245c6e5b7ae66ce78e43855b5d70fa82f19b150d6f85846",
- "positionFeeFactorForNegativeImpact": "0x4511e3199a94aecfb03cf6734ee8dee591ee9f2a524325eb49e6c28d63292314",
+ "positionFeeFactorForBalanceWasImproved": "0xeb9630d085c018891245c6e5b7ae66ce78e43855b5d70fa82f19b150d6f85846",
+ "positionFeeFactorForBalanceWasNotImproved": "0x4511e3199a94aecfb03cf6734ee8dee591ee9f2a524325eb49e6c28d63292314",
"positionImpactFactorPositive": "0xf995c6a210011bc0300d3d784ceba4deaac6ece23aff73df2e74273d16483e3e",
"positionImpactFactorNegative": "0xa351ffcfb63dab651a9502901937d3e0c389398b5201794bc8150b8ff163ea6b",
"maxPositionImpactFactorPositive": "0xe94e46b223077a3dfcfed3014349de0924dbcafa5d5e12436a179b1148578c09",
@@ -6078,8 +6078,8 @@
"minCollateralFactorForOpenInterestLong": "0xe1a895360341ff2c180e3c4243d98086f42adfb2b9d2e5081ac3a5f955d63d07",
"minCollateralFactorForOpenInterestShort": "0xc71812a119761c33f9b4103ee133e3ccc0d55fadf484bdbabb43cd21eb503207",
"positionImpactExponentFactor": "0x9431bd8b3347a4230288b4bdb918b609eb1a647bc3c10c3db5e795b420ebdef1",
- "swapFeeFactorForPositiveImpact": "0xa8d9f9cff183b65b7dca088651a8baed5af77625298af1a905ae91969311ec55",
- "swapFeeFactorForNegativeImpact": "0x93427d77b84c63793a2d92dfa0d1f2129b49307b109fdf789f92d4dfc3eba264",
+ "swapFeeFactorForBalanceWasImproved": "0xa8d9f9cff183b65b7dca088651a8baed5af77625298af1a905ae91969311ec55",
+ "swapFeeFactorForBalanceWasNotImproved": "0x93427d77b84c63793a2d92dfa0d1f2129b49307b109fdf789f92d4dfc3eba264",
"atomicSwapFeeFactor": "0x59e74a1d6a0fe01c168273b218979ba368fcbead6edd6248f4062f1ae77e128e",
"swapImpactFactorPositive": "0xd4d4fec3dac5d648af883c5241e322bb47dcd508044fcdd52b3676e7a8609cba",
"swapImpactFactorNegative": "0xf7d514343cd53634029821b1b23419bffd04823ee244f6403632a85290c4fc68",
@@ -6118,8 +6118,8 @@
"maxFundingFactorPerSecond": "0x87cda574200426b085d0a9ac4bf0126dfc9c003d1b5e856664fb881d2d2e31af",
"maxPnlFactorForTradersLong": "0x5547985ce54c37c2d55099fa306cb53b663eeefec986166283ffc78a99ddb3f2",
"maxPnlFactorForTradersShort": "0x30bbab14c6e9a74e4f0a9c331552123b1a1ed09050d7049e45a068cff9e3945b",
- "positionFeeFactorForPositiveImpact": "0x52f75e2b52a2be4cf30bbe37ac74de800099d99c85ab644ecaf2769dcaeab408",
- "positionFeeFactorForNegativeImpact": "0xeec77ebd209895b9b469d59875df04a8166aff79665dfa4815544afd8d7eeaa1",
+ "positionFeeFactorForBalanceWasImproved": "0x52f75e2b52a2be4cf30bbe37ac74de800099d99c85ab644ecaf2769dcaeab408",
+ "positionFeeFactorForBalanceWasNotImproved": "0xeec77ebd209895b9b469d59875df04a8166aff79665dfa4815544afd8d7eeaa1",
"positionImpactFactorPositive": "0xe7488d5212884b2cd7c31a9d55af9caa7298e6bf97a817fa559aaa4ef9933438",
"positionImpactFactorNegative": "0xc4f2ae062f8c381b7c2c2ee80c24f8f49553e36fb19ba199947bca94109f3eb2",
"maxPositionImpactFactorPositive": "0x56f3bd4b6832379e513140b9c350ab03da7cc63005fd55651e65d0feb9784906",
@@ -6130,8 +6130,8 @@
"minCollateralFactorForOpenInterestLong": "0x39019addfc2617caa7a3c788332ec013a656af5eeb2726791dd869e978b6f0b5",
"minCollateralFactorForOpenInterestShort": "0x39fb129d3f05dd00fe0eaf0d95008439a0067785fd383e421191678b13db471a",
"positionImpactExponentFactor": "0xa7b30afea3af30a71b26148e633e26ce9280e6a9b0585f0bb857a52208354a90",
- "swapFeeFactorForPositiveImpact": "0x4f4d5219acbebf609e4d3f6dfab866ab875b7493b5ac846a466dd651bd2c238e",
- "swapFeeFactorForNegativeImpact": "0x78661a123a93d91d906d41c15c007b19ab8687ce43ae33bed9698de1fd05e9ed",
+ "swapFeeFactorForBalanceWasImproved": "0x4f4d5219acbebf609e4d3f6dfab866ab875b7493b5ac846a466dd651bd2c238e",
+ "swapFeeFactorForBalanceWasNotImproved": "0x78661a123a93d91d906d41c15c007b19ab8687ce43ae33bed9698de1fd05e9ed",
"atomicSwapFeeFactor": "0x1079426947df79faf42bbbfd1ee6735ad7dc60b72e13f804901d8eb426ab5b70",
"swapImpactFactorPositive": "0x9b3474784c1a93dc2d0f8f721f7efefb15a584887583dfa3e303ce08249ae5bb",
"swapImpactFactorNegative": "0x8fd022a687a7b4da97ceb03d51c39824c1f0669ab078f69b9e27d1f044192986",
@@ -6170,8 +6170,8 @@
"maxFundingFactorPerSecond": "0x004e278e7702bb56eea4b7bfa829e24caf2f518450986ad173e546530d2e0b62",
"maxPnlFactorForTradersLong": "0xc5e37a7383f04094590554537fd623f3f5e2dfb0c1ed990e050d311dec0b4db4",
"maxPnlFactorForTradersShort": "0xee9e62068284a18ed2aa3b418994b275c3bdcec92ceaf9df9e5424cce221f64b",
- "positionFeeFactorForPositiveImpact": "0xadcac867fbe2a8921851835e116067be9c8cb80a25e3f9dc8605f42936c0a6d5",
- "positionFeeFactorForNegativeImpact": "0x77dfa60716036f7a00a2b0fc133c1fbf8a019ab698205223897a482a4285000b",
+ "positionFeeFactorForBalanceWasImproved": "0xadcac867fbe2a8921851835e116067be9c8cb80a25e3f9dc8605f42936c0a6d5",
+ "positionFeeFactorForBalanceWasNotImproved": "0x77dfa60716036f7a00a2b0fc133c1fbf8a019ab698205223897a482a4285000b",
"positionImpactFactorPositive": "0x7a07316499b40f0073431796eece11c8912bfd12dfe2996258ff15f97531c120",
"positionImpactFactorNegative": "0xc20c88d27b7d859c64ca0ebedb1966de23dc1f690724efe32accfe87c5a6861b",
"maxPositionImpactFactorPositive": "0xe9bbed667ae52cbcc22d8903f5f3c889e17cc0b4a6fc995a26385ef189bb8c68",
@@ -6182,8 +6182,8 @@
"minCollateralFactorForOpenInterestLong": "0xf7423212c3b818bdb9261de36121cde34561293943f7645be9b61f0c35d8a996",
"minCollateralFactorForOpenInterestShort": "0x4940911a4ea682a30fc360ef3c5e02a757e3602a50c2abe4c13542699a19566c",
"positionImpactExponentFactor": "0x795f98ee94796448bf3c91698960e4f41eda771cc887322c8157f4ab66fdadf0",
- "swapFeeFactorForPositiveImpact": "0x8051fea8c9ec4de78eb316a8f6d57c8d0b9d3dac08c8a31160bdb0338a464696",
- "swapFeeFactorForNegativeImpact": "0xd4a1049e6ea909adb6b8b5053de089ae6d2daa94063b181bde473d202ffdd8e6",
+ "swapFeeFactorForBalanceWasImproved": "0x8051fea8c9ec4de78eb316a8f6d57c8d0b9d3dac08c8a31160bdb0338a464696",
+ "swapFeeFactorForBalanceWasNotImproved": "0xd4a1049e6ea909adb6b8b5053de089ae6d2daa94063b181bde473d202ffdd8e6",
"atomicSwapFeeFactor": "0xe62f0e0365e746421c58914761a9d357d610cb48872ab926c581ce083d18f243",
"swapImpactFactorPositive": "0x22637b36db12b76a57e8d2282175608a9516baec885472a076edde09e43cc8c4",
"swapImpactFactorNegative": "0x61bc53940189842d15da4f36e1a347872fbeeaf835344cfcdd930d6a2a9f7d69",
@@ -6222,8 +6222,8 @@
"maxFundingFactorPerSecond": "0x5e9c13af5bd51073d690fcf1d92ce4fbc5a18fe616d0753b9b8089f080d46d2f",
"maxPnlFactorForTradersLong": "0x111c54fa8fa9b8f89c04ea2006627602fd015c62512f1c5e61d432c1fe942968",
"maxPnlFactorForTradersShort": "0x5cb4e4a6d83ca3d2868a466198d3173d458c899f7555f78541290b9f644f23f8",
- "positionFeeFactorForPositiveImpact": "0xd7d0c01acab1ea6cc465b2701c6b5e5c5292c6ee342c478556ca16265a760d0d",
- "positionFeeFactorForNegativeImpact": "0x00b6dbe9a37a2707f1be21a552e2463cfbd8db4a5e35ccd714b5c0bb29e97eb5",
+ "positionFeeFactorForBalanceWasImproved": "0xd7d0c01acab1ea6cc465b2701c6b5e5c5292c6ee342c478556ca16265a760d0d",
+ "positionFeeFactorForBalanceWasNotImproved": "0x00b6dbe9a37a2707f1be21a552e2463cfbd8db4a5e35ccd714b5c0bb29e97eb5",
"positionImpactFactorPositive": "0x6f94cce3663de546a3528f8755407b57f03730094ba6f211b0e42a6a70f8eedb",
"positionImpactFactorNegative": "0xee2c38b11e133a53650fbfa980cb4bc36122945f2602992ef66fde5e64eb72c9",
"maxPositionImpactFactorPositive": "0x5bf9efed9d033d8b3d82ac1ba1702bf49d60d7777d313cfbb63d8526acacde52",
@@ -6234,8 +6234,8 @@
"minCollateralFactorForOpenInterestLong": "0x8854c35c045fa4645e96d74bbd69b2e0bc8404a342aa528d70cdc0c015026ca9",
"minCollateralFactorForOpenInterestShort": "0xb0c72eb9d2d10ce537aad4e5cd5d143f5b5c48dd97242bbf412e9389771dcb22",
"positionImpactExponentFactor": "0x64355c2777d71979de9e4cdfbad1d22d2f3c0162f675b37da17c3f912c43d52d",
- "swapFeeFactorForPositiveImpact": "0xa84ba5835f870711f5395ff91353a8b6cad4f3c91c427a56d5320d1a1e73df7d",
- "swapFeeFactorForNegativeImpact": "0xd2ef95e30885f11501ff5474333b4ddab4a7c3348404023f250f4b4cc35868c5",
+ "swapFeeFactorForBalanceWasImproved": "0xa84ba5835f870711f5395ff91353a8b6cad4f3c91c427a56d5320d1a1e73df7d",
+ "swapFeeFactorForBalanceWasNotImproved": "0xd2ef95e30885f11501ff5474333b4ddab4a7c3348404023f250f4b4cc35868c5",
"atomicSwapFeeFactor": "0x6bce913f581100dedec439ca6a6eaf80d0df49d846242f6f00b0bff1c2a4d493",
"swapImpactFactorPositive": "0xbcf53b75dc064d05b8bbae7a8a9024400149ad81b3ccfb631fdcda0458c165f4",
"swapImpactFactorNegative": "0x3dcb45d69a8bf6040e48ce2cbb0331be6eee579fa2332e638f0399c4b36e059b",
@@ -6274,8 +6274,8 @@
"maxFundingFactorPerSecond": "0xd1c75d99d1e0d55fed811ab7109f61d2a5fc5dc753395161e0a250bb568f1eb7",
"maxPnlFactorForTradersLong": "0x5178c9558eb7f0e67cb317eb0f0db1bd5dc31e9af20d0431221c62cebd6c0f43",
"maxPnlFactorForTradersShort": "0xb9d62f806f60de1776cc1a1441f3166ff0f040f1290e9f1edeba9e884fc29b3c",
- "positionFeeFactorForPositiveImpact": "0x85da364e330c83367e0ff53a8201bc1233422ba6defc548390d2fb6a93fe02b3",
- "positionFeeFactorForNegativeImpact": "0xb8a86fe041a22eaf0cebba2f98c6dd1a531187f598e901dd6789bac6b2ea7e77",
+ "positionFeeFactorForBalanceWasImproved": "0x85da364e330c83367e0ff53a8201bc1233422ba6defc548390d2fb6a93fe02b3",
+ "positionFeeFactorForBalanceWasNotImproved": "0xb8a86fe041a22eaf0cebba2f98c6dd1a531187f598e901dd6789bac6b2ea7e77",
"positionImpactFactorPositive": "0x64d7622ed8e794198faf8ca31ceb147ece9c26b6893932e57df76a33c36fcbd3",
"positionImpactFactorNegative": "0x0fca63fa41ce47cda279cb680774b4933f5ac163bd047f18e91981cc047f107b",
"maxPositionImpactFactorPositive": "0x3f0459921f4e5e61cb8d446dd272e0bfd9f48cdb07d56369dbbc483b2722412d",
@@ -6286,8 +6286,8 @@
"minCollateralFactorForOpenInterestLong": "0x09d4ab823430791729510b7468eaaabcb5e8c00f90ecaa1c0fdcffec4c8aaa0a",
"minCollateralFactorForOpenInterestShort": "0x579b51b3578168574b5541908b2b4d2a82f61c2e826c25afabf9d443e128d5ad",
"positionImpactExponentFactor": "0x35d0a868df28094966b90e68e435ce14766666913cd4ac19de3d2f6e17f350d3",
- "swapFeeFactorForPositiveImpact": "0x33a28ad90937883abb9dbc045d6711064d05be93dc5f2805878a0fc4c3847fca",
- "swapFeeFactorForNegativeImpact": "0x671f1f5b7f0621951ea9fe875c9f5d648343b4f77ed6ade840a32b4caf223378",
+ "swapFeeFactorForBalanceWasImproved": "0x33a28ad90937883abb9dbc045d6711064d05be93dc5f2805878a0fc4c3847fca",
+ "swapFeeFactorForBalanceWasNotImproved": "0x671f1f5b7f0621951ea9fe875c9f5d648343b4f77ed6ade840a32b4caf223378",
"atomicSwapFeeFactor": "0x1e07a30854257a03f15d64a12ba476fc3f11822584607c73ec8cf159ebc9684b",
"swapImpactFactorPositive": "0x780903830a9905f560d95f984e56ca7a535833e0bc89c7c2de42ffcbb432b0c2",
"swapImpactFactorNegative": "0xdbe58f613a7e4a83dd8f4f2ba745c6bc2a0c8f5d5558b611dbc0d06a12f8d934",
@@ -6326,8 +6326,8 @@
"maxFundingFactorPerSecond": "0xff6698495092f6f156e88af5173fb3d86e5c4f0a72e74984b560766b186e2c1b",
"maxPnlFactorForTradersLong": "0x5c1093d84b01a746d4b8c95544831ac2638da23ddf64e962929c4bfc6ffc7e29",
"maxPnlFactorForTradersShort": "0x1bc4eddcf3728b1855ea78bebc5b067fbf0de2f3fb75cd873d2e248535dabb99",
- "positionFeeFactorForPositiveImpact": "0x38dd2ccc17adc9a4c4b524f6bb1a4dcda13fee1268a662f46e935fcb59675902",
- "positionFeeFactorForNegativeImpact": "0xdd10c7fd407c5f9532e0f265c2c62c58b473945b96144bce0a6a7bdca076532f",
+ "positionFeeFactorForBalanceWasImproved": "0x38dd2ccc17adc9a4c4b524f6bb1a4dcda13fee1268a662f46e935fcb59675902",
+ "positionFeeFactorForBalanceWasNotImproved": "0xdd10c7fd407c5f9532e0f265c2c62c58b473945b96144bce0a6a7bdca076532f",
"positionImpactFactorPositive": "0xbacca2d52482098f69dbbd12e34d1dd2e74acbc5110dc2a9683cd6cc3daffc4c",
"positionImpactFactorNegative": "0x9733b0f659b3c23d37f2e2ed58d0bdf22b880057ccefdc4db9c7183bfacebdac",
"maxPositionImpactFactorPositive": "0xf89e8a9d7805cfff27c4f5ca38fa2661cd2173227d018b822c254d982665680e",
@@ -6338,8 +6338,8 @@
"minCollateralFactorForOpenInterestLong": "0xdfad34850b6f15e9790e144784adf3e0dbe917690bb3f58260b5e578ff17e8c6",
"minCollateralFactorForOpenInterestShort": "0x94ec591967c0c2e8b041b2a28bdefa3b898eaa8cd7752278ac568543a7d600e0",
"positionImpactExponentFactor": "0xc412266eb7c2ad47ed8f8e8466b3f28a9cbbb8c1a1366f702a948ef7de625198",
- "swapFeeFactorForPositiveImpact": "0x0e1fd9b3a95146e9c5fa9bf8f76c80ba91f3ddc271c5cb43a2b574fb4150c557",
- "swapFeeFactorForNegativeImpact": "0x6b9f269680991ffdd1f95773dab02b0962549ff15150976518a739e333c551dd",
+ "swapFeeFactorForBalanceWasImproved": "0x0e1fd9b3a95146e9c5fa9bf8f76c80ba91f3ddc271c5cb43a2b574fb4150c557",
+ "swapFeeFactorForBalanceWasNotImproved": "0x6b9f269680991ffdd1f95773dab02b0962549ff15150976518a739e333c551dd",
"atomicSwapFeeFactor": "0xe6ab96eb56a8cf140d345d6f681e1ad4ee5897159a1f571c4b7d81273301acae",
"swapImpactFactorPositive": "0x59346f9a4a1b766c626faf5a262d7c4682290eafde924edaccf4793b5aaf9ff8",
"swapImpactFactorNegative": "0x7abecb50f1f40514c8910dfdbe2c77053ce52f786284e6cfbb103935052858bc",
@@ -6378,8 +6378,8 @@
"maxFundingFactorPerSecond": "0xcb59ee5ef3be4bb3dcd75afcf8cfbb66dfae23d6e9f836ac3da808d3fb18afd6",
"maxPnlFactorForTradersLong": "0x35cf80c1d6ca70828ffd5850a8470b83ed4be705cd4c53d5e31c7a71c13acd5f",
"maxPnlFactorForTradersShort": "0xb3de355071ca623883ad8e9625132c0af60f04bc5d015b6222463bce1b564dfe",
- "positionFeeFactorForPositiveImpact": "0x6b96cff86524d5625bd57c852413391a7e705a4c7f4f4510ae95963142243b1d",
- "positionFeeFactorForNegativeImpact": "0x16ac8268f70816ce91541a0cce16bde38ea509432b182bd8925799d34f35479b",
+ "positionFeeFactorForBalanceWasImproved": "0x6b96cff86524d5625bd57c852413391a7e705a4c7f4f4510ae95963142243b1d",
+ "positionFeeFactorForBalanceWasNotImproved": "0x16ac8268f70816ce91541a0cce16bde38ea509432b182bd8925799d34f35479b",
"positionImpactFactorPositive": "0x7d619479b2efd31138f8d97c5b621b759c6c66181d9957b2308864289d1d5a3a",
"positionImpactFactorNegative": "0x525cf3807a5f51ee9eb90b96c15535155064117ca8b01820ac02a7ba105a48c5",
"maxPositionImpactFactorPositive": "0xfa7f7b8a323dfc202971fc487699fe4182f7bea1e938000a0ac5cdf2e3e4d08c",
@@ -6390,8 +6390,8 @@
"minCollateralFactorForOpenInterestLong": "0x5adf64aba368af76710a5ace26141cbcc2d482564ff50ff73428a666445593c1",
"minCollateralFactorForOpenInterestShort": "0xd44120b8a84afe8d59f0398a652e9af48d30ce0d68ed753e577d4ee474ec59a5",
"positionImpactExponentFactor": "0xea5bbc31f9ad83ef0b26dc676f4badba0dd7967b8c2fdfaf5fcd6e378541d5b9",
- "swapFeeFactorForPositiveImpact": "0x3528ea3c107c290c0787944fcffb8dcab5c79eb99749ef137cb4251321c05bea",
- "swapFeeFactorForNegativeImpact": "0x7f2d20dd6425fb3deefa3d5e2fb1421b98021539f97c248ec897a051737b71a9",
+ "swapFeeFactorForBalanceWasImproved": "0x3528ea3c107c290c0787944fcffb8dcab5c79eb99749ef137cb4251321c05bea",
+ "swapFeeFactorForBalanceWasNotImproved": "0x7f2d20dd6425fb3deefa3d5e2fb1421b98021539f97c248ec897a051737b71a9",
"atomicSwapFeeFactor": "0xb385bfac626209fd528bf5ac05da0bca75944b6079274d8edf7de200d6b709b0",
"swapImpactFactorPositive": "0x7994d0769514a0f8458062cc3ec7ac46e35e61a41837ef95de31499b096f6afa",
"swapImpactFactorNegative": "0x51498d6010ec706431bb43497559c424d46d5a4732ae654c0f8010ada52e32a6",
@@ -6432,8 +6432,8 @@
"maxFundingFactorPerSecond": "0x0819314a7a0ccad3addec63a8f871db40c19a9b95e1f63615a8bba140630f8a0",
"maxPnlFactorForTradersLong": "0x9d4b0bc82a0b1b09075ff804cad8c941e6ace3bb074724d30bba974ef8cfc11f",
"maxPnlFactorForTradersShort": "0x9574252828683f00a80ad5ae60eabbc8df2d88e20b58052c1b1fa376af11c838",
- "positionFeeFactorForPositiveImpact": "0xb78c4d36b9d748c770c1f5d4dc131819a12adefe3d8f9473dfecc038d5b28eae",
- "positionFeeFactorForNegativeImpact": "0xf7858fc955e73874ac18c2d1a0a4171a522f70de0d21d96cc55cbbb4ac31846b",
+ "positionFeeFactorForBalanceWasImproved": "0xb78c4d36b9d748c770c1f5d4dc131819a12adefe3d8f9473dfecc038d5b28eae",
+ "positionFeeFactorForBalanceWasNotImproved": "0xf7858fc955e73874ac18c2d1a0a4171a522f70de0d21d96cc55cbbb4ac31846b",
"positionImpactFactorPositive": "0x679f24874d8b50cd1b92b812fcbcfd224c6c8e817c7e0beb59ba85b90b2b07e2",
"positionImpactFactorNegative": "0xc97668cd423c1910439b16141588f37f5300f570dcfea5e8d18b72c9ae91a2ba",
"maxPositionImpactFactorPositive": "0x195d5103e0b678fe18962202af5e0f7d23f006ff5d6f4251507fdc33b0904322",
@@ -6444,8 +6444,8 @@
"minCollateralFactorForOpenInterestLong": "0xce4c8aa0201126eed98457458fc4d149dcf4493dd67f019fba0201d31699ef29",
"minCollateralFactorForOpenInterestShort": "0xec53e2b4c748d71f93a22d19be42e483fb467de3da64e08345bfe07b46cf458d",
"positionImpactExponentFactor": "0x86e444a2a7d73b6e45ce3d479c088bcff698e43838ad15450330c9c9eabd8529",
- "swapFeeFactorForPositiveImpact": "0x582396506dac5a19c1f0d1830190c86cb1806ffa2f7fe28ecc2fe43355a322db",
- "swapFeeFactorForNegativeImpact": "0xf591bff2380073f41efc2642b062009ea4f5a8cdcefbaed5d8fe46b94b228acb",
+ "swapFeeFactorForBalanceWasImproved": "0x582396506dac5a19c1f0d1830190c86cb1806ffa2f7fe28ecc2fe43355a322db",
+ "swapFeeFactorForBalanceWasNotImproved": "0xf591bff2380073f41efc2642b062009ea4f5a8cdcefbaed5d8fe46b94b228acb",
"atomicSwapFeeFactor": "0xa3e865258a0c6c558a839986f79a58c226474df4d8361461925154417547351d",
"swapImpactFactorPositive": "0x4ba7599baa40e9165e69982d1a27dcce324f52f09654b8e59a50aad15bff499d",
"swapImpactFactorNegative": "0x7f4945cb90820690df92a26203f54d6dec3444276801e77b49ad6ebcd60792ed",
@@ -6484,8 +6484,8 @@
"maxFundingFactorPerSecond": "0xce11facf77fb82e1a1d1845d38e100ade11aa7ad61a90c9920dbfb43b527986b",
"maxPnlFactorForTradersLong": "0x791e3a1f749906ac461b79c011bdf0ff8b232095ccd3223f8ea223de91a24464",
"maxPnlFactorForTradersShort": "0x3f33bb1ca09d93e827e72241e157a0ffe823c79f199160c3f904b044a4fa20a0",
- "positionFeeFactorForPositiveImpact": "0x08438db6daa87a913feda631f68759dc6ac09b740d7a98ce4c49c9a1538dc1f5",
- "positionFeeFactorForNegativeImpact": "0x613d88324299f23d8454f412a02f35cd3dc73e707a7eafe7cd59c01f11b73536",
+ "positionFeeFactorForBalanceWasImproved": "0x08438db6daa87a913feda631f68759dc6ac09b740d7a98ce4c49c9a1538dc1f5",
+ "positionFeeFactorForBalanceWasNotImproved": "0x613d88324299f23d8454f412a02f35cd3dc73e707a7eafe7cd59c01f11b73536",
"positionImpactFactorPositive": "0xe5d4228737565bb87aec9a167b07ca264620d828db9ef79990c54ffa971af118",
"positionImpactFactorNegative": "0x8734f73a31d38410fb1ad685c661c108f81088edc5eb4b5d2bb5c80f5a2fe662",
"maxPositionImpactFactorPositive": "0xc0298da5a9e2deaa3cb58fef159a83d6acd73199e529486e390d8954d805d54e",
@@ -6496,8 +6496,8 @@
"minCollateralFactorForOpenInterestLong": "0x06dae7e677152cf439b23a94671cfe2f632bae0a0eb85f52610742b73280818d",
"minCollateralFactorForOpenInterestShort": "0xd2576f0cd21f4f8b4aad0b77571a8f5288935a3a461fd9531f47b73aa3bff01e",
"positionImpactExponentFactor": "0xf44a08bc5690d4fd32f6b9bfe2deabee95b4ab4d36c368b22e428736451d5786",
- "swapFeeFactorForPositiveImpact": "0x334cc9b895850a332fe44e9e2215e5112afe286f0299655afae72b50c7eba86c",
- "swapFeeFactorForNegativeImpact": "0x6fb4f892d73acfa2c61cd7ff401e7cfb10eaa3de07ef7c585307b232ca95a17e",
+ "swapFeeFactorForBalanceWasImproved": "0x334cc9b895850a332fe44e9e2215e5112afe286f0299655afae72b50c7eba86c",
+ "swapFeeFactorForBalanceWasNotImproved": "0x6fb4f892d73acfa2c61cd7ff401e7cfb10eaa3de07ef7c585307b232ca95a17e",
"atomicSwapFeeFactor": "0xb41252535f4ea1933db20a160f99b2b369e7a3e96ed58e8fc69fd023555b859e",
"swapImpactFactorPositive": "0x8c6991810b91663028e92da492838890535b045f4f6315753142a6587d3ea2aa",
"swapImpactFactorNegative": "0xd61daf7708276f38ea49e14d3a708747b70aae2748be4082f230782a1bc144cb",
@@ -6536,8 +6536,8 @@
"maxFundingFactorPerSecond": "0x644713dc4b6f15531dc82bd8fa0c2b336d9716e8349f7db4701a4830249d42a7",
"maxPnlFactorForTradersLong": "0x639651a76cb1ad07aa38a5ec8812acb51a72e9248b16c9be0bac98d77bb28d6c",
"maxPnlFactorForTradersShort": "0x09b5b7da1228e5261a6568813661c1900086468b3e91ee6432ab559494632358",
- "positionFeeFactorForPositiveImpact": "0x643470e54ea2759137d583e66023c76b481580c1ccfec2b0dd4865bb25fe74e4",
- "positionFeeFactorForNegativeImpact": "0x6ff5e45b14ecbb02605d082c9e60e11d651d67d98a81cd36decb594652756325",
+ "positionFeeFactorForBalanceWasImproved": "0x643470e54ea2759137d583e66023c76b481580c1ccfec2b0dd4865bb25fe74e4",
+ "positionFeeFactorForBalanceWasNotImproved": "0x6ff5e45b14ecbb02605d082c9e60e11d651d67d98a81cd36decb594652756325",
"positionImpactFactorPositive": "0x45adb3e26ef4f16dd148363c8e7bc917a28eb43db6f3a5116a8ea47ab67ec82c",
"positionImpactFactorNegative": "0x1f1874577913939d4f58e13c84f59296ca4a74a0dcd7e768292435ea7d1c020b",
"maxPositionImpactFactorPositive": "0x8bf288bd429a21ec0e505a4b76fc46ad8599a7cdd7acf412e703e05cba852e15",
@@ -6548,8 +6548,8 @@
"minCollateralFactorForOpenInterestLong": "0x6ed33823024e228a1e472abbb2b3101ade60d23a6a6039ce31db1558d0954430",
"minCollateralFactorForOpenInterestShort": "0xfdc98985190bf92f5a5f4972db27fb5b49fc365e3ec3c65a608cce7ff01a0528",
"positionImpactExponentFactor": "0xf540790997b084333a82f882ae86123e74b7d3ca7f5100a87caf8c87b00cd336",
- "swapFeeFactorForPositiveImpact": "0x6acb142cb77be26541af1bf784495cd07034fe9371c95a45888cac47bfa4dec9",
- "swapFeeFactorForNegativeImpact": "0x7993bf7ee942df132ca439a415dc24b3a0d37f9d966e7fed424621f22e08aff0",
+ "swapFeeFactorForBalanceWasImproved": "0x6acb142cb77be26541af1bf784495cd07034fe9371c95a45888cac47bfa4dec9",
+ "swapFeeFactorForBalanceWasNotImproved": "0x7993bf7ee942df132ca439a415dc24b3a0d37f9d966e7fed424621f22e08aff0",
"atomicSwapFeeFactor": "0xc46dff7dcd179b6c69db86df5ffc8eaf8ae18c2a8aa86f51a930178d6a1f63b9",
"swapImpactFactorPositive": "0xc837e4fd08a4075186e2247915ec7e2af6fcbe68d971d312379a2ede79efc8bb",
"swapImpactFactorNegative": "0x5784a907a885c68e0ded4e2c68ae06e3ab0072a0718afcaf89a77d08b1a4bf80",
@@ -6588,8 +6588,8 @@
"maxFundingFactorPerSecond": "0x36ce5651dc4050cff509a4ae5851ef6c46c8809c148242ce599926a1cae18c44",
"maxPnlFactorForTradersLong": "0xaaac151fe4483f6784b1463cd475862ebe13d73608ff674aaa1f0bea2439b530",
"maxPnlFactorForTradersShort": "0x2c315562881c0fc9e5d2f9af924de34c634f941dbc58d939007fc353829f4562",
- "positionFeeFactorForPositiveImpact": "0xc8c6177c5fedb2073ca588c81ae6161c1f1fb2fdc4403213217dd0b8de721fd6",
- "positionFeeFactorForNegativeImpact": "0x7e5b09f11124a2ccb387d6b35ca15cd880758b3648feb3a364f4d6f792611620",
+ "positionFeeFactorForBalanceWasImproved": "0xc8c6177c5fedb2073ca588c81ae6161c1f1fb2fdc4403213217dd0b8de721fd6",
+ "positionFeeFactorForBalanceWasNotImproved": "0x7e5b09f11124a2ccb387d6b35ca15cd880758b3648feb3a364f4d6f792611620",
"positionImpactFactorPositive": "0x42a911e221ae0820a3aa336a98732d26b6f2ea0188f36ef456a85b6fb8fc4281",
"positionImpactFactorNegative": "0x08170fe7c7ae44f7244a6b26525f7b9949f90590f828fb923c0443324476cb4f",
"maxPositionImpactFactorPositive": "0x5aaf6678ea33ed3d589fc87b7805bbb094492c3ae15e56ae493dd9f14fb7eb15",
@@ -6600,8 +6600,8 @@
"minCollateralFactorForOpenInterestLong": "0x638947e41e3db0abc6f46332e4c0312c0f771ed78912b88148a27aa777c9b3f6",
"minCollateralFactorForOpenInterestShort": "0x7c8769a5a124b433fded94e525223a96e7bbd8896e3f732a186cb3cb7b2aba0f",
"positionImpactExponentFactor": "0x931cfbe7dea65d7aff1a7a9d5ad2deb94a8425d54956ba10da61b16c6afb9b2e",
- "swapFeeFactorForPositiveImpact": "0xde99941e4f2591ef17e7e67bc6cfd36f554cb1ce2d7ca5c1e72da99597eba076",
- "swapFeeFactorForNegativeImpact": "0xc84b8858b02972a3e3317df608a8c071096fee1a877c70587e6e03f136be8b3f",
+ "swapFeeFactorForBalanceWasImproved": "0xde99941e4f2591ef17e7e67bc6cfd36f554cb1ce2d7ca5c1e72da99597eba076",
+ "swapFeeFactorForBalanceWasNotImproved": "0xc84b8858b02972a3e3317df608a8c071096fee1a877c70587e6e03f136be8b3f",
"atomicSwapFeeFactor": "0xa79caaa8f613f973bfa9f2169a68ef604f5609c375fb2a8f1fb26bdfd0c1c634",
"swapImpactFactorPositive": "0x074a3442b4dae7be586549047b6a5a6a20ca259ca5a3d41ec54a5a8863efd116",
"swapImpactFactorNegative": "0xbf15c04624ef8978f119e3622f8ecee78ac7dda7045062f7e52fe444da1b70f2",
@@ -6640,8 +6640,8 @@
"maxFundingFactorPerSecond": "0x8786e0c1bac43a9b370c8bc9b4a85442c53fa187df0e0e09d6d2251cc24b8f8c",
"maxPnlFactorForTradersLong": "0xab77cc8036047e02324260261733ef57be9918e1bf199781e51941813168a7d6",
"maxPnlFactorForTradersShort": "0xff1233dae75cfb95a1e20060a3bcfcaa4e28adc91fa29a77ae424c95c5841af8",
- "positionFeeFactorForPositiveImpact": "0x6da940b55096a35d47e458287ce3c798b91e6b1110aaf6623fa517ece76a3ad1",
- "positionFeeFactorForNegativeImpact": "0xbef2aab9b9c4dcb732be4f0e64bb8e977ab9e96e6fb957cd59cc11c1c4e4269d",
+ "positionFeeFactorForBalanceWasImproved": "0x6da940b55096a35d47e458287ce3c798b91e6b1110aaf6623fa517ece76a3ad1",
+ "positionFeeFactorForBalanceWasNotImproved": "0xbef2aab9b9c4dcb732be4f0e64bb8e977ab9e96e6fb957cd59cc11c1c4e4269d",
"positionImpactFactorPositive": "0x49d1389250c712b139306aef87658a1efd8f7bec2652d80651ed4bfc1567fb58",
"positionImpactFactorNegative": "0xc64532c373c21ad3424f3d67c93beced2b0f95056eafcfebe79f8f0dcaf7a8ca",
"maxPositionImpactFactorPositive": "0x8ed5cf785b7bbf911434a93877ef8ff62ee004e6a316d584a14e5cf694267435",
@@ -6652,8 +6652,8 @@
"minCollateralFactorForOpenInterestLong": "0xa671eebbbbf69e5fdc8ba09cd259de013c3efedf731d39a16b2aacfcb0897650",
"minCollateralFactorForOpenInterestShort": "0x6e1e0c0d41c794387409f63a8d15cc4185ddab61cc6d53f4b5a097e054db2112",
"positionImpactExponentFactor": "0x2447adae280fd431e18cb993e9f552f9346101d4218b0996a3fd1d6509478a0a",
- "swapFeeFactorForPositiveImpact": "0xfd5c18e7555f9acba6ea862d6e14a04932754012def735e239b47582799926f0",
- "swapFeeFactorForNegativeImpact": "0x12b575bf244e9c972168fd84385a4ca7a59f21fbe87aa00290549e16edfa98ca",
+ "swapFeeFactorForBalanceWasImproved": "0xfd5c18e7555f9acba6ea862d6e14a04932754012def735e239b47582799926f0",
+ "swapFeeFactorForBalanceWasNotImproved": "0x12b575bf244e9c972168fd84385a4ca7a59f21fbe87aa00290549e16edfa98ca",
"atomicSwapFeeFactor": "0x38bcb40bde3296ddd8d48f7105becfc841bb32812c3dad279cd07aebb8245b24",
"swapImpactFactorPositive": "0xf8e3ab382a889a5076ee8a8fdad1001719fadd0a46cc58a5dbf1acdb2015cdb4",
"swapImpactFactorNegative": "0x3926196acc50053643fa4c3c067d2927c88d7baeeb09455c2398c1d3f51cb680",
diff --git a/sdk/src/test/mock.ts b/sdk/src/test/mock.ts
index 360882dfb9..0c090768ca 100644
--- a/sdk/src/test/mock.ts
+++ b/sdk/src/test/mock.ts
@@ -216,8 +216,8 @@ export function mockMarketsInfoData(
swapImpactPoolAmountLong: usdToToken(1000, longToken),
swapImpactPoolAmountShort: usdToToken(1000, shortToken),
- positionFeeFactorForPositiveImpact: expandDecimals(5, 26),
- positionFeeFactorForNegativeImpact: expandDecimals(5, 26),
+ positionFeeFactorForBalanceWasImproved: expandDecimals(5, 26),
+ positionFeeFactorForBalanceWasNotImproved: expandDecimals(5, 26),
positionImpactFactorPositive: expandDecimals(2, 23),
positionImpactFactorNegative: expandDecimals(1, 23),
maxPositionImpactFactorPositive: expandDecimals(2, 23),
@@ -225,8 +225,8 @@ export function mockMarketsInfoData(
maxPositionImpactFactorForLiquidations: expandDecimals(1, 23),
positionImpactExponentFactor: expandDecimals(2, 30),
- swapFeeFactorForPositiveImpact: expandDecimals(2, 27),
- swapFeeFactorForNegativeImpact: expandDecimals(2, 27),
+ swapFeeFactorForBalanceWasImproved: expandDecimals(2, 27),
+ swapFeeFactorForBalanceWasNotImproved: expandDecimals(2, 27),
atomicSwapFeeFactor: expandDecimals(2, 27),
diff --git a/sdk/src/types/markets.ts b/sdk/src/types/markets.ts
index bc78a782f7..3aa1f3a34d 100644
--- a/sdk/src/types/markets.ts
+++ b/sdk/src/types/markets.ts
@@ -93,8 +93,8 @@ export type MarketInfo = Market &
longInterestInTokens: bigint;
shortInterestInTokens: bigint;
- positionFeeFactorForPositiveImpact: bigint;
- positionFeeFactorForNegativeImpact: bigint;
+ positionFeeFactorForBalanceWasImproved: bigint;
+ positionFeeFactorForBalanceWasNotImproved: bigint;
positionImpactFactorPositive: bigint;
positionImpactFactorNegative: bigint;
maxPositionImpactFactorPositive: bigint;
@@ -102,8 +102,8 @@ export type MarketInfo = Market &
maxPositionImpactFactorForLiquidations: bigint;
positionImpactExponentFactor: bigint;
- swapFeeFactorForPositiveImpact: bigint;
- swapFeeFactorForNegativeImpact: bigint;
+ swapFeeFactorForBalanceWasImproved: bigint;
+ swapFeeFactorForBalanceWasNotImproved: bigint;
atomicSwapFeeFactor: bigint;
swapImpactFactorPositive: bigint;
swapImpactFactorNegative: bigint;
diff --git a/sdk/src/types/positions.ts b/sdk/src/types/positions.ts
index d0906537cd..16073ff44d 100644
--- a/sdk/src/types/positions.ts
+++ b/sdk/src/types/positions.ts
@@ -55,6 +55,8 @@ export type PositionInfo = Position & {
pnlPercentage: bigint;
pnlAfterFees: bigint;
pnlAfterFeesPercentage: bigint;
+ netPriceImapctDeltaUsd: bigint;
+ priceImpactDiffUsd: bigint;
leverage: bigint | undefined;
leverageWithPnl: bigint | undefined;
netValue: bigint;
diff --git a/sdk/src/utils/__tests__/positions.spec.ts b/sdk/src/utils/__tests__/positions.spec.ts
index 9a9d51e43c..bfdda71c21 100644
--- a/sdk/src/utils/__tests__/positions.spec.ts
+++ b/sdk/src/utils/__tests__/positions.spec.ts
@@ -115,9 +115,11 @@ describe("getPositionNetValue", () => {
closingFeeUsd: 5n,
uiFeeUsd: 20n,
pnl: 200n,
+ totalPendingImpactDeltaUsd: 100n,
+ priceImpactDiffUsd: 50n,
});
- // netValue = 1000n - (10n+15n) -5n -20n + 200n = 1000n -25n -5n -20n +200n=1150n
- expect(result).toBe(1150n);
+ // netValue = 1000n - (10n+15n) -5n -20n -100n + 50n + 200n = 1000n -25n -5n -20n +200n=1150n
+ expect(result).toBe(1200n);
});
});
@@ -167,6 +169,7 @@ describe("getLiquidationPrice", () => {
marketInfo,
pendingFundingFeesUsd: 0n,
pendingBorrowingFeesUsd: 0n,
+ pendingImpactAmount: 0n,
minCollateralUsd: 100n,
isLong: true,
userReferralInfo: undefined,
@@ -182,6 +185,7 @@ describe("getLiquidationPrice", () => {
marketInfo,
pendingFundingFeesUsd: 0n,
pendingBorrowingFeesUsd: 0n,
+ pendingImpactAmount: 0n,
minCollateralUsd: 100n,
isLong: true,
userReferralInfo: undefined,
@@ -206,6 +210,7 @@ describe("getLiquidationPrice", () => {
marketInfo,
pendingFundingFeesUsd: 0n,
pendingBorrowingFeesUsd: 0n,
+ pendingImpactAmount: 0n,
minCollateralUsd: 200n,
isLong: true,
userReferralInfo: undefined,
diff --git a/sdk/src/utils/fees/index.ts b/sdk/src/utils/fees/index.ts
index 7db0559759..cd917362a6 100644
--- a/sdk/src/utils/fees/index.ts
+++ b/sdk/src/utils/fees/index.ts
@@ -12,7 +12,7 @@ export * from "./priceImpact";
export function getSwapFee(
marketInfo: MarketInfo,
swapAmount: bigint,
- forPositiveImpact: boolean,
+ balanceWasImproved: boolean,
isAtomicSwap: boolean
) {
let factor: bigint;
@@ -20,7 +20,9 @@ export function getSwapFee(
if (isAtomicSwap) {
factor = marketInfo.atomicSwapFeeFactor;
} else {
- factor = forPositiveImpact ? marketInfo.swapFeeFactorForPositiveImpact : marketInfo.swapFeeFactorForNegativeImpact;
+ factor = balanceWasImproved
+ ? marketInfo.swapFeeFactorForBalanceWasImproved
+ : marketInfo.swapFeeFactorForBalanceWasNotImproved;
}
return applyFactor(swapAmount, factor);
@@ -29,13 +31,13 @@ export function getSwapFee(
export function getPositionFee(
marketInfo: MarketInfo,
sizeDeltaUsd: bigint,
- forPositiveImpact: boolean,
+ balanceWasImproved: boolean,
referralInfo: { totalRebateFactor: bigint; discountFactor: bigint } | undefined,
uiFeeFactor?: bigint
) {
- const factor = forPositiveImpact
- ? marketInfo.positionFeeFactorForPositiveImpact
- : marketInfo.positionFeeFactorForNegativeImpact;
+ const factor = balanceWasImproved
+ ? marketInfo.positionFeeFactorForBalanceWasImproved
+ : marketInfo.positionFeeFactorForBalanceWasNotImproved;
let positionFeeUsd = applyFactor(sizeDeltaUsd, factor);
const uiFeeUsd = applyFactor(sizeDeltaUsd, uiFeeFactor ?? 0n);
diff --git a/sdk/src/utils/fees/priceImpact.ts b/sdk/src/utils/fees/priceImpact.ts
index 94ac79c4c4..d24306e3e2 100644
--- a/sdk/src/utils/fees/priceImpact.ts
+++ b/sdk/src/utils/fees/priceImpact.ts
@@ -65,18 +65,6 @@ export function applySwapImpactWithCap(marketInfo: MarketInfo, token: TokenData,
return { impactDeltaAmount, cappedDiffUsd };
}
-export function getCappedPositionPriceImpactUsdForIncrease(
- marketInfo: MarketInfo,
- sizeDeltaUsd: bigint,
- isLong: boolean
-) {
- const priceImpactDeltaUsd = getPriceImpactForPosition(marketInfo, sizeDeltaUsd, isLong);
-
- const cappedImpactUsd = capPositionImpactUsdByMaxPriceImpactFactor(marketInfo, priceImpactDeltaUsd);
-
- return cappedImpactUsd;
-}
-
export function getCappedPositionImpactUsd(
marketInfo: MarketInfo,
sizeDeltaUsd: bigint,
@@ -85,15 +73,18 @@ export function getCappedPositionImpactUsd(
opts: { fallbackToZero?: boolean; shouldCapNegativeImpact?: boolean } = {}
) {
sizeDeltaUsd = isIncrease ? sizeDeltaUsd : sizeDeltaUsd * -1n;
- const priceImpactDeltaUsd = getPriceImpactForPosition(marketInfo, sizeDeltaUsd, isLong, opts);
+ const { priceImpactDeltaUsd, balanceWasImproved } = getPriceImpactForPosition(marketInfo, sizeDeltaUsd, isLong, opts);
if (priceImpactDeltaUsd < 0 && !opts.shouldCapNegativeImpact) {
- return priceImpactDeltaUsd;
+ return { priceImpactDeltaUsd, balanceWasImproved };
}
const cappedImpactUsd = capPositionImpactUsdByMaxPriceImpactFactor(marketInfo, priceImpactDeltaUsd);
- return cappedImpactUsd;
+ return {
+ priceImpactDeltaUsd: cappedImpactUsd,
+ balanceWasImproved,
+ };
}
export function capPositionImpactUsdByMaxImpactPool(marketInfo: MarketInfo, positionImpactDeltaUsd: bigint) {
@@ -158,7 +149,7 @@ export function getPriceImpactForPosition(
isLong: isLong!,
});
- const priceImpactUsd = getPriceImpactUsd({
+ const { priceImpactDeltaUsd, balanceWasImproved } = getPriceImpactUsd({
currentLongUsd,
currentShortUsd,
nextLongUsd,
@@ -169,12 +160,18 @@ export function getPriceImpactForPosition(
fallbackToZero: opts.fallbackToZero,
});
- if (priceImpactUsd > 0) {
- return priceImpactUsd;
+ if (priceImpactDeltaUsd > 0) {
+ return {
+ priceImpactDeltaUsd,
+ balanceWasImproved,
+ };
}
if (bigMath.abs(marketInfo.virtualInventoryForPositions) <= 0) {
- return priceImpactUsd;
+ return {
+ priceImpactDeltaUsd,
+ balanceWasImproved,
+ };
}
const virtualInventoryParams = getNextOpenInterestForVirtualInventory({
@@ -183,7 +180,7 @@ export function getPriceImpactForPosition(
isLong: isLong!,
});
- const priceImpactUsdForVirtualInventory = getPriceImpactUsd({
+ const { priceImpactDeltaUsd: priceImpactUsdForVirtualInventory } = getPriceImpactUsd({
currentLongUsd: virtualInventoryParams.currentLongUsd,
currentShortUsd: virtualInventoryParams.currentShortUsd,
nextLongUsd: virtualInventoryParams.nextLongUsd,
@@ -194,7 +191,13 @@ export function getPriceImpactForPosition(
fallbackToZero: opts.fallbackToZero,
});
- return priceImpactUsdForVirtualInventory < priceImpactUsd! ? priceImpactUsdForVirtualInventory : priceImpactUsd;
+ return {
+ priceImpactDeltaUsd:
+ priceImpactUsdForVirtualInventory < priceImpactDeltaUsd!
+ ? priceImpactUsdForVirtualInventory
+ : priceImpactDeltaUsd!,
+ balanceWasImproved,
+ };
}
export function getProportionalPendingImpactValues({
@@ -253,7 +256,7 @@ export function getPriceImpactForSwap(
shortDeltaUsd,
});
- const priceImpactUsd = getPriceImpactUsd({
+ const { priceImpactDeltaUsd, balanceWasImproved } = getPriceImpactUsd({
currentLongUsd: longPoolUsd,
currentShortUsd: shortPoolUsd,
nextLongUsd: nextLongPoolUsd,
@@ -264,15 +267,21 @@ export function getPriceImpactForSwap(
fallbackToZero: opts.fallbackToZero,
});
- if (priceImpactUsd > 0) {
- return priceImpactUsd;
+ if (priceImpactDeltaUsd > 0) {
+ return {
+ priceImpactDeltaUsd,
+ balanceWasImproved,
+ };
}
const virtualInventoryLong = marketInfo.virtualPoolAmountForLongToken;
const virtualInventoryShort = marketInfo.virtualPoolAmountForShortToken;
if (virtualInventoryLong <= 0 || virtualInventoryShort <= 0) {
- return priceImpactUsd;
+ return {
+ priceImpactDeltaUsd,
+ balanceWasImproved,
+ };
}
const virtualInventoryParams = getNextPoolAmountsParams({
@@ -285,7 +294,7 @@ export function getPriceImpactForSwap(
shortDeltaUsd,
});
- const priceImpactUsdForVirtualInventory = getPriceImpactUsd({
+ const { priceImpactDeltaUsd: priceImpactUsdForVirtualInventory } = getPriceImpactUsd({
currentLongUsd: virtualInventoryParams.longPoolUsd,
currentShortUsd: virtualInventoryParams.shortPoolUsd,
nextLongUsd: virtualInventoryParams.nextLongPoolUsd,
@@ -296,7 +305,13 @@ export function getPriceImpactForSwap(
fallbackToZero: opts.fallbackToZero,
});
- return priceImpactUsdForVirtualInventory < priceImpactUsd! ? priceImpactUsdForVirtualInventory : priceImpactUsd;
+ return {
+ priceImpactDeltaUsd:
+ priceImpactUsdForVirtualInventory < priceImpactDeltaUsd!
+ ? priceImpactUsdForVirtualInventory
+ : priceImpactDeltaUsd!,
+ balanceWasImproved,
+ };
}
function getNextOpenInterestForVirtualInventory(p: { virtualInventory: bigint; usdDelta: bigint; isLong: boolean }) {
@@ -398,7 +413,10 @@ export function getPriceImpactUsd(p: {
if (nextLongUsd < 0 || nextShortUsd < 0) {
if (p.fallbackToZero) {
- return 0n;
+ return {
+ priceImpactDeltaUsd: 0n,
+ balanceWasImproved: false,
+ };
} else {
throw new Error("Negative pool amount");
}
@@ -409,13 +427,14 @@ export function getPriceImpactUsd(p: {
const isSameSideRebalance = p.currentLongUsd < p.currentShortUsd === nextLongUsd < nextShortUsd;
- let impactUsd: bigint;
+ let priceImpactDeltaUsd: bigint;
+ const balanceWasImproved = nextDiff < currentDiff;
if (isSameSideRebalance) {
const hasPositiveImpact = nextDiff < currentDiff;
const factor = hasPositiveImpact ? p.factorPositive : p.factorNegative;
- impactUsd = calculateImpactForSameSideRebalance({
+ priceImpactDeltaUsd = calculateImpactForSameSideRebalance({
currentDiff,
nextDiff,
hasPositiveImpact,
@@ -423,7 +442,7 @@ export function getPriceImpactUsd(p: {
exponentFactor: p.exponentFactor,
});
} else {
- impactUsd = calculateImpactForCrossoverRebalance({
+ priceImpactDeltaUsd = calculateImpactForCrossoverRebalance({
currentDiff,
nextDiff,
factorPositive: p.factorPositive,
@@ -432,7 +451,10 @@ export function getPriceImpactUsd(p: {
});
}
- return impactUsd;
+ return {
+ priceImpactDeltaUsd,
+ balanceWasImproved,
+ };
}
/**
diff --git a/sdk/src/utils/marketKeysAndConfigs.ts b/sdk/src/utils/marketKeysAndConfigs.ts
index be2a2e657f..159530e69d 100644
--- a/sdk/src/utils/marketKeysAndConfigs.ts
+++ b/sdk/src/utils/marketKeysAndConfigs.ts
@@ -162,11 +162,11 @@ export function hashMarketConfigKeys(market: MarketConfig) {
["bytes32", "bytes32", "address", "bool"],
[MAX_PNL_FACTOR_KEY, MAX_PNL_FACTOR_FOR_TRADERS_KEY, marketAddress, false],
],
- positionFeeFactorForPositiveImpact: [
+ positionFeeFactorForBalanceWasImproved: [
["bytes32", "address", "bool"],
[POSITION_FEE_FACTOR_KEY, marketAddress, true],
],
- positionFeeFactorForNegativeImpact: [
+ positionFeeFactorForBalanceWasNotImproved: [
["bytes32", "address", "bool"],
[POSITION_FEE_FACTOR_KEY, marketAddress, false],
],
@@ -210,11 +210,11 @@ export function hashMarketConfigKeys(market: MarketConfig) {
["bytes32", "address"],
[POSITION_IMPACT_EXPONENT_FACTOR_KEY, marketAddress],
],
- swapFeeFactorForPositiveImpact: [
+ swapFeeFactorForBalanceWasImproved: [
["bytes32", "address", "bool"],
[SWAP_FEE_FACTOR_KEY, marketAddress, true],
],
- swapFeeFactorForNegativeImpact: [
+ swapFeeFactorForBalanceWasNotImproved: [
["bytes32", "address", "bool"],
[SWAP_FEE_FACTOR_KEY, marketAddress, false],
],
diff --git a/sdk/src/utils/positions.ts b/sdk/src/utils/positions.ts
index 0ac672232d..75618c4580 100644
--- a/sdk/src/utils/positions.ts
+++ b/sdk/src/utils/positions.ts
@@ -4,7 +4,14 @@ import { UserReferralInfo } from "types/referrals";
import { Token, TokenData } from "types/tokens";
import { bigMath } from "./bigmath";
-import { getPositionFee, getPriceImpactForPosition } from "./fees";
+import {
+ capPositionImpactUsdByMaxImpactPool,
+ capPositionImpactUsdByMaxPriceImpactFactor,
+ getMaxPositionImpactFactors,
+ getPositionFee,
+ getPriceImpactForPosition,
+ getProportionalPendingImpactValues,
+} from "./fees";
import { getCappedPoolPnl, getMarketPnl, getPoolUsdWithoutPnl } from "./markets";
import { applyFactor, expandDecimals } from "./numbers";
import { convertToUsd, getIsEquivalentTokens } from "./tokens";
@@ -78,6 +85,8 @@ export function getPositionPendingFeesUsd(p: { pendingFundingFeesUsd: bigint; pe
}
export function getPositionNetValue(p: {
+ totalPendingImpactDeltaUsd: bigint;
+ priceImpactDiffUsd: bigint;
collateralUsd: bigint;
pendingFundingFeesUsd: bigint;
pendingBorrowingFeesUsd: bigint;
@@ -85,11 +94,13 @@ export function getPositionNetValue(p: {
closingFeeUsd: bigint;
uiFeeUsd: bigint;
}) {
- const { pnl, closingFeeUsd, collateralUsd, uiFeeUsd } = p;
+ const { pnl, closingFeeUsd, collateralUsd, uiFeeUsd, totalPendingImpactDeltaUsd, priceImpactDiffUsd } = p;
const pendingFeesUsd = getPositionPendingFeesUsd(p);
- return collateralUsd - pendingFeesUsd - closingFeeUsd - uiFeeUsd + pnl;
+ return (
+ collateralUsd - pendingFeesUsd - closingFeeUsd - uiFeeUsd + pnl - totalPendingImpactDeltaUsd + priceImpactDiffUsd
+ );
}
export function getLeverage(p: {
@@ -121,6 +132,7 @@ export function getLiquidationPrice(p: {
marketInfo: MarketInfo;
pendingFundingFeesUsd: bigint;
pendingBorrowingFeesUsd: bigint;
+ pendingImpactAmount: bigint;
minCollateralUsd: bigint;
isLong: boolean;
useMaxPriceImpact?: boolean;
@@ -135,6 +147,7 @@ export function getLiquidationPrice(p: {
collateralToken,
pendingFundingFeesUsd,
pendingBorrowingFeesUsd,
+ pendingImpactAmount,
minCollateralUsd,
isLong,
userReferralInfo,
@@ -158,19 +171,29 @@ export function getLiquidationPrice(p: {
if (useMaxPriceImpact) {
priceImpactDeltaUsd = maxNegativePriceImpactUsd;
} else {
- priceImpactDeltaUsd = getPriceImpactForPosition(marketInfo, -sizeInUsd, isLong, { fallbackToZero: true });
+ const priceImapctForPosition = getPriceImpactForPosition(marketInfo, -sizeInUsd, isLong, { fallbackToZero: true });
+ priceImpactDeltaUsd = priceImapctForPosition.priceImpactDeltaUsd;
- if (priceImpactDeltaUsd < maxNegativePriceImpactUsd) {
- priceImpactDeltaUsd = maxNegativePriceImpactUsd;
+ if (priceImpactDeltaUsd > 0) {
+ priceImpactDeltaUsd = capPositionImpactUsdByMaxPriceImpactFactor(marketInfo, priceImpactDeltaUsd);
}
- // Ignore positive price impact
+ const pendingImpactUsd = convertToUsd(
+ pendingImpactAmount,
+ marketInfo.indexToken.decimals,
+ pendingImpactAmount > 0 ? marketInfo.indexToken.prices.minPrice : marketInfo.indexToken.prices.maxPrice
+ )!;
+
+ priceImpactDeltaUsd = priceImpactDeltaUsd + pendingImpactUsd;
+
if (priceImpactDeltaUsd > 0) {
priceImpactDeltaUsd = 0n;
+ } else if (priceImpactDeltaUsd < maxNegativePriceImpactUsd) {
+ priceImpactDeltaUsd = maxNegativePriceImpactUsd;
}
}
- let liquidationCollateralUsd = applyFactor(sizeInUsd, marketInfo.minCollateralFactor);
+ let liquidationCollateralUsd = applyFactor(sizeInUsd, marketInfo.minCollateralFactorForLiquidation);
if (liquidationCollateralUsd < minCollateralUsd) {
liquidationCollateralUsd = minCollateralUsd;
}
@@ -223,3 +246,51 @@ export function getLiquidationPrice(p: {
return liquidationPrice;
}
+
+export function getNetPriceImpactDeltaUsdForDecrease({
+ marketInfo,
+ sizeInUsd,
+ pendingImpactAmount,
+ priceImpactDeltaUsd,
+ sizeDeltaUsd,
+}: {
+ marketInfo: MarketInfo;
+ sizeInUsd: bigint;
+ pendingImpactAmount: bigint;
+ sizeDeltaUsd: bigint;
+ priceImpactDeltaUsd: bigint;
+}) {
+ const { proportionalPendingImpactDeltaUsd } = getProportionalPendingImpactValues({
+ sizeInUsd,
+ pendingImpactAmount,
+ sizeDeltaUsd,
+ indexToken: marketInfo.indexToken,
+ });
+
+ let totalImpactDeltaUsd = priceImpactDeltaUsd + proportionalPendingImpactDeltaUsd;
+ let priceImpactDiffUsd = 0n;
+
+ if (totalImpactDeltaUsd < 0) {
+ const { maxNegativeImpactFactor } = getMaxPositionImpactFactors(marketInfo);
+ const maxPriceImpactFactor = applyFactor(sizeDeltaUsd, maxNegativeImpactFactor);
+
+ const minPriceImpactUsd = -applyFactor(sizeDeltaUsd, maxPriceImpactFactor);
+
+ if (totalImpactDeltaUsd < minPriceImpactUsd) {
+ priceImpactDiffUsd = minPriceImpactUsd - totalImpactDeltaUsd;
+ totalImpactDeltaUsd = minPriceImpactUsd;
+ }
+ }
+
+ if (totalImpactDeltaUsd > 0) {
+ totalImpactDeltaUsd = capPositionImpactUsdByMaxPriceImpactFactor(marketInfo, totalImpactDeltaUsd);
+ }
+
+ totalImpactDeltaUsd = capPositionImpactUsdByMaxImpactPool(marketInfo, totalImpactDeltaUsd);
+
+ return {
+ totalImpactDeltaUsd,
+ proportionalPendingImpactDeltaUsd,
+ priceImpactDiffUsd,
+ };
+}
diff --git a/sdk/src/utils/prices.ts b/sdk/src/utils/prices.ts
index 6cf4141ee2..efe90e3179 100644
--- a/sdk/src/utils/prices.ts
+++ b/sdk/src/utils/prices.ts
@@ -66,6 +66,7 @@ export function getAcceptablePriceInfo(p: {
priceImpactDeltaAmount: 0n,
priceImpactDeltaUsd: 0n,
priceImpactDiffUsd: 0n,
+ balanceWasImproved: false,
};
if (sizeDeltaUsd <= 0 || indexPrice == 0n) {
@@ -96,10 +97,19 @@ export function getAcceptablePriceInfo(p: {
return values;
}
- values.priceImpactDeltaUsd = getCappedPositionImpactUsd(marketInfo, sizeDeltaUsd, isLong, isIncrease, {
- fallbackToZero: !isIncrease,
- shouldCapNegativeImpact: isIncrease,
- });
+ const { priceImpactDeltaUsd, balanceWasImproved } = getCappedPositionImpactUsd(
+ marketInfo,
+ sizeDeltaUsd,
+ isLong,
+ isIncrease,
+ {
+ fallbackToZero: !isIncrease,
+ shouldCapNegativeImpact: isIncrease,
+ }
+ );
+
+ values.priceImpactDeltaUsd = priceImpactDeltaUsd;
+ values.balanceWasImproved = balanceWasImproved;
if (values.priceImpactDeltaUsd > 0) {
values.priceImpactDeltaAmount = convertToTokenAmount(
@@ -115,7 +125,7 @@ export function getAcceptablePriceInfo(p: {
}
// Use uncapped price impact for the acceptable price calculation
- const priceImpactDeltaUsdForAcceptablePrice = getCappedPositionImpactUsd(
+ const { priceImpactDeltaUsd: priceImpactDeltaUsdForAcceptablePrice } = getCappedPositionImpactUsd(
marketInfo,
sizeDeltaUsd,
isLong,
diff --git a/sdk/src/utils/swap/swapStats.ts b/sdk/src/utils/swap/swapStats.ts
index c9f1612dea..f4af1c987d 100644
--- a/sdk/src/utils/swap/swapStats.ts
+++ b/sdk/src/utils/swap/swapStats.ts
@@ -230,9 +230,12 @@ export function getSwapStats(p: {
const amountIn = convertToTokenAmount(usdIn, tokenIn.decimals, priceIn)!;
let priceImpactDeltaUsd: bigint;
+ let balanceWasImproved: boolean;
try {
- priceImpactDeltaUsd = getPriceImpactForSwap(marketInfo, tokenIn, tokenOut, usdIn, usdIn * -1n);
+ const priceImpactValues = getPriceImpactForSwap(marketInfo, tokenIn, tokenOut, usdIn, usdIn * -1n);
+ priceImpactDeltaUsd = priceImpactValues.priceImpactDeltaUsd;
+ balanceWasImproved = priceImpactValues.balanceWasImproved;
} catch (e) {
// Approximate if the market would be out of capacity
const capacityUsd = getSwapCapacityUsd(marketInfo, getTokenPoolType(marketInfo, tokenInAddress) === "long");
@@ -259,8 +262,8 @@ export function getSwapStats(p: {
};
}
- const swapFeeAmount = getSwapFee(marketInfo, amountIn, priceImpactDeltaUsd > 0, isAtomicSwap);
- const swapFeeUsd = getSwapFee(marketInfo, usdIn, priceImpactDeltaUsd > 0, isAtomicSwap);
+ const swapFeeAmount = getSwapFee(marketInfo, amountIn, balanceWasImproved, isAtomicSwap);
+ const swapFeeUsd = getSwapFee(marketInfo, usdIn, balanceWasImproved, isAtomicSwap);
const amountInAfterFees = amountIn - swapFeeAmount;
const usdInAfterFees = usdIn - swapFeeUsd;
diff --git a/sdk/src/utils/trade/amounts.ts b/sdk/src/utils/trade/increase.ts
similarity index 94%
rename from sdk/src/utils/trade/amounts.ts
rename to sdk/src/utils/trade/increase.ts
index 44fd98dfd0..067dec525e 100644
--- a/sdk/src/utils/trade/amounts.ts
+++ b/sdk/src/utils/trade/increase.ts
@@ -162,13 +162,8 @@ export function getIncreasePositionAmounts(p: IncreasePositionParams): IncreaseP
const swapAmountOut = values.externalSwapQuote?.amountOut ?? swapAmounts.amountOut;
const baseCollateralUsd = convertToUsd(swapAmountOut, collateralToken.decimals, values.collateralPrice)!;
const baseSizeDeltaUsd = bigMath.mulDiv(baseCollateralUsd, leverage, BASIS_POINTS_DIVISOR_BIGINT);
- const basePriceImpactDeltaUsd = getPriceImpactForPosition(marketInfo, baseSizeDeltaUsd, isLong);
- const basePositionFeeInfo = getPositionFee(
- marketInfo,
- baseSizeDeltaUsd,
- basePriceImpactDeltaUsd > 0,
- userReferralInfo
- );
+ const { balanceWasImproved } = getPriceImpactForPosition(marketInfo, baseSizeDeltaUsd, isLong);
+ const basePositionFeeInfo = getPositionFee(marketInfo, baseSizeDeltaUsd, balanceWasImproved, userReferralInfo);
const baseUiFeeUsd = applyFactor(baseSizeDeltaUsd, uiFeeFactor);
const totalSwapVolumeUsd = !values.externalSwapQuote
? getTotalSwapVolumeFromSwapStats(values.swapPathStats?.swapSteps)
@@ -183,12 +178,7 @@ export function getIncreasePositionAmounts(p: IncreasePositionParams): IncreaseP
values.indexTokenAmount = convertToTokenAmount(values.sizeDeltaUsd, indexToken.decimals, values.indexPrice)!;
- const positionFeeInfo = getPositionFee(
- marketInfo,
- values.sizeDeltaUsd,
- basePriceImpactDeltaUsd > 0,
- userReferralInfo
- );
+ const positionFeeInfo = getPositionFee(marketInfo, values.sizeDeltaUsd, balanceWasImproved, userReferralInfo);
values.positionFeeUsd = positionFeeInfo.positionFeeUsd;
values.feeDiscountUsd = positionFeeInfo.discountUsd;
values.uiFeeUsd = applyFactor(values.sizeDeltaUsd, uiFeeFactor);
@@ -216,14 +206,9 @@ export function getIncreasePositionAmounts(p: IncreasePositionParams): IncreaseP
values.indexTokenAmount = indexTokenAmount;
values.sizeDeltaUsd = convertToUsd(indexTokenAmount, indexToken.decimals, values.indexPrice)!;
- const basePriceImpactDeltaUsd = getPriceImpactForPosition(marketInfo, values.sizeDeltaUsd, isLong);
+ const { balanceWasImproved } = getPriceImpactForPosition(marketInfo, values.sizeDeltaUsd, isLong);
- const positionFeeInfo = getPositionFee(
- marketInfo,
- values.sizeDeltaUsd,
- basePriceImpactDeltaUsd > 0,
- userReferralInfo
- );
+ const positionFeeInfo = getPositionFee(marketInfo, values.sizeDeltaUsd, balanceWasImproved, userReferralInfo);
values.positionFeeUsd = positionFeeInfo.positionFeeUsd;
values.feeDiscountUsd = positionFeeInfo.discountUsd;
@@ -269,14 +254,9 @@ export function getIncreasePositionAmounts(p: IncreasePositionParams): IncreaseP
values.indexTokenAmount = indexTokenAmount;
values.sizeDeltaUsd = convertToUsd(indexTokenAmount, indexToken.decimals, values.indexPrice)!;
- const basePriceImpactDeltaUsd = getPriceImpactForPosition(marketInfo, values.sizeDeltaUsd, isLong);
+ const { balanceWasImproved } = getPriceImpactForPosition(marketInfo, values.sizeDeltaUsd, isLong);
- const positionFeeInfo = getPositionFee(
- marketInfo,
- values.sizeDeltaUsd,
- basePriceImpactDeltaUsd > 0,
- userReferralInfo
- );
+ const positionFeeInfo = getPositionFee(marketInfo, values.sizeDeltaUsd, balanceWasImproved, userReferralInfo);
values.positionFeeUsd = positionFeeInfo.positionFeeUsd;
values.feeDiscountUsd = positionFeeInfo.discountUsd;
values.uiFeeUsd = applyFactor(values.sizeDeltaUsd, uiFeeFactor);
diff --git a/src/components/DepthChart/DepthChart.tsx b/src/components/DepthChart/DepthChart.tsx
index 53b8f20180..d606f9fe09 100644
--- a/src/components/DepthChart/DepthChart.tsx
+++ b/src/components/DepthChart/DepthChart.tsx
@@ -785,7 +785,9 @@ function useDepthChartPricesData(
const leftInc = (leftMax - DOLLAR) / SIDE_POINTS_COUNT;
// from left to center
for (let positionSize = leftMax; positionSize >= DOLLAR; positionSize -= leftInc) {
- const priceImpactUsd = getPriceImpactForPosition(marketInfo, positionSize, false, { fallbackToZero: true });
+ const { priceImpactDeltaUsd: priceImpactUsd } = getPriceImpactForPosition(marketInfo, positionSize, false, {
+ fallbackToZero: true,
+ });
const executionPrice = getDepthChartExecutionPrice({
isIncrease: true,
@@ -814,9 +816,10 @@ function useDepthChartPricesData(
});
if (positionSize - leftInc < leftMin && positionSize > leftMin && leftMin > DOLLAR) {
- const priceImpactUsd = getPriceImpactForPosition(marketInfo, leftMin, false, {
+ const { priceImpactDeltaUsd: priceImpactUsd } = getPriceImpactForPosition(marketInfo, leftMin, false, {
fallbackToZero: true,
});
+
const executionPrice = getDepthChartExecutionPrice({
isIncrease: true,
isLong: false,
@@ -848,7 +851,9 @@ function useDepthChartPricesData(
}
if (positionSize - leftInc < DOLLAR && positionSize > DOLLAR) {
- const priceImpactUsd = getPriceImpactForPosition(marketInfo, DOLLAR, false, { fallbackToZero: true });
+ const { priceImpactDeltaUsd: priceImpactUsd } = getPriceImpactForPosition(marketInfo, DOLLAR, false, {
+ fallbackToZero: true,
+ });
const executionPrice = getDepthChartExecutionPrice({
isIncrease: true,
@@ -885,7 +890,9 @@ function useDepthChartPricesData(
// from right max to center
for (let positionSize = rightMax; positionSize >= DOLLAR; positionSize -= rightInc) {
- const priceImpactUsd = getPriceImpactForPosition(marketInfo, positionSize, true, { fallbackToZero: true });
+ const { priceImpactDeltaUsd: priceImpactUsd } = getPriceImpactForPosition(marketInfo, positionSize, true, {
+ fallbackToZero: true,
+ });
const executionPrice = getDepthChartExecutionPrice({
isIncrease: true,
@@ -914,7 +921,7 @@ function useDepthChartPricesData(
});
if (positionSize - rightInc < rightMin && positionSize > rightMin && rightMin > DOLLAR) {
- const priceImpactUsd = getPriceImpactForPosition(marketInfo, rightMin, true, {
+ const { priceImpactDeltaUsd: priceImpactUsd } = getPriceImpactForPosition(marketInfo, rightMin, true, {
fallbackToZero: true,
});
@@ -949,7 +956,9 @@ function useDepthChartPricesData(
}
if (positionSize - rightInc < DOLLAR && positionSize > DOLLAR) {
- const priceImpactUsd = getPriceImpactForPosition(marketInfo, DOLLAR, true, { fallbackToZero: true });
+ const { priceImpactDeltaUsd: priceImpactUsd } = getPriceImpactForPosition(marketInfo, DOLLAR, true, {
+ fallbackToZero: true,
+ });
const executionPrice = getDepthChartExecutionPrice({
isIncrease: true,
@@ -1121,7 +1130,9 @@ function useEdgePoints(
let rightMaxExecutionPrice = 0n;
{
- const priceImpactUsd = getPriceImpactForPosition(marketInfo, rightMax, true, { fallbackToZero: true });
+ const { priceImpactDeltaUsd: priceImpactUsd } = getPriceImpactForPosition(marketInfo, rightMax, true, {
+ fallbackToZero: true,
+ });
const executionPrice = getDepthChartExecutionPrice({
isIncrease: true,
@@ -1136,7 +1147,9 @@ function useEdgePoints(
}
{
- const priceImpactUsd = getPriceImpactForPosition(marketInfo, leftMax, false, { fallbackToZero: true });
+ const { priceImpactDeltaUsd: priceImpactUsd } = getPriceImpactForPosition(marketInfo, leftMax, false, {
+ fallbackToZero: true,
+ });
const executionPrice = getDepthChartExecutionPrice({
isIncrease: true,
diff --git a/src/components/Synthetics/PositionEditor/hooks/usePositionEditorData.tsx b/src/components/Synthetics/PositionEditor/hooks/usePositionEditorData.tsx
index 3380ed8df3..e627da1c94 100644
--- a/src/components/Synthetics/PositionEditor/hooks/usePositionEditorData.tsx
+++ b/src/components/Synthetics/PositionEditor/hooks/usePositionEditorData.tsx
@@ -36,7 +36,7 @@ export function usePositionEditorData({ operation }: Options) {
return useMemo(() => {
if (
- !position ||
+ !position?.marketInfo ||
collateralDeltaUsd === undefined ||
collateralDeltaUsd < 0 ||
minCollateralUsd === undefined ||
@@ -71,6 +71,7 @@ export function usePositionEditorData({ operation }: Options) {
collateralAmount: nextCollateralAmount,
collateralToken: position.collateralToken,
marketInfo: position.marketInfo,
+ pendingImpactAmount: position.pendingImpactAmount,
userReferralInfo,
pendingFundingFeesUsd: 0n,
pendingBorrowingFeesUsd: 0n,
diff --git a/src/components/Synthetics/PositionItem/PositionItem.tsx b/src/components/Synthetics/PositionItem/PositionItem.tsx
index caa4760944..2de37ad823 100644
--- a/src/components/Synthetics/PositionItem/PositionItem.tsx
+++ b/src/components/Synthetics/PositionItem/PositionItem.tsx
@@ -85,8 +85,8 @@ export function PositionItem(p: Props) {
renderContent={() => (
{p.position.uiFeeUsd > 0
- ? t`Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee - UI Fee`
- : t`Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee`}
+ ? t`Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee - UI Fee - Net Price Impact + Price Impact Rebates`
+ : t`Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee - Net Price Impact + Price Impact Rebates`}
+
+
+
+
0;
+ const formattedPriceImpactPercentage = totalPriceImpactPercentage
+ ? "..."
+ : formatPercentage(totalPriceImpactPercentage, {
+ bps: false,
+ signed: true,
+ displayDecimals: 3,
+ });
+
+ const isPriceImpactPositive = totalPriceImpactPercentage > 0;
const feesPercentage = fees?.positionFee?.precisePercentage ?? 0n;
diff --git a/src/components/Synthetics/TradeHistory/TradeHistoryRow/mocks.ts b/src/components/Synthetics/TradeHistory/TradeHistoryRow/mocks.ts
index 976632e9dd..a8d8d91e3c 100644
--- a/src/components/Synthetics/TradeHistory/TradeHistoryRow/mocks.ts
+++ b/src/components/Synthetics/TradeHistory/TradeHistoryRow/mocks.ts
@@ -278,11 +278,11 @@ export const requestIncreasePosition = prepare({
type: "bigint",
hex: "0x01d670",
},
- positionFeeFactorForPositiveImpact: {
+ positionFeeFactorForBalanceWasImproved: {
type: "bigint",
hex: "0x019d971e4fe8401e74000000",
},
- positionFeeFactorForNegativeImpact: {
+ positionFeeFactorForBalanceWasNotImproved: {
type: "bigint",
hex: "0x024306c4097859c43c000000",
},
@@ -310,11 +310,11 @@ export const requestIncreasePosition = prepare({
type: "bigint",
hex: "0x193e5939a08ce9dbd480000000",
},
- swapFeeFactorForPositiveImpact: {
+ swapFeeFactorForBalanceWasImproved: {
type: "bigint",
hex: "0x019d971e4fe8401e74000000",
},
- swapFeeFactorForNegativeImpact: {
+ swapFeeFactorForBalanceWasNotImproved: {
type: "bigint",
hex: "0x024306c4097859c43c000000",
},
@@ -734,11 +734,11 @@ export const withdraw1Usd = prepare({
type: "bigint",
hex: "0x01d670",
},
- positionFeeFactorForPositiveImpact: {
+ positionFeeFactorForBalanceWasImproved: {
type: "bigint",
hex: "0x019d971e4fe8401e74000000",
},
- positionFeeFactorForNegativeImpact: {
+ positionFeeFactorForBalanceWasNotImproved: {
type: "bigint",
hex: "0x024306c4097859c43c000000",
},
@@ -766,11 +766,11 @@ export const withdraw1Usd = prepare({
type: "bigint",
hex: "0x193e5939a08ce9dbd480000000",
},
- swapFeeFactorForPositiveImpact: {
+ swapFeeFactorForBalanceWasImproved: {
type: "bigint",
hex: "0x019d971e4fe8401e74000000",
},
- swapFeeFactorForNegativeImpact: {
+ swapFeeFactorForBalanceWasNotImproved: {
type: "bigint",
hex: "0x024306c4097859c43c000000",
},
@@ -1186,11 +1186,11 @@ export const deposit1Usd = prepare({
type: "bigint",
hex: "0xa3aa",
},
- positionFeeFactorForPositiveImpact: {
+ positionFeeFactorForBalanceWasImproved: {
type: "bigint",
hex: "0x019d971e4fe8401e74000000",
},
- positionFeeFactorForNegativeImpact: {
+ positionFeeFactorForBalanceWasNotImproved: {
type: "bigint",
hex: "0x024306c4097859c43c000000",
},
@@ -1218,11 +1218,11 @@ export const deposit1Usd = prepare({
type: "bigint",
hex: "0x193e5939a08ce9dbd480000000",
},
- swapFeeFactorForPositiveImpact: {
+ swapFeeFactorForBalanceWasImproved: {
type: "bigint",
hex: "0x019d971e4fe8401e74000000",
},
- swapFeeFactorForNegativeImpact: {
+ swapFeeFactorForBalanceWasNotImproved: {
type: "bigint",
hex: "0x024306c4097859c43c000000",
},
@@ -1596,11 +1596,11 @@ export const createOrderDecreaseLong = prepare({
type: "bigint",
hex: "0x0bbc20",
},
- positionFeeFactorForPositiveImpact: {
+ positionFeeFactorForBalanceWasImproved: {
type: "bigint",
hex: "0x019d971e4fe8401e74000000",
},
- positionFeeFactorForNegativeImpact: {
+ positionFeeFactorForBalanceWasNotImproved: {
type: "bigint",
hex: "0x024306c4097859c43c000000",
},
@@ -1628,11 +1628,11 @@ export const createOrderDecreaseLong = prepare({
type: "bigint",
hex: "0x193e5939a08ce9dbd480000000",
},
- swapFeeFactorForPositiveImpact: {
+ swapFeeFactorForBalanceWasImproved: {
type: "bigint",
hex: "0x019d971e4fe8401e74000000",
},
- swapFeeFactorForNegativeImpact: {
+ swapFeeFactorForBalanceWasNotImproved: {
type: "bigint",
hex: "0x024306c4097859c43c000000",
},
@@ -1998,11 +1998,11 @@ export const cancelOrderIncreaseLong = prepare({
type: "bigint",
hex: "0x00",
},
- positionFeeFactorForPositiveImpact: {
+ positionFeeFactorForBalanceWasImproved: {
type: "bigint",
hex: "0x019d971e4fe8401e74000000",
},
- positionFeeFactorForNegativeImpact: {
+ positionFeeFactorForBalanceWasNotImproved: {
type: "bigint",
hex: "0x024306c4097859c43c000000",
},
@@ -2030,11 +2030,11 @@ export const cancelOrderIncreaseLong = prepare({
type: "bigint",
hex: "0x193e5939a08ce9dbd480000000",
},
- swapFeeFactorForPositiveImpact: {
+ swapFeeFactorForBalanceWasImproved: {
type: "bigint",
hex: "0x019d971e4fe8401e74000000",
},
- swapFeeFactorForNegativeImpact: {
+ swapFeeFactorForBalanceWasNotImproved: {
type: "bigint",
hex: "0x024306c4097859c43c000000",
},
@@ -2408,11 +2408,11 @@ export const createOrderIncreaseLong = prepare({
type: "bigint",
hex: "0x0bbc20",
},
- positionFeeFactorForPositiveImpact: {
+ positionFeeFactorForBalanceWasImproved: {
type: "bigint",
hex: "0x019d971e4fe8401e74000000",
},
- positionFeeFactorForNegativeImpact: {
+ positionFeeFactorForBalanceWasNotImproved: {
type: "bigint",
hex: "0x024306c4097859c43c000000",
},
@@ -2440,11 +2440,11 @@ export const createOrderIncreaseLong = prepare({
type: "bigint",
hex: "0x193e5939a08ce9dbd480000000",
},
- swapFeeFactorForPositiveImpact: {
+ swapFeeFactorForBalanceWasImproved: {
type: "bigint",
hex: "0x019d971e4fe8401e74000000",
},
- swapFeeFactorForNegativeImpact: {
+ swapFeeFactorForBalanceWasNotImproved: {
type: "bigint",
hex: "0x024306c4097859c43c000000",
},
@@ -2829,11 +2829,11 @@ export const executeOrderDecreaseShort = prepare({
type: "bigint",
hex: "0x00",
},
- positionFeeFactorForPositiveImpact: {
+ positionFeeFactorForBalanceWasImproved: {
type: "bigint",
hex: "0x019d971e4fe8401e74000000",
},
- positionFeeFactorForNegativeImpact: {
+ positionFeeFactorForBalanceWasNotImproved: {
type: "bigint",
hex: "0x024306c4097859c43c000000",
},
@@ -2861,11 +2861,11 @@ export const executeOrderDecreaseShort = prepare({
type: "bigint",
hex: "0x193e5939a08ce9dbd480000000",
},
- swapFeeFactorForPositiveImpact: {
+ swapFeeFactorForBalanceWasImproved: {
type: "bigint",
hex: "0x019d971e4fe8401e74000000",
},
- swapFeeFactorForNegativeImpact: {
+ swapFeeFactorForBalanceWasNotImproved: {
type: "bigint",
hex: "0x024306c4097859c43c000000",
},
@@ -3264,11 +3264,11 @@ export const executeOrderIncreaseLong = prepare({
type: "bigint",
hex: "0x00",
},
- positionFeeFactorForPositiveImpact: {
+ positionFeeFactorForBalanceWasImproved: {
type: "bigint",
hex: "0x019d971e4fe8401e74000000",
},
- positionFeeFactorForNegativeImpact: {
+ positionFeeFactorForBalanceWasNotImproved: {
type: "bigint",
hex: "0x024306c4097859c43c000000",
},
@@ -3296,11 +3296,11 @@ export const executeOrderIncreaseLong = prepare({
type: "bigint",
hex: "0x193e5939a08ce9dbd480000000",
},
- swapFeeFactorForPositiveImpact: {
+ swapFeeFactorForBalanceWasImproved: {
type: "bigint",
hex: "0x019d971e4fe8401e74000000",
},
- swapFeeFactorForNegativeImpact: {
+ swapFeeFactorForBalanceWasNotImproved: {
type: "bigint",
hex: "0x024306c4097859c43c000000",
},
@@ -3697,11 +3697,11 @@ export const frozenOrderIncreaseShort = prepare({
type: "bigint",
hex: "0x00",
},
- positionFeeFactorForPositiveImpact: {
+ positionFeeFactorForBalanceWasImproved: {
type: "bigint",
hex: "0x019d971e4fe8401e74000000",
},
- positionFeeFactorForNegativeImpact: {
+ positionFeeFactorForBalanceWasNotImproved: {
type: "bigint",
hex: "0x024306c4097859c43c000000",
},
@@ -3729,11 +3729,11 @@ export const frozenOrderIncreaseShort = prepare({
type: "bigint",
hex: "0x193e5939a08ce9dbd480000000",
},
- swapFeeFactorForPositiveImpact: {
+ swapFeeFactorForBalanceWasImproved: {
type: "bigint",
hex: "0x019d971e4fe8401e74000000",
},
- swapFeeFactorForNegativeImpact: {
+ swapFeeFactorForBalanceWasNotImproved: {
type: "bigint",
hex: "0x024306c4097859c43c000000",
},
@@ -4102,11 +4102,11 @@ export const undefinedOrder = prepare({
type: "bigint",
hex: "0x00",
},
- positionFeeFactorForPositiveImpact: {
+ positionFeeFactorForBalanceWasImproved: {
type: "bigint",
hex: "0x019d971e4fe8401e74000000",
},
- positionFeeFactorForNegativeImpact: {
+ positionFeeFactorForBalanceWasNotImproved: {
type: "bigint",
hex: "0x024306c4097859c43c000000",
},
@@ -4134,11 +4134,11 @@ export const undefinedOrder = prepare({
type: "bigint",
hex: "0x193e5939a08ce9dbd480000000",
},
- swapFeeFactorForPositiveImpact: {
+ swapFeeFactorForBalanceWasImproved: {
type: "bigint",
hex: "0x019d971e4fe8401e74000000",
},
- swapFeeFactorForNegativeImpact: {
+ swapFeeFactorForBalanceWasNotImproved: {
type: "bigint",
hex: "0x024306c4097859c43c000000",
},
@@ -4520,11 +4520,11 @@ export const liquidated = prepare({
type: "bigint",
hex: "0x00",
},
- positionFeeFactorForPositiveImpact: {
+ positionFeeFactorForBalanceWasImproved: {
type: "bigint",
hex: "0x019d971e4fe8401e74000000",
},
- positionFeeFactorForNegativeImpact: {
+ positionFeeFactorForBalanceWasNotImproved: {
type: "bigint",
hex: "0x024306c4097859c43c000000",
},
@@ -4552,11 +4552,11 @@ export const liquidated = prepare({
type: "bigint",
hex: "0x193e5939a08ce9dbd480000000",
},
- swapFeeFactorForPositiveImpact: {
+ swapFeeFactorForBalanceWasImproved: {
type: "bigint",
hex: "0x019d971e4fe8401e74000000",
},
- swapFeeFactorForNegativeImpact: {
+ swapFeeFactorForBalanceWasNotImproved: {
type: "bigint",
hex: "0x024306c4097859c43c000000",
},
@@ -5000,11 +5000,11 @@ export const increaseLongETH = prepare({
type: "bigint",
hex: "0x00",
},
- positionFeeFactorForPositiveImpact: {
+ positionFeeFactorForBalanceWasImproved: {
type: "bigint",
hex: "0x019d971e4fe8401e74000000",
},
- positionFeeFactorForNegativeImpact: {
+ positionFeeFactorForBalanceWasNotImproved: {
type: "bigint",
hex: "0x024306c4097859c43c000000",
},
@@ -5032,11 +5032,11 @@ export const increaseLongETH = prepare({
type: "bigint",
hex: "0x193e5939a08ce9dbd480000000",
},
- swapFeeFactorForPositiveImpact: {
+ swapFeeFactorForBalanceWasImproved: {
type: "bigint",
hex: "0x019d971e4fe8401e74000000",
},
- swapFeeFactorForNegativeImpact: {
+ swapFeeFactorForBalanceWasNotImproved: {
type: "bigint",
hex: "0x024306c4097859c43c000000",
},
@@ -5555,16 +5555,16 @@ export const createOrderStopMarketLong = prepare({
minCollateralFactor: { type: "bigint", value: "5000000000000000000000000000" },
minCollateralFactorForOpenInterestLong: { type: "bigint", value: "60000000000000000000" },
minCollateralFactorForOpenInterestShort: { type: "bigint", value: "60000000000000000000" },
- positionFeeFactorForPositiveImpact: { type: "bigint", value: "400000000000000000000000000" },
- positionFeeFactorForNegativeImpact: { type: "bigint", value: "600000000000000000000000000" },
+ positionFeeFactorForBalanceWasImproved: { type: "bigint", value: "400000000000000000000000000" },
+ positionFeeFactorForBalanceWasNotImproved: { type: "bigint", value: "600000000000000000000000000" },
positionImpactFactorPositive: { type: "bigint", value: "3360664378949365000000" },
positionImpactFactorNegative: { type: "bigint", value: "4032797254739238000000" },
maxPositionImpactFactorPositive: { type: "bigint", value: "5000000000000000000000000000" },
maxPositionImpactFactorNegative: { type: "bigint", value: "5000000000000000000000000000" },
maxPositionImpactFactorForLiquidations: { type: "bigint", value: "0" },
positionImpactExponentFactor: { type: "bigint", value: "1739944843614544000000000000000" },
- swapFeeFactorForPositiveImpact: { type: "bigint", value: "500000000000000000000000000" },
- swapFeeFactorForNegativeImpact: { type: "bigint", value: "700000000000000000000000000" },
+ swapFeeFactorForBalanceWasImproved: { type: "bigint", value: "500000000000000000000000000" },
+ swapFeeFactorForBalanceWasNotImproved: { type: "bigint", value: "700000000000000000000000000" },
swapImpactFactorPositive: { type: "bigint", value: "200000000000000000000" },
swapImpactFactorNegative: { type: "bigint", value: "400000000000000000000" },
swapImpactExponentFactor: { type: "bigint", value: "2000000000000000000000000000000" },
@@ -5759,16 +5759,16 @@ export const executeOrderStopMarketLong = prepare({
minCollateralFactor: { type: "bigint", value: "5000000000000000000000000000" },
minCollateralFactorForOpenInterestLong: { type: "bigint", value: "60000000000000000000" },
minCollateralFactorForOpenInterestShort: { type: "bigint", value: "60000000000000000000" },
- positionFeeFactorForPositiveImpact: { type: "bigint", value: "400000000000000000000000000" },
- positionFeeFactorForNegativeImpact: { type: "bigint", value: "600000000000000000000000000" },
+ positionFeeFactorForBalanceWasImproved: { type: "bigint", value: "400000000000000000000000000" },
+ positionFeeFactorForBalanceWasNotImproved: { type: "bigint", value: "600000000000000000000000000" },
positionImpactFactorPositive: { type: "bigint", value: "3360664378949365000000" },
positionImpactFactorNegative: { type: "bigint", value: "4032797254739238000000" },
maxPositionImpactFactorPositive: { type: "bigint", value: "5000000000000000000000000000" },
maxPositionImpactFactorNegative: { type: "bigint", value: "5000000000000000000000000000" },
maxPositionImpactFactorForLiquidations: { type: "bigint", value: "0" },
positionImpactExponentFactor: { type: "bigint", value: "1739944843614544000000000000000" },
- swapFeeFactorForPositiveImpact: { type: "bigint", value: "500000000000000000000000000" },
- swapFeeFactorForNegativeImpact: { type: "bigint", value: "700000000000000000000000000" },
+ swapFeeFactorForBalanceWasImproved: { type: "bigint", value: "500000000000000000000000000" },
+ swapFeeFactorForBalanceWasNotImproved: { type: "bigint", value: "700000000000000000000000000" },
swapImpactFactorPositive: { type: "bigint", value: "200000000000000000000" },
swapImpactFactorNegative: { type: "bigint", value: "400000000000000000000" },
swapImpactExponentFactor: { type: "bigint", value: "2000000000000000000000000000000" },
diff --git a/src/context/SyntheticsStateContext/selectors/leaderboardSelectors.ts b/src/context/SyntheticsStateContext/selectors/leaderboardSelectors.ts
index b2f5b56880..2d300c0b3c 100644
--- a/src/context/SyntheticsStateContext/selectors/leaderboardSelectors.ts
+++ b/src/context/SyntheticsStateContext/selectors/leaderboardSelectors.ts
@@ -302,8 +302,8 @@ function getCloseFee(
referralInfo: { totalRebateFactor: bigint; discountFactor: bigint } | undefined
) {
const factor = forPositiveImpact
- ? marketInfo.positionFeeFactorForPositiveImpact
- : marketInfo.positionFeeFactorForNegativeImpact;
+ ? marketInfo.positionFeeFactorForBalanceWasImproved
+ : marketInfo.positionFeeFactorForBalanceWasNotImproved;
let positionFeeUsd = applyFactor(sizeDeltaUsd, factor);
diff --git a/src/context/SyntheticsStateContext/selectors/tradeboxSelectors/selectTradeboxAvailableMarketsOptions.ts b/src/context/SyntheticsStateContext/selectors/tradeboxSelectors/selectTradeboxAvailableMarketsOptions.ts
index 07546fd001..02f74cdb07 100644
--- a/src/context/SyntheticsStateContext/selectors/tradeboxSelectors/selectTradeboxAvailableMarketsOptions.ts
+++ b/src/context/SyntheticsStateContext/selectors/tradeboxSelectors/selectTradeboxAvailableMarketsOptions.ts
@@ -212,7 +212,7 @@ export const selectTradeboxAvailableMarketsOptions = createSelector((q) => {
marketIncreasePositionAmounts.sizeDeltaUsd
);
- const priceImpactDeltaUsd = getCappedPositionImpactUsd(
+ const { priceImpactDeltaUsd } = getCappedPositionImpactUsd(
liquidMarket,
marketIncreasePositionAmounts.sizeDeltaUsd,
isLong,
diff --git a/src/context/SyntheticsStateContext/selectors/tradeboxSelectors/selectTradeboxRelatedMarketsStats.ts b/src/context/SyntheticsStateContext/selectors/tradeboxSelectors/selectTradeboxRelatedMarketsStats.ts
index bbad93af11..8a3ca222a1 100644
--- a/src/context/SyntheticsStateContext/selectors/tradeboxSelectors/selectTradeboxRelatedMarketsStats.ts
+++ b/src/context/SyntheticsStateContext/selectors/tradeboxSelectors/selectTradeboxRelatedMarketsStats.ts
@@ -82,7 +82,7 @@ export const selectTradeboxRelatedMarketsStats = createSelector((q) => {
marketIncreasePositionAmounts.sizeDeltaUsd
);
- const priceImpactDeltaUsd = getCappedPositionImpactUsd(
+ const { priceImpactDeltaUsd } = getCappedPositionImpactUsd(
relatedMarket,
marketIncreasePositionAmounts.sizeDeltaUsd,
isLong,
diff --git a/src/context/SyntheticsStateContext/selectors/tradeboxSelectors/selectTradeboxSidecarOrders.ts b/src/context/SyntheticsStateContext/selectors/tradeboxSelectors/selectTradeboxSidecarOrders.ts
index b0d4e4dab9..d6f60c0842 100644
--- a/src/context/SyntheticsStateContext/selectors/tradeboxSelectors/selectTradeboxSidecarOrders.ts
+++ b/src/context/SyntheticsStateContext/selectors/tradeboxSelectors/selectTradeboxSidecarOrders.ts
@@ -230,7 +230,10 @@ export const selectTradeboxMockPosition = createSelector((q) => {
uiFeeUsd: 0n,
pendingFundingFeesUsd: 0n,
pendingClaimableFundingFeesUsd: 0n,
+ pendingImpactAmount: 0n,
positionFeeAmount: 0n,
+ netPriceImapctDeltaUsd: 0n,
+ priceImpactDiffUsd: 0n,
traderDiscountAmount: 0n,
uiFeeAmount: 0n,
};
diff --git a/src/domain/synthetics/__tests__/trade/decrease.spec.ts b/src/domain/synthetics/__tests__/trade/decrease.spec.ts
index d2052a79e4..a5b3ac9b72 100644
--- a/src/domain/synthetics/__tests__/trade/decrease.spec.ts
+++ b/src/domain/synthetics/__tests__/trade/decrease.spec.ts
@@ -103,16 +103,16 @@ const marketInfo: MarketInfo = {
minCollateralFactorForOpenInterestShort: BigInt("0x0ad78ebc5ac6200000"),
claimableFundingAmountLong: BigInt("0x1cefb332ff83"),
claimableFundingAmountShort: BigInt("0x05b1ee"),
- positionFeeFactorForPositiveImpact: BigInt("0x019d971e4fe8401e74000000"),
- positionFeeFactorForNegativeImpact: BigInt("0x024306c4097859c43c000000"),
+ positionFeeFactorForBalanceWasImproved: BigInt("0x019d971e4fe8401e74000000"),
+ positionFeeFactorForBalanceWasNotImproved: BigInt("0x024306c4097859c43c000000"),
positionImpactFactorPositive: BigInt("0x04e1003b28d9280000"),
positionImpactFactorNegative: BigInt("0x0821ab0d4414980000"),
maxPositionImpactFactorPositive: BigInt("0x1027e72f1f12813088000000"),
maxPositionImpactFactorNegative: BigInt("0x1027e72f1f12813088000000"),
maxPositionImpactFactorForLiquidations: BigInt("0x00"),
positionImpactExponentFactor: BigInt("0x193e5939a08ce9dbd480000000"),
- swapFeeFactorForPositiveImpact: BigInt("0x019d971e4fe8401e74000000"),
- swapFeeFactorForNegativeImpact: BigInt("0x024306c4097859c43c000000"),
+ swapFeeFactorForBalanceWasImproved: BigInt("0x019d971e4fe8401e74000000"),
+ swapFeeFactorForBalanceWasNotImproved: BigInt("0x024306c4097859c43c000000"),
swapImpactFactorPositive: BigInt("0x0ad78ebc5ac6200000"),
swapImpactFactorNegative: BigInt("0x0ad78ebc5ac6200000"),
swapImpactExponentFactor: BigInt("0x193e5939a08ce9dbd480000000"),
@@ -157,6 +157,8 @@ const position: PositionInfoLoaded = {
pnlToken: wethToken,
markPrice: BigInt("0x9630ee7c4228a0ae237af8000000"),
entryPrice: BigInt("0x6f0b60ef22cc9d66ddf3e1340000"),
+ netPriceImapctDeltaUsd: BigInt("0x00"),
+ priceImpactDiffUsd: BigInt("0x00"),
liquidationPrice: BigInt("0x682958f55ba441c1492a47080000"),
collateralUsd: BigInt("0x1686d970e074ba9aa5c2e20000"),
remainingCollateralUsd: BigInt("0x0ff0843a734b191deb6e225999"),
diff --git a/src/domain/synthetics/markets/useMarketsInfoRequest/buildMarketsConfigsRequest.ts b/src/domain/synthetics/markets/useMarketsInfoRequest/buildMarketsConfigsRequest.ts
index c957f99ace..93901ca6f5 100644
--- a/src/domain/synthetics/markets/useMarketsInfoRequest/buildMarketsConfigsRequest.ts
+++ b/src/domain/synthetics/markets/useMarketsInfoRequest/buildMarketsConfigsRequest.ts
@@ -141,13 +141,13 @@ export async function buildMarketsConfigsRequest(
methodName: "getUint",
params: [prebuiltHashedKeys.maxPnlFactorForTradersShort],
},
- positionFeeFactorForPositiveImpact: {
+ positionFeeFactorForBalanceWasImproved: {
methodName: "getUint",
- params: [prebuiltHashedKeys.positionFeeFactorForPositiveImpact],
+ params: [prebuiltHashedKeys.positionFeeFactorForBalanceWasImproved],
},
- positionFeeFactorForNegativeImpact: {
+ positionFeeFactorForBalanceWasNotImproved: {
methodName: "getUint",
- params: [prebuiltHashedKeys.positionFeeFactorForNegativeImpact],
+ params: [prebuiltHashedKeys.positionFeeFactorForBalanceWasNotImproved],
},
positionImpactFactorPositive: {
methodName: "getUint",
@@ -189,13 +189,13 @@ export async function buildMarketsConfigsRequest(
methodName: "getUint",
params: [prebuiltHashedKeys.positionImpactExponentFactor],
},
- swapFeeFactorForPositiveImpact: {
+ swapFeeFactorForBalanceWasImproved: {
methodName: "getUint",
- params: [prebuiltHashedKeys.swapFeeFactorForPositiveImpact],
+ params: [prebuiltHashedKeys.swapFeeFactorForBalanceWasImproved],
},
- swapFeeFactorForNegativeImpact: {
+ swapFeeFactorForBalanceWasNotImproved: {
methodName: "getUint",
- params: [prebuiltHashedKeys.swapFeeFactorForNegativeImpact],
+ params: [prebuiltHashedKeys.swapFeeFactorForBalanceWasNotImproved],
},
atomicSwapFeeFactor: {
methodName: "getUint",
diff --git a/src/domain/synthetics/markets/useMarketsInfoRequest/index.ts b/src/domain/synthetics/markets/useMarketsInfoRequest/index.ts
index 66fc5153ee..f0080c1220 100644
--- a/src/domain/synthetics/markets/useMarketsInfoRequest/index.ts
+++ b/src/domain/synthetics/markets/useMarketsInfoRequest/index.ts
@@ -319,8 +319,10 @@ function useMarketsConfigsRequest({
minCollateralFactorForOpenInterestShort:
dataStoreValues.minCollateralFactorForOpenInterestShort.returnValues[0],
- positionFeeFactorForPositiveImpact: dataStoreValues.positionFeeFactorForPositiveImpact.returnValues[0],
- positionFeeFactorForNegativeImpact: dataStoreValues.positionFeeFactorForNegativeImpact.returnValues[0],
+ positionFeeFactorForBalanceWasImproved:
+ dataStoreValues.positionFeeFactorForBalanceWasImproved.returnValues[0],
+ positionFeeFactorForBalanceWasNotImproved:
+ dataStoreValues.positionFeeFactorForBalanceWasNotImproved.returnValues[0],
positionImpactFactorPositive: dataStoreValues.positionImpactFactorPositive.returnValues[0],
positionImpactFactorNegative: dataStoreValues.positionImpactFactorNegative.returnValues[0],
maxPositionImpactFactorPositive: dataStoreValues.maxPositionImpactFactorPositive.returnValues[0],
@@ -328,8 +330,9 @@ function useMarketsConfigsRequest({
maxPositionImpactFactorForLiquidations:
dataStoreValues.maxPositionImpactFactorForLiquidations.returnValues[0],
positionImpactExponentFactor: dataStoreValues.positionImpactExponentFactor.returnValues[0],
- swapFeeFactorForPositiveImpact: dataStoreValues.swapFeeFactorForPositiveImpact.returnValues[0],
- swapFeeFactorForNegativeImpact: dataStoreValues.swapFeeFactorForNegativeImpact.returnValues[0],
+ swapFeeFactorForBalanceWasImproved: dataStoreValues.swapFeeFactorForBalanceWasImproved.returnValues[0],
+ swapFeeFactorForBalanceWasNotImproved:
+ dataStoreValues.swapFeeFactorForBalanceWasNotImproved.returnValues[0],
swapImpactFactorPositive: dataStoreValues.swapImpactFactorPositive.returnValues[0],
swapImpactFactorNegative: dataStoreValues.swapImpactFactorNegative.returnValues[0],
atomicSwapFeeFactor: dataStoreValues.atomicSwapFeeFactor.returnValues[0],
diff --git a/src/domain/synthetics/markets/useMarketsInfoRequest/useFastMarketsInfoRequest.ts b/src/domain/synthetics/markets/useMarketsInfoRequest/useFastMarketsInfoRequest.ts
index 736c03f849..cd26c75510 100644
--- a/src/domain/synthetics/markets/useMarketsInfoRequest/useFastMarketsInfoRequest.ts
+++ b/src/domain/synthetics/markets/useMarketsInfoRequest/useFastMarketsInfoRequest.ts
@@ -191,8 +191,8 @@ export function useFastMarketsInfoRequest(chainId: number) {
longInterestInTokens: BigInt(mInfo.longOpenInterestInTokens),
shortInterestInTokens: BigInt(mInfo.shortOpenInterestInTokens),
- positionFeeFactorForPositiveImpact: BigInt(mInfo.positionFeeFactorForPositiveImpact),
- positionFeeFactorForNegativeImpact: BigInt(mInfo.positionFeeFactorForNegativeImpact),
+ positionFeeFactorForBalanceWasImproved: BigInt(mInfo.positionFeeFactorForPositiveImpact),
+ positionFeeFactorForBalanceWasNotImproved: BigInt(mInfo.positionFeeFactorForNegativeImpact),
positionImpactFactorPositive: BigInt(mInfo.positionImpactFactorPositive),
positionImpactFactorNegative: BigInt(mInfo.positionImpactFactorNegative),
maxPositionImpactFactorPositive: BigInt(mInfo.maxPositionImpactFactorPositive),
@@ -200,8 +200,8 @@ export function useFastMarketsInfoRequest(chainId: number) {
maxPositionImpactFactorForLiquidations: BigInt(mInfo.maxPositionImpactFactorForLiquidations),
positionImpactExponentFactor: BigInt(mInfo.positionImpactExponentFactor),
- swapFeeFactorForPositiveImpact: BigInt(mInfo.swapFeeFactorForPositiveImpact),
- swapFeeFactorForNegativeImpact: BigInt(mInfo.swapFeeFactorForNegativeImpact),
+ swapFeeFactorForBalanceWasImproved: BigInt(mInfo.swapFeeFactorForPositiveImpact),
+ swapFeeFactorForBalanceWasNotImproved: BigInt(mInfo.swapFeeFactorForNegativeImpact),
swapImpactFactorPositive: BigInt(mInfo.swapImpactFactorPositive),
swapImpactFactorNegative: BigInt(mInfo.swapImpactFactorNegative),
swapImpactExponentFactor: BigInt(mInfo.swapImpactExponentFactor),
diff --git a/src/domain/synthetics/markets/utils.ts b/src/domain/synthetics/markets/utils.ts
index 2dd590090a..1f4ffc1099 100644
--- a/src/domain/synthetics/markets/utils.ts
+++ b/src/domain/synthetics/markets/utils.ts
@@ -195,7 +195,7 @@ export function getMinPriceImpactMarket(
const liquidity = getAvailableUsdLiquidityForPosition(marketInfo, isLong);
if (isMarketIndexToken(marketInfo, indexTokenAddress) && liquidity > sizeDeltaUsd) {
- const priceImpactDeltaUsd = getCappedPositionImpactUsd(marketInfo, sizeDeltaUsd, isLong, true, {
+ const { priceImpactDeltaUsd } = getCappedPositionImpactUsd(marketInfo, sizeDeltaUsd, isLong, true, {
shouldCapNegativeImpact: true,
});
diff --git a/src/domain/synthetics/positions/usePositionsInfo.ts b/src/domain/synthetics/positions/usePositionsInfo.ts
index 9f3daa84f8..e2e670ee87 100644
--- a/src/domain/synthetics/positions/usePositionsInfo.ts
+++ b/src/domain/synthetics/positions/usePositionsInfo.ts
@@ -6,7 +6,7 @@ import { getByKey } from "lib/objects";
import useWallet from "lib/wallets/useWallet";
import { ContractsChainId } from "sdk/configs/chains";
import { convertTokenAddress } from "sdk/configs/tokens";
-import { getEntryPrice, getPositionPnlUsd } from "sdk/utils/positions";
+import { getEntryPrice, getNetPriceImpactDeltaUsdForDecrease, getPositionPnlUsd } from "sdk/utils/positions";
import useUiFeeFactorRequest from "../fees/utils/useUiFeeFactor";
import {
@@ -17,7 +17,7 @@ import {
getMaxAllowedLeverageByMinCollateralFactor,
} from "../markets";
import { TokensData, convertToTokenAmount, convertToUsd } from "../tokens";
-import { getMarkPrice } from "../trade";
+import { getAcceptablePriceInfo, getMarkPrice } from "../trade";
import { PositionsData, PositionsInfoData } from "./types";
import { usePositionsConstantsRequest } from "./usePositionsConstants";
import { getLeverage, getLiquidationPrice, getPositionNetValue, getPositionPendingFeesUsd } from "./utils";
@@ -153,6 +153,27 @@ export function usePositionsInfoRequest(
const pnlPercentage =
collateralUsd !== undefined && collateralUsd != 0n ? getBasisPoints(pnl, collateralUsd) : 0n;
+ const closeAcceptablePriceInfo = marketInfo
+ ? getAcceptablePriceInfo({
+ marketInfo,
+ isIncrease: false,
+ isLong: position.isLong,
+ indexPrice: getMarkPrice({ prices: indexToken.prices, isLong: position.isLong, isIncrease: false }),
+ sizeDeltaUsd: position.sizeInUsd,
+ })
+ : undefined;
+
+ const netPriceImapctValues =
+ marketInfo && closeAcceptablePriceInfo
+ ? getNetPriceImpactDeltaUsdForDecrease({
+ marketInfo,
+ sizeInUsd: position.sizeInUsd,
+ pendingImpactAmount: position.pendingImpactAmount,
+ sizeDeltaUsd: position.sizeInUsd,
+ priceImpactDeltaUsd: closeAcceptablePriceInfo.priceImpactDeltaUsd,
+ })
+ : undefined;
+
const netValue = getPositionNetValue({
collateralUsd: collateralUsd,
pnl,
@@ -160,9 +181,18 @@ export function usePositionsInfoRequest(
pendingFundingFeesUsd: pendingFundingFeesUsd,
closingFeeUsd,
uiFeeUsd,
+ totalPendingImpactDeltaUsd: netPriceImapctValues?.totalImpactDeltaUsd ?? 0n,
+ priceImpactDiffUsd: netPriceImapctValues?.priceImpactDiffUsd ?? 0n,
});
- const pnlAfterFees = pnl - totalPendingFeesUsd - closingFeeUsd - uiFeeUsd;
+ const pnlAfterFees =
+ pnl -
+ totalPendingFeesUsd -
+ closingFeeUsd -
+ uiFeeUsd -
+ (netPriceImapctValues?.totalImpactDeltaUsd ?? 0n) +
+ (netPriceImapctValues?.priceImpactDiffUsd ?? 0n);
+
const pnlAfterFeesPercentage =
collateralUsd != 0n ? getBasisPoints(pnlAfterFees, collateralUsd + closingFeeUsd) : 0n;
@@ -193,6 +223,7 @@ export function usePositionsInfoRequest(
? getLiquidationPrice({
marketInfo,
collateralToken,
+ pendingImpactAmount: position.pendingImpactAmount,
sizeInUsd: position.sizeInUsd,
sizeInTokens: position.sizeInTokens,
collateralUsd,
@@ -233,6 +264,8 @@ export function usePositionsInfoRequest(
pnlAfterFees,
pnlAfterFeesPercentage,
netValue,
+ netPriceImapctDeltaUsd: netPriceImapctValues?.totalImpactDeltaUsd ?? 0n,
+ priceImpactDiffUsd: netPriceImapctValues?.priceImpactDiffUsd ?? 0n,
closingFeeUsd,
uiFeeUsd,
pendingFundingFeesUsd,
diff --git a/src/domain/synthetics/positions/utils.ts b/src/domain/synthetics/positions/utils.ts
index adec482bda..4311887047 100644
--- a/src/domain/synthetics/positions/utils.ts
+++ b/src/domain/synthetics/positions/utils.ts
@@ -2,7 +2,6 @@ import { t } from "@lingui/macro";
import { ethers } from "ethers";
import { BASIS_POINTS_DIVISOR_BIGINT } from "config/factors";
-import { UserReferralInfo } from "domain/referrals";
import {
MarketInfo,
getCappedPoolPnl,
@@ -13,20 +12,24 @@ import {
import { Token } from "domain/tokens";
import { CHART_PERIODS } from "lib/legacy";
import {
+ PRECISION,
applyFactor,
+ calculateDisplayDecimals,
expandDecimals,
formatAmount,
formatUsd,
- calculateDisplayDecimals,
- PRECISION,
formatUsdPrice,
} from "lib/numbers";
import { bigMath } from "sdk/utils/bigmath";
-import { getIsEquivalentTokens } from "sdk/utils/tokens";
-import { getBorrowingFeeRateUsd, getFundingFeeRateUsd, getPositionFee, getPriceImpactForPosition } from "../fees";
+import {
+ capPositionImpactUsdByMaxPriceImpactFactor,
+ getBorrowingFeeRateUsd,
+ getFundingFeeRateUsd,
+ getPriceImpactForPosition,
+} from "../fees";
import { OrderType } from "../orders/types";
-import { TokenData, convertToUsd } from "../tokens";
+import { convertToUsd } from "../tokens";
import { PositionInfo, PositionInfoLoaded } from "./types";
export * from "sdk/utils/positions";
@@ -43,21 +46,6 @@ export function getPositionPendingFeesUsd(p: { pendingFundingFeesUsd: bigint; pe
return pendingBorrowingFeesUsd + pendingFundingFeesUsd;
}
-export function getPositionNetValue(p: {
- collateralUsd: bigint;
- pendingFundingFeesUsd: bigint;
- pendingBorrowingFeesUsd: bigint;
- pnl: bigint;
- closingFeeUsd: bigint;
- uiFeeUsd: bigint;
-}) {
- const { pnl, closingFeeUsd, collateralUsd, uiFeeUsd } = p;
-
- const pendingFeesUsd = getPositionPendingFeesUsd(p);
-
- return collateralUsd - pendingFeesUsd - closingFeeUsd - uiFeeUsd + pnl;
-}
-
export function getPositionPnlUsd(p: {
marketInfo: MarketInfo;
sizeInUsd: bigint;
@@ -94,118 +82,6 @@ export function getPositionPnlUsd(p: {
return totalPnl;
}
-export function getLiquidationPrice(p: {
- sizeInUsd: bigint;
- sizeInTokens: bigint;
- collateralAmount: bigint;
- collateralUsd: bigint;
- collateralToken: TokenData;
- marketInfo: MarketInfo | undefined;
- pendingFundingFeesUsd: bigint;
- pendingBorrowingFeesUsd: bigint;
- minCollateralUsd: bigint;
- isLong: boolean;
- useMaxPriceImpact?: boolean;
- userReferralInfo: UserReferralInfo | undefined;
-}) {
- const {
- sizeInUsd,
- sizeInTokens,
- collateralUsd,
- collateralAmount,
- marketInfo,
- collateralToken,
- pendingFundingFeesUsd,
- pendingBorrowingFeesUsd,
- minCollateralUsd,
- isLong,
- userReferralInfo,
- useMaxPriceImpact,
- } = p;
-
- if (sizeInUsd <= 0 || sizeInTokens <= 0 || !marketInfo) {
- return undefined;
- }
-
- const { indexToken } = marketInfo;
-
- const closingFeeUsd = getPositionFee(marketInfo, sizeInUsd, false, userReferralInfo).positionFeeUsd;
- const totalPendingFeesUsd = getPositionPendingFeesUsd({ pendingFundingFeesUsd, pendingBorrowingFeesUsd });
- const totalFeesUsd = totalPendingFeesUsd + closingFeeUsd;
-
- const maxNegativePriceImpactUsd = -1n * applyFactor(sizeInUsd, marketInfo.maxPositionImpactFactorForLiquidations);
-
- let priceImpactDeltaUsd = 0n;
-
- if (useMaxPriceImpact) {
- priceImpactDeltaUsd = maxNegativePriceImpactUsd;
- } else {
- priceImpactDeltaUsd = getPriceImpactForPosition(marketInfo, -sizeInUsd, isLong, { fallbackToZero: true });
-
- if (priceImpactDeltaUsd < maxNegativePriceImpactUsd) {
- priceImpactDeltaUsd = maxNegativePriceImpactUsd;
- }
-
- // Ignore positive price impact
- if (priceImpactDeltaUsd > 0) {
- priceImpactDeltaUsd = 0n;
- }
- }
-
- let liquidationCollateralUsd = applyFactor(sizeInUsd, marketInfo.minCollateralFactor);
- if (liquidationCollateralUsd < minCollateralUsd) {
- liquidationCollateralUsd = minCollateralUsd;
- }
-
- let liquidationPrice: bigint;
-
- if (getIsEquivalentTokens(collateralToken, indexToken)) {
- if (isLong) {
- const denominator = sizeInTokens + collateralAmount;
-
- if (denominator == 0n) {
- return undefined;
- }
-
- liquidationPrice =
- ((sizeInUsd + liquidationCollateralUsd - priceImpactDeltaUsd + totalFeesUsd) / denominator) *
- expandDecimals(1, indexToken.decimals);
- } else {
- const denominator = sizeInTokens - collateralAmount;
-
- if (denominator == 0n) {
- return undefined;
- }
-
- liquidationPrice =
- ((sizeInUsd - liquidationCollateralUsd + priceImpactDeltaUsd - totalFeesUsd) / denominator) *
- expandDecimals(1, indexToken.decimals);
- }
- } else {
- if (sizeInTokens == 0n) {
- return undefined;
- }
-
- const remainingCollateralUsd = collateralUsd + priceImpactDeltaUsd - totalPendingFeesUsd - closingFeeUsd;
-
- if (isLong) {
- liquidationPrice =
- ((liquidationCollateralUsd - remainingCollateralUsd + sizeInUsd) / sizeInTokens) *
- expandDecimals(1, indexToken.decimals);
- } else {
- liquidationPrice =
- ((liquidationCollateralUsd - remainingCollateralUsd - sizeInUsd) / -sizeInTokens) *
- expandDecimals(1, indexToken.decimals);
- }
- }
-
- if (liquidationPrice <= 0) {
- return undefined;
- }
-
- return liquidationPrice;
-}
-
export function formatLiquidationPrice(
liquidationPrice?: bigint,
opts: { displayDecimals?: number; visualMultiplier?: number } = {}
@@ -273,19 +149,30 @@ export function getEstimatedLiquidationTimeInHours(
const borrowFeePerHour = getBorrowingFeeRateUsd(marketInfo, isLong, sizeInUsd, CHART_PERIODS["1h"]);
const fundingFeePerHour = getFundingFeeRateUsd(marketInfo, isLong, sizeInUsd, CHART_PERIODS["1h"]);
const maxNegativePriceImpactUsd = -1n * applyFactor(sizeInUsd, marketInfo.maxPositionImpactFactorForLiquidations);
- let priceImpactDeltaUsd = getPriceImpactForPosition(marketInfo, -sizeInUsd, isLong, {
+ let { priceImpactDeltaUsd } = getPriceImpactForPosition(marketInfo, -sizeInUsd, isLong, {
fallbackToZero: true,
});
- if (priceImpactDeltaUsd < maxNegativePriceImpactUsd) {
- priceImpactDeltaUsd = maxNegativePriceImpactUsd;
+ if (priceImpactDeltaUsd > 0) {
+ priceImpactDeltaUsd = capPositionImpactUsdByMaxPriceImpactFactor(marketInfo, priceImpactDeltaUsd);
}
- // Ignore positive price impact
+ const pendingImpactUsd = convertToUsd(
+ position.pendingImpactAmount,
+ marketInfo.indexToken.decimals,
+ position.pendingImpactAmount > 0 ? marketInfo.indexToken.prices.minPrice : marketInfo.indexToken.prices.maxPrice
+ )!;
+
+ priceImpactDeltaUsd = priceImpactDeltaUsd + pendingImpactUsd;
+
if (priceImpactDeltaUsd > 0) {
priceImpactDeltaUsd = 0n;
+ } else if (priceImpactDeltaUsd < maxNegativePriceImpactUsd) {
+ priceImpactDeltaUsd = maxNegativePriceImpactUsd;
}
+ // Ignore positive price impact
+
const totalFeesPerHour =
bigMath.abs(borrowFeePerHour) + (fundingFeePerHour < 0 ? bigMath.abs(fundingFeePerHour) : 0n);
diff --git a/src/domain/synthetics/testUtils/mocks.ts b/src/domain/synthetics/testUtils/mocks.ts
index 0faa628704..f2cac133ae 100644
--- a/src/domain/synthetics/testUtils/mocks.ts
+++ b/src/domain/synthetics/testUtils/mocks.ts
@@ -90,6 +90,8 @@ export function mockPositionInfo(
pnlPercentage: 0n,
pnlAfterFees: 0n,
pnlAfterFeesPercentage: 0n,
+ netPriceImapctDeltaUsd: 0n,
+ priceImpactDiffUsd: 0n,
netValue: 0n,
closingFeeUsd: 0n,
uiFeeUsd: 0n,
diff --git a/src/domain/synthetics/trade/utils/decrease.spec.ts b/src/domain/synthetics/trade/utils/decrease.spec.ts
index 963f377c2c..e2df0c95be 100644
--- a/src/domain/synthetics/trade/utils/decrease.spec.ts
+++ b/src/domain/synthetics/trade/utils/decrease.spec.ts
@@ -104,16 +104,16 @@ const marketInfo: MarketInfo = {
minCollateralFactorForOpenInterestShort: BigInt("0x0ad78ebc5ac6200000"),
claimableFundingAmountLong: BigInt("0x1cefb332ff83"),
claimableFundingAmountShort: BigInt("0x05b1ee"),
- positionFeeFactorForPositiveImpact: BigInt("0x019d971e4fe8401e74000000"),
- positionFeeFactorForNegativeImpact: BigInt("0x024306c4097859c43c000000"),
+ positionFeeFactorForBalanceWasImproved: BigInt("0x019d971e4fe8401e74000000"),
+ positionFeeFactorForBalanceWasNotImproved: BigInt("0x024306c4097859c43c000000"),
positionImpactFactorPositive: BigInt("0x04e1003b28d9280000"),
positionImpactFactorNegative: BigInt("0x0821ab0d4414980000"),
maxPositionImpactFactorPositive: BigInt("0x1027e72f1f12813088000000"),
maxPositionImpactFactorNegative: BigInt("0x1027e72f1f12813088000000"),
maxPositionImpactFactorForLiquidations: BigInt("0x00"),
positionImpactExponentFactor: BigInt("0x193e5939a08ce9dbd480000000"),
- swapFeeFactorForPositiveImpact: BigInt("0x019d971e4fe8401e74000000"),
- swapFeeFactorForNegativeImpact: BigInt("0x024306c4097859c43c000000"),
+ swapFeeFactorForBalanceWasImproved: BigInt("0x019d971e4fe8401e74000000"),
+ swapFeeFactorForBalanceWasNotImproved: BigInt("0x024306c4097859c43c000000"),
swapImpactFactorPositive: BigInt("0x0ad78ebc5ac6200000"),
swapImpactFactorNegative: BigInt("0x0ad78ebc5ac6200000"),
swapImpactExponentFactor: BigInt("0x193e5939a08ce9dbd480000000"),
@@ -177,6 +177,8 @@ const position: PositionInfoLoaded = {
positionFeeAmount: 0n,
traderDiscountAmount: 0n,
uiFeeAmount: 0n,
+ netPriceImapctDeltaUsd: 0n,
+ priceImpactDiffUsd: 0n,
};
const keepLeverage = false;
diff --git a/src/domain/synthetics/trade/utils/decrease.ts b/src/domain/synthetics/trade/utils/decrease.ts
index 77a9987f1c..a3980464a3 100644
--- a/src/domain/synthetics/trade/utils/decrease.ts
+++ b/src/domain/synthetics/trade/utils/decrease.ts
@@ -2,13 +2,7 @@ import { ethers } from "ethers";
import { BASIS_POINTS_DIVISOR_BIGINT, DEFAULT_ACCEPTABLE_PRICE_IMPACT_BUFFER } from "config/factors";
import { UserReferralInfo } from "domain/referrals";
-import {
- capPositionImpactUsdByMaxImpactPool,
- capPositionImpactUsdByMaxPriceImpactFactor,
- getMaxPositionImpactFactors,
- getPositionFee,
- getProportionalPendingImpactValues,
-} from "domain/synthetics/fees";
+import { getPositionFee } from "domain/synthetics/fees";
import { MarketInfo } from "domain/synthetics/markets";
import { DecreasePositionSwapType, OrderType } from "domain/synthetics/orders";
import {
@@ -24,6 +18,7 @@ import { DUST_USD } from "lib/legacy";
import { applyFactor, getBasisPoints, roundUpDivision } from "lib/numbers";
import { DecreasePositionAmounts, NextPositionValues } from "sdk/types/trade";
import { bigMath } from "sdk/utils/bigmath";
+import { getNetPriceImpactDeltaUsdForDecrease } from "sdk/utils/positions";
import { getSwapStats } from "sdk/utils/swap/swapStats";
import { getIsEquivalentTokens } from "sdk/utils/tokens";
@@ -382,54 +377,6 @@ export function getDecreasePositionAmounts(p: {
return values;
}
-function getTotalImpactDeltaUsd({
- marketInfo,
- sizeInUsd,
- pendingImpactAmount,
- sizeDeltaUsd,
- priceImpactDeltaUsd,
-}: {
- marketInfo: MarketInfo;
- sizeInUsd: bigint;
- pendingImpactAmount: bigint;
- sizeDeltaUsd: bigint;
- priceImpactDeltaUsd: bigint;
-}) {
- const { proportionalPendingImpactDeltaUsd } = getProportionalPendingImpactValues({
- sizeInUsd,
- pendingImpactAmount,
- sizeDeltaUsd,
- indexToken: marketInfo.indexToken,
- });
-
- let totalImpactDeltaUsd = priceImpactDeltaUsd + proportionalPendingImpactDeltaUsd;
- let priceImpactDiffUsd = 0n;
-
- if (totalImpactDeltaUsd < 0) {
- const { maxNegativeImpactFactor } = getMaxPositionImpactFactors(marketInfo);
- const maxPriceImpactFactor = applyFactor(sizeDeltaUsd, maxNegativeImpactFactor);
-
- const minPriceImpactUsd = -applyFactor(sizeDeltaUsd, maxPriceImpactFactor);
-
- if (totalImpactDeltaUsd < minPriceImpactUsd) {
- priceImpactDiffUsd = minPriceImpactUsd - totalImpactDeltaUsd;
- totalImpactDeltaUsd = minPriceImpactUsd;
- }
- }
-
- if (totalImpactDeltaUsd > 0) {
- totalImpactDeltaUsd = capPositionImpactUsdByMaxPriceImpactFactor(marketInfo, totalImpactDeltaUsd);
- }
-
- totalImpactDeltaUsd = capPositionImpactUsdByMaxImpactPool(marketInfo, totalImpactDeltaUsd);
-
- return {
- totalImpactDeltaUsd,
- proportionalPendingImpactDeltaUsd,
- priceImpactDiffUsd,
- };
-}
-
export function getIsFullClose(p: {
position: PositionInfoLoaded;
sizeDeltaUsd: bigint;
@@ -572,7 +519,7 @@ function applyAcceptablePrice(p: {
values.acceptablePrice = acceptablePriceInfo.acceptablePrice;
values.acceptablePriceDeltaBps = acceptablePriceInfo.acceptablePriceDeltaBps;
- const totalImpactValues = getTotalImpactDeltaUsd({
+ const totalImpactValues = getNetPriceImpactDeltaUsdForDecrease({
marketInfo,
sizeInUsd: position?.sizeInUsd ?? 0n,
pendingImpactAmount: position?.pendingImpactAmount ?? 0n,
@@ -708,6 +655,7 @@ export function getNextPositionValuesForDecreaseTrade(p: {
collateralAmount: nextCollateralAmount,
minCollateralUsd,
userReferralInfo,
+ pendingImpactAmount: existingPosition?.pendingImpactAmount ?? 0n,
pendingBorrowingFeesUsd: 0n, // deducted on order
pendingFundingFeesUsd: 0n, // deducted on order
isLong: isLong,
diff --git a/src/domain/synthetics/trade/utils/deposit.ts b/src/domain/synthetics/trade/utils/deposit.ts
index 5b2c82a831..f18bd272da 100644
--- a/src/domain/synthetics/trade/utils/deposit.ts
+++ b/src/domain/synthetics/trade/utils/deposit.ts
@@ -86,7 +86,7 @@ export function getDepositAmounts(p: {
return values;
}
- values.swapPriceImpactDeltaUsd = getPriceImpactForSwap(
+ const priceImpactValues = getPriceImpactForSwap(
marketInfo,
longToken,
shortToken,
@@ -94,12 +94,14 @@ export function getDepositAmounts(p: {
values.shortTokenUsd
);
+ values.swapPriceImpactDeltaUsd = priceImpactValues.priceImpactDeltaUsd;
+
const totalDepositUsd = values.longTokenUsd + values.shortTokenUsd;
if (values.longTokenUsd > 0) {
const swapFeeUsd = p.forShift
? 0n
- : getSwapFee(marketInfo, values.longTokenUsd, values.swapPriceImpactDeltaUsd > 0, false);
+ : getSwapFee(marketInfo, values.longTokenUsd, priceImpactValues.balanceWasImproved, false);
values.swapFeeUsd = values.swapFeeUsd + swapFeeUsd;
const uiFeeUsd = applyFactor(values.longTokenUsd, uiFeeFactor);
@@ -120,7 +122,7 @@ export function getDepositAmounts(p: {
if (values.shortTokenUsd > 0) {
const swapFeeUsd = p.forShift
? 0n
- : getSwapFee(marketInfo, values.shortTokenUsd, values.swapPriceImpactDeltaUsd > 0, false);
+ : getSwapFee(marketInfo, values.shortTokenUsd, priceImpactValues.balanceWasImproved, false);
values.swapFeeUsd = values.swapFeeUsd + swapFeeUsd;
const uiFeeUsd = applyFactor(values.shortTokenUsd, uiFeeFactor);
@@ -196,7 +198,7 @@ export function getDepositAmounts(p: {
values.shortTokenUsd = values.marketTokenUsd;
}
- values.swapPriceImpactDeltaUsd = getPriceImpactForSwap(
+ const priceImpactValues = getPriceImpactForSwap(
marketInfo,
longToken,
shortToken,
@@ -205,7 +207,7 @@ export function getDepositAmounts(p: {
);
if (!p.forShift) {
- const swapFeeUsd = getSwapFee(marketInfo, values.marketTokenUsd, values.swapPriceImpactDeltaUsd > 0, false);
+ const swapFeeUsd = getSwapFee(marketInfo, values.marketTokenUsd, priceImpactValues.balanceWasImproved, false);
values.swapFeeUsd = values.swapFeeUsd + swapFeeUsd;
}
diff --git a/src/domain/synthetics/trade/utils/increase.ts b/src/domain/synthetics/trade/utils/increase.ts
index 5d355ed45a..6536fbf7e7 100644
--- a/src/domain/synthetics/trade/utils/increase.ts
+++ b/src/domain/synthetics/trade/utils/increase.ts
@@ -10,7 +10,7 @@ import {
import { TokenData } from "domain/synthetics/tokens";
import { NextPositionValues } from "sdk/types/trade";
-export * from "sdk/utils/trade/amounts";
+export * from "sdk/utils/trade/increase";
export function getNextPositionValuesForIncreaseTrade(p: {
existingPosition?: PositionInfo;
@@ -85,6 +85,7 @@ export function getNextPositionValuesForIncreaseTrade(p: {
minCollateralUsd,
pendingBorrowingFeesUsd: 0n, // deducted on order
pendingFundingFeesUsd: 0n, // deducted on order
+ pendingImpactAmount: existingPosition?.pendingImpactAmount ?? 0n,
isLong: isLong,
userReferralInfo,
});
diff --git a/src/domain/synthetics/trade/utils/withdrawal.ts b/src/domain/synthetics/trade/utils/withdrawal.ts
index fba35e6d92..02db0ff34b 100644
--- a/src/domain/synthetics/trade/utils/withdrawal.ts
+++ b/src/domain/synthetics/trade/utils/withdrawal.ts
@@ -78,10 +78,10 @@ export function getWithdrawalAmounts(p: {
const longSwapFeeUsd = p.forShift
? 0n
- : applyFactor(values.longTokenUsd, p.marketInfo.swapFeeFactorForNegativeImpact);
+ : applyFactor(values.longTokenUsd, p.marketInfo.swapFeeFactorForBalanceWasNotImproved);
const shortSwapFeeUsd = p.forShift
? 0n
- : applyFactor(values.shortTokenUsd, p.marketInfo.swapFeeFactorForNegativeImpact);
+ : applyFactor(values.shortTokenUsd, p.marketInfo.swapFeeFactorForBalanceWasNotImproved);
const longUiFeeUsd = applyFactor(values.marketTokenUsd, uiFeeFactor);
const shortUiFeeUsd = applyFactor(values.shortTokenUsd, uiFeeFactor);
@@ -131,7 +131,7 @@ export function getWithdrawalAmounts(p: {
if (!p.forShift) {
values.swapFeeUsd = applyFactor(
values.longTokenUsd + values.shortTokenUsd,
- p.marketInfo.swapFeeFactorForNegativeImpact
+ p.marketInfo.swapFeeFactorForBalanceWasNotImproved
);
}
diff --git a/src/locales/de/messages.po b/src/locales/de/messages.po
index b7e093e7ca..b826902211 100644
--- a/src/locales/de/messages.po
+++ b/src/locales/de/messages.po
@@ -311,8 +311,8 @@ msgid "TWAP Number of Parts"
msgstr ""
#: src/components/Synthetics/PositionItem/PositionItem.tsx
-msgid "Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee - UI Fee"
-msgstr ""
+#~ msgid "Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee - UI Fee"
+#~ msgstr ""
#: src/components/Exchange/ConfirmationBox.jsx
msgid "The spread is > 1%, please ensure the trade details are acceptable before confirming"
@@ -1911,6 +1911,10 @@ msgstr "Die Adresse des esGMX (IOU)-Tokens lautet {esGmxIouAddress}"
msgid "GMX Alerts"
msgstr ""
+#: src/components/Synthetics/PositionItem/PositionItem.tsx
+msgid "Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee - Net Price Impact + Price Impact Rebates"
+msgstr ""
+
#: src/components/Synthetics/Claims/SettleAccruedCard.tsx
msgid "Show details"
msgstr ""
@@ -3056,6 +3060,10 @@ msgstr ""
msgid "Order creation failed."
msgstr ""
+#: src/components/Synthetics/PositionItem/PositionItem.tsx
+msgid "Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee - UI Fee - Net Price Impact + Price Impact Rebates"
+msgstr ""
+
#: src/components/Synthetics/MissedCoinsHint/MissedCoinsHint.tsx
msgid "Can’t find the coin you need? Let us know"
msgstr ""
@@ -4532,6 +4540,7 @@ msgstr "Transfer bereits begonnen"
msgid "Withdraw submitted."
msgstr ""
+#: src/components/Synthetics/PositionItem/PositionItem.tsx
#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
msgid "Net Price Impact"
msgstr ""
@@ -8016,6 +8025,7 @@ msgstr "Fehler bei der Bilderzeugung, bitte aktualisieren und versuche es erneut
#: src/components/Synthetics/Claims/ClaimableCardUI.tsx
#: src/components/Synthetics/ExecutionPriceRow.tsx
+#: src/components/Synthetics/PositionItem/PositionItem.tsx
#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
msgid "Price Impact Rebates"
msgstr ""
@@ -8448,8 +8458,8 @@ msgid "Total Users"
msgstr "User insgesamt"
#: src/components/Synthetics/PositionItem/PositionItem.tsx
-msgid "Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee"
-msgstr ""
+#~ msgid "Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee"
+#~ msgstr ""
#: src/domain/synthetics/sidecarOrders/utils.ts
msgid "Trigger price below lowest limit price"
diff --git a/src/locales/en/messages.po b/src/locales/en/messages.po
index 46e52e7e81..ff7738ae04 100644
--- a/src/locales/en/messages.po
+++ b/src/locales/en/messages.po
@@ -311,8 +311,8 @@ msgid "TWAP Number of Parts"
msgstr "TWAP Number of Parts"
#: src/components/Synthetics/PositionItem/PositionItem.tsx
-msgid "Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee - UI Fee"
-msgstr "Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee - UI Fee"
+#~ msgid "Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee - UI Fee"
+#~ msgstr "Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee - UI Fee"
#: src/components/Exchange/ConfirmationBox.jsx
msgid "The spread is > 1%, please ensure the trade details are acceptable before confirming"
@@ -1911,6 +1911,10 @@ msgstr "The address of the esGMX (IOU) token is {esGmxIouAddress}."
msgid "GMX Alerts"
msgstr "GMX Alerts"
+#: src/components/Synthetics/PositionItem/PositionItem.tsx
+msgid "Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee - Net Price Impact + Price Impact Rebates"
+msgstr "Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee - Net Price Impact + Price Impact Rebates"
+
#: src/components/Synthetics/Claims/SettleAccruedCard.tsx
msgid "Show details"
msgstr "Show details"
@@ -3056,6 +3060,10 @@ msgstr "Staked on Arbitrum"
msgid "Order creation failed."
msgstr "Order creation failed."
+#: src/components/Synthetics/PositionItem/PositionItem.tsx
+msgid "Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee - UI Fee - Net Price Impact + Price Impact Rebates"
+msgstr "Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee - UI Fee - Net Price Impact + Price Impact Rebates"
+
#: src/components/Synthetics/MissedCoinsHint/MissedCoinsHint.tsx
msgid "Can’t find the coin you need? Let us know"
msgstr "Can’t find the coin you need? Let us know"
@@ -4535,6 +4543,7 @@ msgstr "Transfer already initiated"
msgid "Withdraw submitted."
msgstr "Withdraw submitted."
+#: src/components/Synthetics/PositionItem/PositionItem.tsx
#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
msgid "Net Price Impact"
msgstr "Net Price Impact"
@@ -8022,6 +8031,7 @@ msgstr "Image generation error, please refresh and try again."
#: src/components/Synthetics/Claims/ClaimableCardUI.tsx
#: src/components/Synthetics/ExecutionPriceRow.tsx
+#: src/components/Synthetics/PositionItem/PositionItem.tsx
#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
msgid "Price Impact Rebates"
msgstr "Price Impact Rebates"
@@ -8454,8 +8464,8 @@ msgid "Total Users"
msgstr "Total Users"
#: src/components/Synthetics/PositionItem/PositionItem.tsx
-msgid "Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee"
-msgstr "Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee"
+#~ msgid "Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee"
+#~ msgstr "Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee"
#: src/domain/synthetics/sidecarOrders/utils.ts
msgid "Trigger price below lowest limit price"
diff --git a/src/locales/es/messages.po b/src/locales/es/messages.po
index f6186fcb5f..2781f03c4b 100644
--- a/src/locales/es/messages.po
+++ b/src/locales/es/messages.po
@@ -311,8 +311,8 @@ msgid "TWAP Number of Parts"
msgstr ""
#: src/components/Synthetics/PositionItem/PositionItem.tsx
-msgid "Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee - UI Fee"
-msgstr ""
+#~ msgid "Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee - UI Fee"
+#~ msgstr ""
#: src/components/Exchange/ConfirmationBox.jsx
msgid "The spread is > 1%, please ensure the trade details are acceptable before confirming"
@@ -1911,6 +1911,10 @@ msgstr "La dirección del token esGMX (IOU) es {esGmxIouAddress}."
msgid "GMX Alerts"
msgstr ""
+#: src/components/Synthetics/PositionItem/PositionItem.tsx
+msgid "Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee - Net Price Impact + Price Impact Rebates"
+msgstr ""
+
#: src/components/Synthetics/Claims/SettleAccruedCard.tsx
msgid "Show details"
msgstr ""
@@ -3056,6 +3060,10 @@ msgstr ""
msgid "Order creation failed."
msgstr ""
+#: src/components/Synthetics/PositionItem/PositionItem.tsx
+msgid "Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee - UI Fee - Net Price Impact + Price Impact Rebates"
+msgstr ""
+
#: src/components/Synthetics/MissedCoinsHint/MissedCoinsHint.tsx
msgid "Can’t find the coin you need? Let us know"
msgstr ""
@@ -4532,6 +4540,7 @@ msgstr "Transferencia ya iniciada"
msgid "Withdraw submitted."
msgstr ""
+#: src/components/Synthetics/PositionItem/PositionItem.tsx
#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
msgid "Net Price Impact"
msgstr ""
@@ -8016,6 +8025,7 @@ msgstr "Error de generación de imagen, por favor actualice e intente de nuevo"
#: src/components/Synthetics/Claims/ClaimableCardUI.tsx
#: src/components/Synthetics/ExecutionPriceRow.tsx
+#: src/components/Synthetics/PositionItem/PositionItem.tsx
#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
msgid "Price Impact Rebates"
msgstr ""
@@ -8448,8 +8458,8 @@ msgid "Total Users"
msgstr "Usuarios Totales"
#: src/components/Synthetics/PositionItem/PositionItem.tsx
-msgid "Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee"
-msgstr ""
+#~ msgid "Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee"
+#~ msgstr ""
#: src/domain/synthetics/sidecarOrders/utils.ts
msgid "Trigger price below lowest limit price"
diff --git a/src/locales/fr/messages.po b/src/locales/fr/messages.po
index 12a7d9c0f3..4da01944ca 100644
--- a/src/locales/fr/messages.po
+++ b/src/locales/fr/messages.po
@@ -311,8 +311,8 @@ msgid "TWAP Number of Parts"
msgstr ""
#: src/components/Synthetics/PositionItem/PositionItem.tsx
-msgid "Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee - UI Fee"
-msgstr ""
+#~ msgid "Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee - UI Fee"
+#~ msgstr ""
#: src/components/Exchange/ConfirmationBox.jsx
msgid "The spread is > 1%, please ensure the trade details are acceptable before confirming"
@@ -1911,6 +1911,10 @@ msgstr "L'adresse du token esGMX (IOU - reconnaissance de dette) est {esGmxIouAd
msgid "GMX Alerts"
msgstr ""
+#: src/components/Synthetics/PositionItem/PositionItem.tsx
+msgid "Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee - Net Price Impact + Price Impact Rebates"
+msgstr ""
+
#: src/components/Synthetics/Claims/SettleAccruedCard.tsx
msgid "Show details"
msgstr ""
@@ -3056,6 +3060,10 @@ msgstr ""
msgid "Order creation failed."
msgstr ""
+#: src/components/Synthetics/PositionItem/PositionItem.tsx
+msgid "Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee - UI Fee - Net Price Impact + Price Impact Rebates"
+msgstr ""
+
#: src/components/Synthetics/MissedCoinsHint/MissedCoinsHint.tsx
msgid "Can’t find the coin you need? Let us know"
msgstr ""
@@ -4532,6 +4540,7 @@ msgstr "Transfert déjà initié"
msgid "Withdraw submitted."
msgstr ""
+#: src/components/Synthetics/PositionItem/PositionItem.tsx
#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
msgid "Net Price Impact"
msgstr ""
@@ -8016,6 +8025,7 @@ msgstr "Erreur de génération d'image, veuillez rafraîchir et réessayer."
#: src/components/Synthetics/Claims/ClaimableCardUI.tsx
#: src/components/Synthetics/ExecutionPriceRow.tsx
+#: src/components/Synthetics/PositionItem/PositionItem.tsx
#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
msgid "Price Impact Rebates"
msgstr ""
@@ -8448,8 +8458,8 @@ msgid "Total Users"
msgstr "Nombre total d'utilisateurs"
#: src/components/Synthetics/PositionItem/PositionItem.tsx
-msgid "Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee"
-msgstr ""
+#~ msgid "Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee"
+#~ msgstr ""
#: src/domain/synthetics/sidecarOrders/utils.ts
msgid "Trigger price below lowest limit price"
diff --git a/src/locales/ja/messages.po b/src/locales/ja/messages.po
index 0c6bb3488c..c86ff63c50 100644
--- a/src/locales/ja/messages.po
+++ b/src/locales/ja/messages.po
@@ -311,8 +311,8 @@ msgid "TWAP Number of Parts"
msgstr ""
#: src/components/Synthetics/PositionItem/PositionItem.tsx
-msgid "Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee - UI Fee"
-msgstr ""
+#~ msgid "Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee - UI Fee"
+#~ msgstr ""
#: src/components/Exchange/ConfirmationBox.jsx
msgid "The spread is > 1%, please ensure the trade details are acceptable before confirming"
@@ -1911,6 +1911,10 @@ msgstr "esGMX (IOU)トークンのアドレスは{esGmxIouAddress}です。"
msgid "GMX Alerts"
msgstr ""
+#: src/components/Synthetics/PositionItem/PositionItem.tsx
+msgid "Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee - Net Price Impact + Price Impact Rebates"
+msgstr ""
+
#: src/components/Synthetics/Claims/SettleAccruedCard.tsx
msgid "Show details"
msgstr ""
@@ -3056,6 +3060,10 @@ msgstr ""
msgid "Order creation failed."
msgstr ""
+#: src/components/Synthetics/PositionItem/PositionItem.tsx
+msgid "Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee - UI Fee - Net Price Impact + Price Impact Rebates"
+msgstr ""
+
#: src/components/Synthetics/MissedCoinsHint/MissedCoinsHint.tsx
msgid "Can’t find the coin you need? Let us know"
msgstr ""
@@ -4532,6 +4540,7 @@ msgstr "移転はすでに開始されています"
msgid "Withdraw submitted."
msgstr ""
+#: src/components/Synthetics/PositionItem/PositionItem.tsx
#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
msgid "Net Price Impact"
msgstr ""
@@ -8016,6 +8025,7 @@ msgstr "画像生成エラーにつき、ページを更新して再度試して
#: src/components/Synthetics/Claims/ClaimableCardUI.tsx
#: src/components/Synthetics/ExecutionPriceRow.tsx
+#: src/components/Synthetics/PositionItem/PositionItem.tsx
#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
msgid "Price Impact Rebates"
msgstr ""
@@ -8448,8 +8458,8 @@ msgid "Total Users"
msgstr "ユーザー総数"
#: src/components/Synthetics/PositionItem/PositionItem.tsx
-msgid "Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee"
-msgstr ""
+#~ msgid "Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee"
+#~ msgstr ""
#: src/domain/synthetics/sidecarOrders/utils.ts
msgid "Trigger price below lowest limit price"
diff --git a/src/locales/ko/messages.po b/src/locales/ko/messages.po
index d1c155f8df..6e28617960 100644
--- a/src/locales/ko/messages.po
+++ b/src/locales/ko/messages.po
@@ -311,8 +311,8 @@ msgid "TWAP Number of Parts"
msgstr ""
#: src/components/Synthetics/PositionItem/PositionItem.tsx
-msgid "Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee - UI Fee"
-msgstr ""
+#~ msgid "Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee - UI Fee"
+#~ msgstr ""
#: src/components/Exchange/ConfirmationBox.jsx
msgid "The spread is > 1%, please ensure the trade details are acceptable before confirming"
@@ -1911,6 +1911,10 @@ msgstr "esGMX (IOU) 토큰의 주소는 {esGmxIouAddress}입니다."
msgid "GMX Alerts"
msgstr ""
+#: src/components/Synthetics/PositionItem/PositionItem.tsx
+msgid "Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee - Net Price Impact + Price Impact Rebates"
+msgstr ""
+
#: src/components/Synthetics/Claims/SettleAccruedCard.tsx
msgid "Show details"
msgstr ""
@@ -3056,6 +3060,10 @@ msgstr ""
msgid "Order creation failed."
msgstr ""
+#: src/components/Synthetics/PositionItem/PositionItem.tsx
+msgid "Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee - UI Fee - Net Price Impact + Price Impact Rebates"
+msgstr ""
+
#: src/components/Synthetics/MissedCoinsHint/MissedCoinsHint.tsx
msgid "Can’t find the coin you need? Let us know"
msgstr ""
@@ -4532,6 +4540,7 @@ msgstr "이전이 이미 시작됐습니다"
msgid "Withdraw submitted."
msgstr ""
+#: src/components/Synthetics/PositionItem/PositionItem.tsx
#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
msgid "Net Price Impact"
msgstr ""
@@ -8016,6 +8025,7 @@ msgstr "이미지 생성 에러. 새로고침 후 다시 시도해주세요."
#: src/components/Synthetics/Claims/ClaimableCardUI.tsx
#: src/components/Synthetics/ExecutionPriceRow.tsx
+#: src/components/Synthetics/PositionItem/PositionItem.tsx
#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
msgid "Price Impact Rebates"
msgstr ""
@@ -8448,8 +8458,8 @@ msgid "Total Users"
msgstr "총 유저"
#: src/components/Synthetics/PositionItem/PositionItem.tsx
-msgid "Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee"
-msgstr ""
+#~ msgid "Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee"
+#~ msgstr ""
#: src/domain/synthetics/sidecarOrders/utils.ts
msgid "Trigger price below lowest limit price"
diff --git a/src/locales/pseudo/messages.po b/src/locales/pseudo/messages.po
index 8589a11862..53571999a7 100644
--- a/src/locales/pseudo/messages.po
+++ b/src/locales/pseudo/messages.po
@@ -311,8 +311,8 @@ msgid "TWAP Number of Parts"
msgstr ""
#: src/components/Synthetics/PositionItem/PositionItem.tsx
-msgid "Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee - UI Fee"
-msgstr ""
+#~ msgid "Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee - UI Fee"
+#~ msgstr ""
#: src/components/Exchange/ConfirmationBox.jsx
msgid "The spread is > 1%, please ensure the trade details are acceptable before confirming"
@@ -1911,6 +1911,10 @@ msgstr ""
msgid "GMX Alerts"
msgstr ""
+#: src/components/Synthetics/PositionItem/PositionItem.tsx
+msgid "Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee - Net Price Impact + Price Impact Rebates"
+msgstr ""
+
#: src/components/Synthetics/Claims/SettleAccruedCard.tsx
msgid "Show details"
msgstr ""
@@ -3056,6 +3060,10 @@ msgstr ""
msgid "Order creation failed."
msgstr ""
+#: src/components/Synthetics/PositionItem/PositionItem.tsx
+msgid "Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee - UI Fee - Net Price Impact + Price Impact Rebates"
+msgstr ""
+
#: src/components/Synthetics/MissedCoinsHint/MissedCoinsHint.tsx
msgid "Can’t find the coin you need? Let us know"
msgstr ""
@@ -4532,6 +4540,7 @@ msgstr ""
msgid "Withdraw submitted."
msgstr ""
+#: src/components/Synthetics/PositionItem/PositionItem.tsx
#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
msgid "Net Price Impact"
msgstr ""
@@ -8016,6 +8025,7 @@ msgstr ""
#: src/components/Synthetics/Claims/ClaimableCardUI.tsx
#: src/components/Synthetics/ExecutionPriceRow.tsx
+#: src/components/Synthetics/PositionItem/PositionItem.tsx
#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
msgid "Price Impact Rebates"
msgstr ""
@@ -8448,8 +8458,8 @@ msgid "Total Users"
msgstr ""
#: src/components/Synthetics/PositionItem/PositionItem.tsx
-msgid "Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee"
-msgstr ""
+#~ msgid "Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee"
+#~ msgstr ""
#: src/domain/synthetics/sidecarOrders/utils.ts
msgid "Trigger price below lowest limit price"
diff --git a/src/locales/ru/messages.po b/src/locales/ru/messages.po
index a197e88484..b32453b720 100644
--- a/src/locales/ru/messages.po
+++ b/src/locales/ru/messages.po
@@ -311,8 +311,8 @@ msgid "TWAP Number of Parts"
msgstr ""
#: src/components/Synthetics/PositionItem/PositionItem.tsx
-msgid "Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee - UI Fee"
-msgstr ""
+#~ msgid "Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee - UI Fee"
+#~ msgstr ""
#: src/components/Exchange/ConfirmationBox.jsx
msgid "The spread is > 1%, please ensure the trade details are acceptable before confirming"
@@ -1911,6 +1911,10 @@ msgstr "Адрес токена esGMX называется {esGmxIouAddress}."
msgid "GMX Alerts"
msgstr ""
+#: src/components/Synthetics/PositionItem/PositionItem.tsx
+msgid "Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee - Net Price Impact + Price Impact Rebates"
+msgstr ""
+
#: src/components/Synthetics/Claims/SettleAccruedCard.tsx
msgid "Show details"
msgstr ""
@@ -3056,6 +3060,10 @@ msgstr ""
msgid "Order creation failed."
msgstr ""
+#: src/components/Synthetics/PositionItem/PositionItem.tsx
+msgid "Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee - UI Fee - Net Price Impact + Price Impact Rebates"
+msgstr ""
+
#: src/components/Synthetics/MissedCoinsHint/MissedCoinsHint.tsx
msgid "Can’t find the coin you need? Let us know"
msgstr ""
@@ -4532,6 +4540,7 @@ msgstr "Перевод уже начат"
msgid "Withdraw submitted."
msgstr ""
+#: src/components/Synthetics/PositionItem/PositionItem.tsx
#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
msgid "Net Price Impact"
msgstr ""
@@ -8016,6 +8025,7 @@ msgstr "Ошибка генерации изображения, пожалуйс
#: src/components/Synthetics/Claims/ClaimableCardUI.tsx
#: src/components/Synthetics/ExecutionPriceRow.tsx
+#: src/components/Synthetics/PositionItem/PositionItem.tsx
#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
msgid "Price Impact Rebates"
msgstr ""
@@ -8448,8 +8458,8 @@ msgid "Total Users"
msgstr "Всего Пользователей"
#: src/components/Synthetics/PositionItem/PositionItem.tsx
-msgid "Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee"
-msgstr ""
+#~ msgid "Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee"
+#~ msgstr ""
#: src/domain/synthetics/sidecarOrders/utils.ts
msgid "Trigger price below lowest limit price"
diff --git a/src/locales/zh/messages.po b/src/locales/zh/messages.po
index b20cd48e84..1999df19e2 100644
--- a/src/locales/zh/messages.po
+++ b/src/locales/zh/messages.po
@@ -311,8 +311,8 @@ msgid "TWAP Number of Parts"
msgstr ""
#: src/components/Synthetics/PositionItem/PositionItem.tsx
-msgid "Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee - UI Fee"
-msgstr ""
+#~ msgid "Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee - UI Fee"
+#~ msgstr ""
#: src/components/Exchange/ConfirmationBox.jsx
msgid "The spread is > 1%, please ensure the trade details are acceptable before confirming"
@@ -1911,6 +1911,10 @@ msgstr "esGMX(IOU)代币的地址是{esGmxIouAddress}"
msgid "GMX Alerts"
msgstr ""
+#: src/components/Synthetics/PositionItem/PositionItem.tsx
+msgid "Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee - Net Price Impact + Price Impact Rebates"
+msgstr ""
+
#: src/components/Synthetics/Claims/SettleAccruedCard.tsx
msgid "Show details"
msgstr ""
@@ -3056,6 +3060,10 @@ msgstr ""
msgid "Order creation failed."
msgstr ""
+#: src/components/Synthetics/PositionItem/PositionItem.tsx
+msgid "Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee - UI Fee - Net Price Impact + Price Impact Rebates"
+msgstr ""
+
#: src/components/Synthetics/MissedCoinsHint/MissedCoinsHint.tsx
msgid "Can’t find the coin you need? Let us know"
msgstr ""
@@ -4532,6 +4540,7 @@ msgstr "已启动转移"
msgid "Withdraw submitted."
msgstr ""
+#: src/components/Synthetics/PositionItem/PositionItem.tsx
#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
msgid "Net Price Impact"
msgstr ""
@@ -8016,6 +8025,7 @@ msgstr "图片生成错误,请刷新并重试"
#: src/components/Synthetics/Claims/ClaimableCardUI.tsx
#: src/components/Synthetics/ExecutionPriceRow.tsx
+#: src/components/Synthetics/PositionItem/PositionItem.tsx
#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
msgid "Price Impact Rebates"
msgstr ""
@@ -8448,8 +8458,8 @@ msgid "Total Users"
msgstr "用户总数"
#: src/components/Synthetics/PositionItem/PositionItem.tsx
-msgid "Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee"
-msgstr ""
+#~ msgid "Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee"
+#~ msgstr ""
#: src/domain/synthetics/sidecarOrders/utils.ts
msgid "Trigger price below lowest limit price"
diff --git a/src/pages/LeaderboardPage/components/LeaderboardPositionsTable.tsx b/src/pages/LeaderboardPage/components/LeaderboardPositionsTable.tsx
index a5ca9c67ea..b2bc615aac 100644
--- a/src/pages/LeaderboardPage/components/LeaderboardPositionsTable.tsx
+++ b/src/pages/LeaderboardPage/components/LeaderboardPositionsTable.tsx
@@ -247,6 +247,7 @@ const TableRow = memo(
collateralUsd: position.collateralUsd,
collateralAmount: position.collateralAmount,
minCollateralUsd,
+ pendingImpactAmount: 0n,
pendingBorrowingFeesUsd: position.unrealizedFees - position.closingFeeUsd,
pendingFundingFeesUsd: 0n,
isLong: position.isLong,
diff --git a/src/pages/SyntheticsStats/SyntheticsStats.tsx b/src/pages/SyntheticsStats/SyntheticsStats.tsx
index 1d218e5449..f9e54adfcd 100644
--- a/src/pages/SyntheticsStats/SyntheticsStats.tsx
+++ b/src/pages/SyntheticsStats/SyntheticsStats.tsx
@@ -769,7 +769,7 @@ export function SyntheticsStats() {
) * 100n
: undefined;
- const reservedPositivePriceImpactUsd = getPriceImpactUsd({
+ const { priceImpactDeltaUsd: reservedPositivePriceImpactUsd } = getPriceImpactUsd({
currentLongUsd: market.longInterestUsd - market.shortInterestUsd,
currentShortUsd: 0n,
nextLongUsd: 0n,
@@ -1072,22 +1072,22 @@ export function SyntheticsStats() {
Date: Wed, 16 Jul 2025 07:36:28 -0700
Subject: [PATCH 04/55] v2.2 price impact
---
sdk/src/utils/__tests__/positions.spec.ts | 13 +++++++++++--
sdk/src/utils/positions.ts | 2 +-
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/sdk/src/utils/__tests__/positions.spec.ts b/sdk/src/utils/__tests__/positions.spec.ts
index bfdda71c21..c0bcdc7f35 100644
--- a/sdk/src/utils/__tests__/positions.spec.ts
+++ b/sdk/src/utils/__tests__/positions.spec.ts
@@ -2,6 +2,7 @@ import { describe, expect, it, vi, beforeEach, Mock } from "vitest";
import { MarketInfo } from "types/markets";
import { Token } from "types/tokens";
+import { expandDecimals, USD_DECIMALS } from "utils/numbers";
import { bigMath } from "../bigmath";
import { getPositionFee, getPriceImpactForPosition } from "../fees";
@@ -158,7 +159,12 @@ describe("getLiquidationPrice", () => {
});
it("returns undefined if sizeInUsd <= 0 or sizeInTokens <= 0", () => {
- const marketInfo = { indexToken: { decimals: 18 } } as unknown as MarketInfo;
+ const marketInfo = {
+ indexToken: {
+ decimals: 18,
+ prices: { minPrice: expandDecimals(1, USD_DECIMALS), maxPrice: expandDecimals(1, USD_DECIMALS) },
+ },
+ } as unknown as MarketInfo;
expect(
getLiquidationPrice({
sizeInUsd: 0n,
@@ -196,7 +202,10 @@ describe("getLiquidationPrice", () => {
it("computes liquidation price for non-equivalent tokens and isLong=true", () => {
(getIsEquivalentTokens as Mock).mockReturnValue(false);
const marketInfo = {
- indexToken: { decimals: 8 },
+ indexToken: {
+ decimals: 8,
+ prices: { minPrice: expandDecimals(1, USD_DECIMALS), maxPrice: expandDecimals(1, USD_DECIMALS) },
+ },
minCollateralFactor: 1000n, // 0.001
maxPositionImpactFactorForLiquidations: 500n, // 0.005
} as unknown as MarketInfo;
diff --git a/sdk/src/utils/positions.ts b/sdk/src/utils/positions.ts
index 75618c4580..c1caff5c30 100644
--- a/sdk/src/utils/positions.ts
+++ b/sdk/src/utils/positions.ts
@@ -99,7 +99,7 @@ export function getPositionNetValue(p: {
const pendingFeesUsd = getPositionPendingFeesUsd(p);
return (
- collateralUsd - pendingFeesUsd - closingFeeUsd - uiFeeUsd + pnl - totalPendingImpactDeltaUsd + priceImpactDiffUsd
+ collateralUsd - pendingFeesUsd - closingFeeUsd - uiFeeUsd + pnl + totalPendingImpactDeltaUsd + priceImpactDiffUsd
);
}
From 554720db6fc7ba13fe050995d48dac425b0ec3b0 Mon Sep 17 00:00:00 2001
From: Divhead <110596516+divhead@users.noreply.github.com>
Date: Wed, 16 Jul 2025 07:41:17 -0700
Subject: [PATCH 05/55] v2.2 price impact
---
sdk/src/utils/__tests__/positions.spec.ts | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/sdk/src/utils/__tests__/positions.spec.ts b/sdk/src/utils/__tests__/positions.spec.ts
index c0bcdc7f35..939a69541b 100644
--- a/sdk/src/utils/__tests__/positions.spec.ts
+++ b/sdk/src/utils/__tests__/positions.spec.ts
@@ -116,7 +116,7 @@ describe("getPositionNetValue", () => {
closingFeeUsd: 5n,
uiFeeUsd: 20n,
pnl: 200n,
- totalPendingImpactDeltaUsd: 100n,
+ totalPendingImpactDeltaUsd: -100n,
priceImpactDiffUsd: 50n,
});
// netValue = 1000n - (10n+15n) -5n -20n -100n + 50n + 200n = 1000n -25n -5n -20n +200n=1150n
@@ -206,8 +206,10 @@ describe("getLiquidationPrice", () => {
decimals: 8,
prices: { minPrice: expandDecimals(1, USD_DECIMALS), maxPrice: expandDecimals(1, USD_DECIMALS) },
},
- minCollateralFactor: 1000n, // 0.001
+ minCollateralFactorForLiquidation: 1000n, // 0.001
maxPositionImpactFactorForLiquidations: 500n, // 0.005
+ maxPositionImpactFactorPositive: 1000n, // 0.01
+ maxPositionImpactFactorNegative: 1000n, // 0.01
} as unknown as MarketInfo;
const result = getLiquidationPrice({
From ec2f44704d9acb0c1d3f7977a47be1ec451cbf8c Mon Sep 17 00:00:00 2001
From: Divhead <110596516+divhead@users.noreply.github.com>
Date: Wed, 16 Jul 2025 07:46:07 -0700
Subject: [PATCH 06/55] v2.2 price impact
---
sdk/src/utils/__tests__/positions.spec.ts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sdk/src/utils/__tests__/positions.spec.ts b/sdk/src/utils/__tests__/positions.spec.ts
index 939a69541b..3827d14417 100644
--- a/sdk/src/utils/__tests__/positions.spec.ts
+++ b/sdk/src/utils/__tests__/positions.spec.ts
@@ -119,8 +119,8 @@ describe("getPositionNetValue", () => {
totalPendingImpactDeltaUsd: -100n,
priceImpactDiffUsd: 50n,
});
- // netValue = 1000n - (10n+15n) -5n -20n -100n + 50n + 200n = 1000n -25n -5n -20n +200n=1150n
- expect(result).toBe(1200n);
+ // netValue = 1000n - (10n+15n) -5n -20n + 200n -100n + 50n = 1100n
+ expect(result).toBe(1100);
});
});
From bd6e81a919968577db4ed5076efe3feab65089af Mon Sep 17 00:00:00 2001
From: Divhead <110596516+divhead@users.noreply.github.com>
Date: Mon, 21 Jul 2025 13:06:12 -0700
Subject: [PATCH 07/55] fixes for price impact and monitor page
---
sdk/src/configs/dataStore.ts | 18 +
sdk/src/modules/markets/index.ts | 4 +
sdk/src/modules/markets/query-builders.ts | 12 +
sdk/src/modules/markets/types.ts | 6 +
sdk/src/prebuilt/hashedMarketConfigKeys.json | 384 ++++++++++++++++++
sdk/src/test/mock.ts | 3 +
sdk/src/types/markets.ts | 3 +
sdk/src/types/positions.ts | 2 +
sdk/src/types/trade.ts | 1 +
sdk/src/utils/fees/priceImpact.ts | 21 +-
sdk/src/utils/marketKeysAndConfigs.ts | 15 +
sdk/src/utils/positions.ts | 27 +-
.../utils => sdk/src/utils/trade}/decrease.ts | 58 +--
sdk/src/utils/trade/increase.ts | 91 ++++-
.../Synthetics/PositionItem/PositionItem.tsx | 8 +-
.../rows/PositionSellerPriceImpactFeesRow.tsx | 15 +-
.../TradeBox/hooks/useTradeButtonState.tsx | 6 +-
.../__tests__/trade/decrease.spec.ts | 5 +-
.../buildMarketsConfigsRequest.ts | 12 +
.../markets/useMarketsInfoRequest/index.ts | 4 +
.../useFastMarketsInfoRequest.ts | 3 +
src/domain/synthetics/positions/types.ts | 4 -
.../positions/usePositionsConstants.ts | 20 +-
src/domain/synthetics/positions/utils.ts | 29 +-
.../synthetics/trade/utils/decrease.spec.ts | 5 +-
src/domain/synthetics/trade/utils/increase.ts | 99 -----
src/domain/synthetics/trade/utils/index.ts | 2 +-
src/pages/SyntheticsStats/SyntheticsStats.tsx | 34 +-
tsconfig.json | 2 +-
29 files changed, 697 insertions(+), 196 deletions(-)
rename {src/domain/synthetics/trade/utils => sdk/src/utils/trade}/decrease.ts (93%)
diff --git a/sdk/src/configs/dataStore.ts b/sdk/src/configs/dataStore.ts
index 0326482bad..2a0a8af914 100644
--- a/sdk/src/configs/dataStore.ts
+++ b/sdk/src/configs/dataStore.ts
@@ -41,6 +41,12 @@ export const MAX_PNL_FACTOR_FOR_TRADERS_KEY = hashString("MAX_PNL_FACTOR_FOR_TRA
export const MAX_POSITION_IMPACT_FACTOR_FOR_LIQUIDATIONS_KEY = hashString(
"MAX_POSITION_IMPACT_FACTOR_FOR_LIQUIDATIONS"
);
+export const CLAIMABLE_COLLATERAL_DELAY_KEY = hashString("CLAIMABLE_COLLATERAL_DELAY");
+export const CLAIMABLE_COLLATERAL_REDUCTION_FACTOR_KEY = hashString("CLAIMABLE_COLLATERAL_REDUCTION_FACTOR");
+export const MAX_LENDABLE_IMPACT_FACTOR_KEY = hashString("MAX_LENDABLE_IMPACT_FACTOR");
+export const MAX_LENDABLE_IMPACT_USD_KEY = hashString("MAX_LENDABLE_IMPACT_USD");
+export const MAX_LENDABLE_IMPACT_FACTOR_FOR_WITHDRAWALS_KEY = hashString("MAX_LENDABLE_IMPACT_FACTOR_FOR_WITHDRAWALS");
+
export const POSITION_IMPACT_POOL_AMOUNT_KEY = hashString("POSITION_IMPACT_POOL_AMOUNT");
export const MIN_POSITION_IMPACT_POOL_AMOUNT_KEY = hashString("MIN_POSITION_IMPACT_POOL_AMOUNT");
export const POSITION_IMPACT_POOL_DISTRIBUTION_RATE_KEY = hashString("POSITION_IMPACT_POOL_DISTRIBUTION_RATE");
@@ -379,6 +385,18 @@ export function subaccountActionCountKey(account: string, subaccount: string, ac
);
}
+export function maxLendableImpactFactorKey(market: string) {
+ return hashData(["bytes32", "address"], [MAX_LENDABLE_IMPACT_FACTOR_KEY, market]);
+}
+
+export function maxLendableImpactFactorForWithdrawalsKey(market: string) {
+ return hashData(["bytes32", "address"], [MAX_LENDABLE_IMPACT_FACTOR_FOR_WITHDRAWALS_KEY, market]);
+}
+
+export function maxLendableImpactUsdKey(market: string) {
+ return hashData(["bytes32", "address"], [MAX_LENDABLE_IMPACT_USD_KEY, market]);
+}
+
export function subaccountIntegrationIdKey(account: string, subaccount: string) {
return hashData(["bytes32", "address", "address"], [SUBACCOUNT_INTEGRATION_ID, account, subaccount]);
}
diff --git a/sdk/src/modules/markets/index.ts b/sdk/src/modules/markets/index.ts
index a55d949556..df8a121430 100644
--- a/sdk/src/modules/markets/index.ts
+++ b/sdk/src/modules/markets/index.ts
@@ -260,6 +260,10 @@ export class Markets extends Module {
maxPositionImpactFactorNegative: dataStoreValues.maxPositionImpactFactorNegative.returnValues[0],
maxPositionImpactFactorForLiquidations:
dataStoreValues.maxPositionImpactFactorForLiquidations.returnValues[0],
+ maxLendableImpactFactor: dataStoreValues.maxLendableImpactFactor.returnValues[0],
+ maxLendableImpactFactorForWithdrawals:
+ dataStoreValues.maxLendableImpactFactorForWithdrawals.returnValues[0],
+ maxLendableImpactUsd: dataStoreValues.maxLendableImpactUsd.returnValues[0],
positionImpactExponentFactor: dataStoreValues.positionImpactExponentFactor.returnValues[0],
swapFeeFactorForBalanceWasImproved: dataStoreValues.swapFeeFactorForBalanceWasImproved.returnValues[0],
swapFeeFactorForBalanceWasNotImproved:
diff --git a/sdk/src/modules/markets/query-builders.ts b/sdk/src/modules/markets/query-builders.ts
index 66cb0b0783..43c02c8a10 100644
--- a/sdk/src/modules/markets/query-builders.ts
+++ b/sdk/src/modules/markets/query-builders.ts
@@ -403,6 +403,18 @@ export async function buildMarketsConfigsRequest(
methodName: "getUint",
params: [prebuiltHashedKeys.maxPositionImpactFactorForLiquidations],
},
+ maxLendableImpactFactor: {
+ methodName: "getUint",
+ params: [prebuiltHashedKeys.maxLendableImpactFactor],
+ },
+ maxLendableImpactFactorForWithdrawals: {
+ methodName: "getUint",
+ params: [prebuiltHashedKeys.maxLendableImpactFactorForWithdrawals],
+ },
+ maxLendableImpactUsd: {
+ methodName: "getUint",
+ params: [prebuiltHashedKeys.maxLendableImpactUsd],
+ },
minCollateralFactor: {
methodName: "getUint",
params: [prebuiltHashedKeys.minCollateralFactor],
diff --git a/sdk/src/modules/markets/types.ts b/sdk/src/modules/markets/types.ts
index 016138b107..3279cb0d8f 100644
--- a/sdk/src/modules/markets/types.ts
+++ b/sdk/src/modules/markets/types.ts
@@ -85,6 +85,9 @@ export type MarketConfig = Pick<
| "maxPositionImpactFactorPositive"
| "maxPositionImpactFactorNegative"
| "maxPositionImpactFactorForLiquidations"
+ | "maxLendableImpactFactor"
+ | "maxLendableImpactFactorForWithdrawals"
+ | "maxLendableImpactUsd"
| "positionImpactExponentFactor"
| "swapFeeFactorForBalanceWasImproved"
| "swapFeeFactorForBalanceWasNotImproved"
@@ -169,6 +172,9 @@ export type MarketConfigMulticallRequestConfig = MulticallRequestConfig<{
| "maxPositionImpactFactorPositive"
| "maxPositionImpactFactorNegative"
| "maxPositionImpactFactorForLiquidations"
+ | "maxLendableImpactFactor"
+ | "maxLendableImpactFactorForWithdrawals"
+ | "maxLendableImpactUsd"
| "minCollateralFactor"
| "minCollateralFactorForLiquidation"
| "minCollateralFactorForOpenInterestLong"
diff --git a/sdk/src/prebuilt/hashedMarketConfigKeys.json b/sdk/src/prebuilt/hashedMarketConfigKeys.json
index 2481d05e4e..3f4f917a05 100644
--- a/sdk/src/prebuilt/hashedMarketConfigKeys.json
+++ b/sdk/src/prebuilt/hashedMarketConfigKeys.json
@@ -37,6 +37,9 @@
"maxPositionImpactFactorPositive": "0x825201d62a913028fa553544c19e6e9e45885502ad94b3e9ccb79e2911daf669",
"maxPositionImpactFactorNegative": "0xa0145413fea58392aad72c6aaba18435a1b6e00ff9346d8418c207d8b3f0ad1d",
"maxPositionImpactFactorForLiquidations": "0xb7ab4d8339ba5934253d04b55d4141017d73b9801df9a8810ea10d1c3ea3fc6f",
+ "maxLendableImpactFactor": "0x0585fc9618ad8521b5d612e41c802de36cb4bbf6e8313771e290c791ad3fe68a",
+ "maxLendableImpactFactorForWithdrawals": "0xe44a4f4906ef59a042e098c6578cde4b0d1b58c73f98ec0779b71d31fbf6d9e5",
+ "maxLendableImpactUsd": "0x728ec84ffba417f5cd111b992612c69bee78f19ac678b1584aae070e63f455a7",
"minCollateralFactor": "0x0edf8a0fa860b71e689cfeb511c6b83c96d23eaf71c6f757184d23954fcb3169",
"minCollateralFactorForLiquidation": "0x9c713920b491455ee33d87a6d12394a42e83d5f426958697dc08a318be13ed91",
"minCollateralFactorForOpenInterestLong": "0x18ab1bf4fdef11804a1212c94ba4ed35498ef5942b3d385fc9c33f933f17f60d",
@@ -89,6 +92,9 @@
"maxPositionImpactFactorPositive": "0xc230e1e4d328166be2c9c1e775203c706519bd3f17777d460f0bd159e2680920",
"maxPositionImpactFactorNegative": "0xf0304143d99ab54dd4a90b22df08fec271f1c69fc31cdcbdbcaaf2f3f9abbe90",
"maxPositionImpactFactorForLiquidations": "0x2d8a11f53ea0e4da886046922afbdaf2f98111c2c3617ce8d53320e5368ece53",
+ "maxLendableImpactFactor": "0x4112eb8d7aed1bb72e882220f586aaac2019f97fbf59808eaf687468dc13737c",
+ "maxLendableImpactFactorForWithdrawals": "0xeed571225e3a9bdef852f7b8b0ffaea55a32d3ca54cfdac61584c70c4d4cc016",
+ "maxLendableImpactUsd": "0xb8f98bea93a1cea67ff9bd16f527fa76903a2cc5898a48a5e98cd3d6194f5cad",
"minCollateralFactor": "0xcf1cefe1a11576531900922002113a6cf623823d2c813a4534c5d181976450ae",
"minCollateralFactorForLiquidation": "0xefc3fc73b918e0aa9a9a9f306393b25a2919aad551cbd5c5535834b6ea9d9934",
"minCollateralFactorForOpenInterestLong": "0xbcf38cdb77fa9cb02787c89b5b616dc4d91337a400795d617a2580ae49a6e209",
@@ -141,6 +147,9 @@
"maxPositionImpactFactorPositive": "0xef102c726b741df58e10ba28b7f783ebaa6c2076f27b615f9d21a4edfba791c1",
"maxPositionImpactFactorNegative": "0x98bec1ab62f465a2a83119494f5f21c753b0527908dc422f67220e613c532771",
"maxPositionImpactFactorForLiquidations": "0x5fbccb68c5d1de0fd2d39c7a60110688e10a969992910911b5a7ff5461a7fddd",
+ "maxLendableImpactFactor": "0x93de0069d2725e09bf4c058941d76e098ccc24e408c20d09e981af35375bf806",
+ "maxLendableImpactFactorForWithdrawals": "0xaf9aa8b02ddbf97ce8464ba2de02f40ad91ee33358d46ec67f08f2aadf3377dd",
+ "maxLendableImpactUsd": "0x80be7e0fa9db2f39a0b71c58828c1c43984f5794d61afab943e2f3882d718cee",
"minCollateralFactor": "0x832e125ad1a59ec76a096a906db0abca415fae50215a04713ba7d26b806170d7",
"minCollateralFactorForLiquidation": "0xb5942ec068620932b817a6dfdc8481a8d8f06dc0563a60f643926b6a103c672f",
"minCollateralFactorForOpenInterestLong": "0x47ece80b5a8441270dc51b704ac241ee205157d6e79a17ec9a7a78d5a1c405cc",
@@ -193,6 +202,9 @@
"maxPositionImpactFactorPositive": "0x10951da02818a2ad689fc04ff3ca1935a2bd85a7023d53189f9f2526c1ad19df",
"maxPositionImpactFactorNegative": "0x789029ddd96ed090034a9b9f30b7b5b6c658b3b2c03c3d8e8b99087572e6c29f",
"maxPositionImpactFactorForLiquidations": "0xe67bb29085a2c9505c14cb22b778ffd89bab7484bcf0142d4b8f0d94823fe8b8",
+ "maxLendableImpactFactor": "0xf1cddf409a74490b6b9b71da45699a2664842cb2095addd15856e5ca4488e749",
+ "maxLendableImpactFactorForWithdrawals": "0x996605603a143fcffe8d5a8a49d57f3b166610dbc943f4e4504b16c5af6e6da8",
+ "maxLendableImpactUsd": "0x98840a7c390a3d473387dba2f260538403d20a4302fb5208143594a82858305c",
"minCollateralFactor": "0x25ca6ce85c0568d84138f6b3264fedf1668f1ddfc320f7ba409d3d6019411833",
"minCollateralFactorForLiquidation": "0xa7a3d6ff9c0a71648dc0e6cf384fa77bd83e4b2ff8395f57d3c34f2b36367977",
"minCollateralFactorForOpenInterestLong": "0x3c2241385fd888324a03ea03eb3606df19e300ae2c3cf2dcafbe2d235a04b676",
@@ -245,6 +257,9 @@
"maxPositionImpactFactorPositive": "0x35e161be38af516eabcc7215e158450e46aa9123dfd22a127a3a22717f68e412",
"maxPositionImpactFactorNegative": "0xad122e0fa63007cec09c08f304aa598044be6f5191018370739bc16a9c439816",
"maxPositionImpactFactorForLiquidations": "0x1a5334adfb5b61b4aa80163c205dda0a875dea3d2db2fe0850b7b0614f31cdbd",
+ "maxLendableImpactFactor": "0xd98beda89a305501d34136119ca30e1ca2b5b2f434e35296cdb5561208c5b4bf",
+ "maxLendableImpactFactorForWithdrawals": "0x76da0d9c850d2920a310f5aa18b371ca8d2a90b38815cfe6ba6456cdb5c85d50",
+ "maxLendableImpactUsd": "0x8237ec27bdb004d4107c6c6b79c9041a2c4a937dd1252e13d5477a27d2e29eda",
"minCollateralFactor": "0x2bcb8363ff421d07360a2a95773d3f7b64319b6bc58f328c6c734e090562cdc1",
"minCollateralFactorForLiquidation": "0xf28436ee632c09e66f86fd35aaa5d18095399b9108d4ba85c8525a3072af2568",
"minCollateralFactorForOpenInterestLong": "0x7f97bdae1ee1c0424ccd6dc21526e5ef1e0cb581856d3c0b3279c518b2b140f6",
@@ -297,6 +312,9 @@
"maxPositionImpactFactorPositive": "0x76f07a9c4842e03295e606a17118aa7055df974c7e8119e90c54366f8438c824",
"maxPositionImpactFactorNegative": "0xa90e6926653827715ada027f4112fe7c882a3ccaf37c922462d40fa4ea8d03ab",
"maxPositionImpactFactorForLiquidations": "0x41af16a1d0ba06020391564578914ec605001bc8ed683269ff1c10ecde331864",
+ "maxLendableImpactFactor": "0xab56d4d760405991ddef068434a5d406ba016e6d8146fc4902e4e0d598b4880f",
+ "maxLendableImpactFactorForWithdrawals": "0x4ee32ae87de6b8212db46ab2f997b72a42a3c045b784611792cb3b3abcc09ef5",
+ "maxLendableImpactUsd": "0xf795ef00b0e40b4c87bb36bc3cb5d3bba6e56a2579c1d175c4b5cf66b0ccf2ed",
"minCollateralFactor": "0x47e6ae06f279a68f0ca067d5a30ed3650bb14114110b8ee80883b47804ef6a3b",
"minCollateralFactorForLiquidation": "0xc256c83913d960d9206dcc2892b610d70f1215a7c0dca18cbf2a253a86a4e27b",
"minCollateralFactorForOpenInterestLong": "0x2baf62173b9765c40d17461b94ede9de9288eaceb9bea879a93916d6fbc22a19",
@@ -349,6 +367,9 @@
"maxPositionImpactFactorPositive": "0x5c9741051d509ce2c9f6984c4c7f98516b2cbf91e1342f56f0e1b5d40056b688",
"maxPositionImpactFactorNegative": "0xc5e52b000c6cf276f134adfe885de18e057f3c5f68a128cd952aae394b3c11cf",
"maxPositionImpactFactorForLiquidations": "0xe124a4a1a960aab0503ef70a732184bbc30732fd4697eb1ce4d4463f3a25c509",
+ "maxLendableImpactFactor": "0xb3c4274beae095399cacdb1878d1c016eed094b245bbc1fa72b69721f8a4e7d7",
+ "maxLendableImpactFactorForWithdrawals": "0x37e67266b53cbe2d3941590fc1b3d26a20850d5c2236ea80b98ccf17bd696c64",
+ "maxLendableImpactUsd": "0x84ace13dc5d67763acb52f7555c4393f595076dc9ea38d5d1a5457fabe6a7ca6",
"minCollateralFactor": "0x96dbb6d13d7c6ad973f98461378032ffcf09dcfff780a087bfb18e8b2345b446",
"minCollateralFactorForLiquidation": "0xdc1582e6529d9cc8f1962399984c6069dcaa98f558366ed6c054c2b725b86eb7",
"minCollateralFactorForOpenInterestLong": "0x55f19e1cb6994dac8de0f0595716c8ce1c98c4a0fe7ab84d94a2581a2857ef77",
@@ -401,6 +422,9 @@
"maxPositionImpactFactorPositive": "0x2ff3590362f429c9e9fed9dbdd6d9b7af0fadc3db5958cbdad4915effd446ab5",
"maxPositionImpactFactorNegative": "0xc5700a9f0f48d7f11ad44433d1848041e475133baa14ceabfd308aa05291380c",
"maxPositionImpactFactorForLiquidations": "0x95b07614a06ac0a81e49b6e02b6b5be9ff94bec514e0e62042c8e1f5c1429733",
+ "maxLendableImpactFactor": "0x62fff146684d5367acfd3186d198f360d343641ec714f75bbfe1da5d15cc2d1a",
+ "maxLendableImpactFactorForWithdrawals": "0xb7655a124cfb3abd74e70cc7eb1e86ef590f4256be7b19dfa5a16a13a0853875",
+ "maxLendableImpactUsd": "0xb2b39807618c901e81778682b8c1784c922b07d57729cafc0f85fc55e6e17b74",
"minCollateralFactor": "0xda500b491a746b24ab50e0b8b019f220ead47914b3745a2a7e7fdbd254e98380",
"minCollateralFactorForLiquidation": "0x34f110ea583e9f5ddde6db52500fdfa0f533d4289608e8385d6e8eb52b6ccc43",
"minCollateralFactorForOpenInterestLong": "0x766fd0d002f43488d55b72193e9da1714d44851b4eb0e813cc8d280bef17a17e",
@@ -453,6 +477,9 @@
"maxPositionImpactFactorPositive": "0x3bd8a0156fa25ff8ede082290885def48ebc2b978d3d3bb634261bbd940aa8ee",
"maxPositionImpactFactorNegative": "0x01d477fd068479d04cb497540a393c8b5ef72afcc50e7b820000f5d863d185b0",
"maxPositionImpactFactorForLiquidations": "0x4ec66905f0f5391fc597d1928fcb5b1785f5ff1c58238c67026b62121f2c02ce",
+ "maxLendableImpactFactor": "0x3a9c470b53c165ab932328154f9874548715861c6460f805ee9a4a80a8fea78b",
+ "maxLendableImpactFactorForWithdrawals": "0x9fad6c729230ce1e718f2c8d59dc4d4b71cabdc42bdc9671eb9f3a657c96a76c",
+ "maxLendableImpactUsd": "0x9862560ef3b5dac5ce2b74ef17a25dbe09eb8a96671a982b6a965c5269d3cd45",
"minCollateralFactor": "0x0319e091a3ec1a799e073a0b7936f425076d1918f56c3ebca0a61a077925d1a7",
"minCollateralFactorForLiquidation": "0x44c72c9b6faaa5a6a01ee3029c34a5998526cf5d06621babe61728a74452cc9c",
"minCollateralFactorForOpenInterestLong": "0x534530389b87caf5d983a7e0e861fa8081b2a7a13384cf923705a64a186c5230",
@@ -505,6 +532,9 @@
"maxPositionImpactFactorPositive": "0x3aaa745ed518dd8c579ee6533f0abc0f71f0b5856a057d7cdb74765251b41f7c",
"maxPositionImpactFactorNegative": "0x28706d4a1fdc22299d49f2506ff82c9d9acc08e657e2d01a527678b6c6762247",
"maxPositionImpactFactorForLiquidations": "0x15bcf662fdf9b8cd990c2b62c63190df2eb471bed3de8b9252a8d9f1d25fe9df",
+ "maxLendableImpactFactor": "0xc6fe342f7964206bc124b771ff423c0ea289d1bb7de474110589adeffee82944",
+ "maxLendableImpactFactorForWithdrawals": "0x2870d8d25ffee717545ddf07c91cf6fd196b65e8f90c3ef166432c3fc0822382",
+ "maxLendableImpactUsd": "0xfcadfede8ed4a86ac6707ff911ab8013568d1a6aafc8533f4414ac34eab356b6",
"minCollateralFactor": "0xff3a85b820937ac9b174e1f49510b221d1e2eccc89cbdb68794b1e04f82c5e1e",
"minCollateralFactorForLiquidation": "0x04392113bc40d454de730f577ae537fe8a7a03c8699523dd377868df099dd735",
"minCollateralFactorForOpenInterestLong": "0xce841b0d0a75f7f23b3068a8731d79d46ffd5224bf752b82c99278c615ce9610",
@@ -557,6 +587,9 @@
"maxPositionImpactFactorPositive": "0x55682cadf8c0c42f07f7537e036888e6509b4c1fefbe791f8806c0122464065c",
"maxPositionImpactFactorNegative": "0xcc4ecb935ca3ee301c72b4a0a5a2e0ec012bb977e18988abbf65ec31dacfb01d",
"maxPositionImpactFactorForLiquidations": "0x53e40c837b0c78b8e732b33a14b1a71eafb92ad162e389509adf12d012804445",
+ "maxLendableImpactFactor": "0x8b638a3a6144458459f5ae1ded90a00fd71368b16e55375547465bc1c64dd948",
+ "maxLendableImpactFactorForWithdrawals": "0xfdae05a2ec9ea4f7ebd165c878f4ed38f7241ad080746ac736ed1fd290f88f44",
+ "maxLendableImpactUsd": "0xe70223bfaf4074aff312a883325204bd961829e8cc013550374a8ff390d757a6",
"minCollateralFactor": "0x19551441f4fad115496cad924a5234a7c54fdfb4c8a1488f93b7bbd6b0ecedc1",
"minCollateralFactorForLiquidation": "0xdfc2ee462858568defefb730ffe6b557448fd43946f479e841fb1d8a07246f89",
"minCollateralFactorForOpenInterestLong": "0x2236f68da88942f622d2e117770f8f2147a2e26a5ae248e7facaed024241fff9",
@@ -609,6 +642,9 @@
"maxPositionImpactFactorPositive": "0x1c69876249545cf8f840054e487971e4faa2bf1574ac216060f5367e8fc4a611",
"maxPositionImpactFactorNegative": "0xc6af5f36195b175198abc4774b59c643fd769f4e2c9e249c1e3006b88b70fa9e",
"maxPositionImpactFactorForLiquidations": "0xbf51cc5c91b13d3465f57f3e9c7b3d9a464a01ad65b0cd7a784fd2d83ccb7051",
+ "maxLendableImpactFactor": "0xf8570b1f7724a306cad7e751facf358775d2836bdb89a795e7cf10e9e5d300c4",
+ "maxLendableImpactFactorForWithdrawals": "0x8d6265e42640b0ac32cc3f53e56a5c09e3a813d783e81ac771a2a059cf5853a1",
+ "maxLendableImpactUsd": "0xe51022439894366b3a6e88867c5b10c08d7f7ff243117df10e59009a28aaf91d",
"minCollateralFactor": "0x7cc57d46d5ff50a03e5a0f29242e18131d031794b2629b7f6398de7841588dbc",
"minCollateralFactorForLiquidation": "0x72e936023ba9fcbaf12a7120e82d41da53972b921ffd5dd1ad50ac1ae93bb900",
"minCollateralFactorForOpenInterestLong": "0xc91baace01ed132d5a1f539fb6ddacfa913f012c6d706993f1f9d21e28646417",
@@ -661,6 +697,9 @@
"maxPositionImpactFactorPositive": "0x8fba80b3646c853ff0999394fbddf236bfdb72482b4fb1dadf6fbc81caa1b9f8",
"maxPositionImpactFactorNegative": "0x12ba189cc009055d7cb1907f44c8b32ba8b8c6a8f0359713a84ba3179420f542",
"maxPositionImpactFactorForLiquidations": "0xf630085ecccd08f436223030db10c9c8bbbf96d9b8e0dfdf97d02c978c024b14",
+ "maxLendableImpactFactor": "0xf403c0635696149bfb203b07cf6aa938a603884ce708fe342d0c95bb9c77f6c0",
+ "maxLendableImpactFactorForWithdrawals": "0x9f4f21d5d90fb9137601d9e8f67d52fc46912abe323569b8717ded1b8ca4dea4",
+ "maxLendableImpactUsd": "0x3facc7f4177d656a98252b3d56766e2797a66c79f6d86c6bcbf3d661dd49659d",
"minCollateralFactor": "0x44d3450628900783da0a74bb9d83b0bca2ff8504e6c4d420a2c5480085883855",
"minCollateralFactorForLiquidation": "0x045488831e4d7b120737807287cdd91326b56a531a357dfc178b1e621a073fda",
"minCollateralFactorForOpenInterestLong": "0x95ed56a404dad3b4f299ec1ce25cef2de1a828458f02787a404fff019baaafa4",
@@ -713,6 +752,9 @@
"maxPositionImpactFactorPositive": "0x4263f2ff7af12d6564bab215180503848e8bbaae4bf39c4e6e4e5d73b9a8add3",
"maxPositionImpactFactorNegative": "0xf398b3bf767ae253c3dcace78389d530c601ae67be971378528e0b5a0bf2164d",
"maxPositionImpactFactorForLiquidations": "0x8fe8d9a666bd04e67d114209c1926e70a58a132db2beeed4177f31ae9d0318c3",
+ "maxLendableImpactFactor": "0x1749895678e38a3343c373c2d2c043ee94127a7fa863488817f099d6ff98760a",
+ "maxLendableImpactFactorForWithdrawals": "0x3a41d7ec40650324eb9ffdc44c4cdebda6d53a5383a74f986d3d0cbb6819de34",
+ "maxLendableImpactUsd": "0xfabf16315fd84c105d19c87edd5186946f5a33dbd327d2c3ec395a67ac401043",
"minCollateralFactor": "0x6a8d715582ce7a436f0926fce0f99d60dd260a473e14babbb4560315a488cc1f",
"minCollateralFactorForLiquidation": "0xd0362b4c48dedbb4f87db87c773b0f4329525d6197ab8617c15dd6e4668d3264",
"minCollateralFactorForOpenInterestLong": "0x6d844c42863e83e23fa960ab45a1a5696e1be08fa1e4e772366172c0ac93229f",
@@ -765,6 +807,9 @@
"maxPositionImpactFactorPositive": "0xc48d8c6bc423b09532b41f9989b3379cf2f045332ff8653091fe4d7269132d16",
"maxPositionImpactFactorNegative": "0x56c740c2ca614eab1d549b7bb7a4f6288cf040a585c97ec247670cc345d4ec91",
"maxPositionImpactFactorForLiquidations": "0x73aac72421893e1c0d682fad9aed3749e082ff69084394c9acc9b4ed0a0cc3b1",
+ "maxLendableImpactFactor": "0xde1ba05fe687e529a6a0c58d2100de1139ad4928b37e52862c8d1ebdb22a1a61",
+ "maxLendableImpactFactorForWithdrawals": "0xee346d2edd361d19d698b4dd0789969a134d4ed19a464cd4201596b74ce53fed",
+ "maxLendableImpactUsd": "0xcfce9499d841b6c0e363c365ac82b6f7a3da5f3af87fcddff222e8582f34d63d",
"minCollateralFactor": "0x5b9cbe70edfdfea83201f44a0f1c912fb82a4a1ee106f9a3842bb29cb5301035",
"minCollateralFactorForLiquidation": "0x71ff8d76e7fc434950cad2cccf97e7b7ba4f414cbf807094440bd8599e6a61d6",
"minCollateralFactorForOpenInterestLong": "0x2a50bf17c53f122cad04b207535a3c74b062687e8c8f8657ea2f927b501c1062",
@@ -817,6 +862,9 @@
"maxPositionImpactFactorPositive": "0x8cc0069408f08a8a1e914d23f0bd90ab2edd81dcb73ba80808c1cb161d7f866b",
"maxPositionImpactFactorNegative": "0x8326d13e731e4a06711e304528185e6df2a513e097f53a509c44e802ebc0c816",
"maxPositionImpactFactorForLiquidations": "0x3ffd3e2d8443b5c30958a5bac0fdf3d6c024ea77777f91dea6aeaeff923797cf",
+ "maxLendableImpactFactor": "0x04ebe570057f2180ebd8a9974508c054a9ce74f674831b8416c93266451a1283",
+ "maxLendableImpactFactorForWithdrawals": "0x6deeca3b9918df157ac6b79b200ae21f3325e0d5f776ed8cd20b4a84d38fea1e",
+ "maxLendableImpactUsd": "0x8d8d59ace8460900776b284975c4d174a52b808a53c04a79828065217ed88e0d",
"minCollateralFactor": "0x69a941e84ede0f13d1c7a57eb687f63ce8927eeef908b0e1e8dc22f9fda6c050",
"minCollateralFactorForLiquidation": "0x5cbd1eda2c597db32bc6c3e5e9098bc9dbf2442d0956252f63722275452b0da7",
"minCollateralFactorForOpenInterestLong": "0x9a7f1df75521d5245272629ae3d633c5b1df32b56dbfb7bcb79f6ed1783f3207",
@@ -869,6 +917,9 @@
"maxPositionImpactFactorPositive": "0x5319f499876d4621e715dc632e7d7cb3933dc765ea1acf8d430e17a55393e986",
"maxPositionImpactFactorNegative": "0x7e416f0acea3cc9622087968a015c15cf9a9039935214cbd69d6e7a2059f93fc",
"maxPositionImpactFactorForLiquidations": "0x1763e966632029c1f297e56d1a17944619af4ac6276c6f897ecd10bedd501f28",
+ "maxLendableImpactFactor": "0xebef0970db3654b327983d90211b1d5835ca7aba423825a79892ebc3830b8290",
+ "maxLendableImpactFactorForWithdrawals": "0x94f2a84873648f9fdb79ac47c08980d65bc572ac20486f76d6aff0d08b39e68e",
+ "maxLendableImpactUsd": "0x5b357ad4bb38a6e6c6bb0046dbff6dd7e04211880474c6776313374c3801b90e",
"minCollateralFactor": "0x658da6dd132bb7e1756b246c646e4f3681462f841ea26f37d83a1bc7a7c640af",
"minCollateralFactorForLiquidation": "0x3f735896b5ad89fc720a25fd616b3c729789db640f8a0620238eefaf2fc2de7c",
"minCollateralFactorForOpenInterestLong": "0x5b29bc756da04509ebef8e49358a85e1b080ee9d9b19f646413c7ec366643c4f",
@@ -921,6 +972,9 @@
"maxPositionImpactFactorPositive": "0xe38a3799bc01e41c85e5fd8df2d75f32af5e85731835f96bec4cc30adab2fe75",
"maxPositionImpactFactorNegative": "0x409c6508fd9685bb329819c23f0ec5e609025de5ee993837362348919dfb86b3",
"maxPositionImpactFactorForLiquidations": "0x49704998ebf84402cb8e86f8e617cfc500631b77d9589d637e25350c84582f29",
+ "maxLendableImpactFactor": "0x1c73ec35a26f4307497d8cf7691e2b2af2c1d8d575d497ee365bd1aeee24d11b",
+ "maxLendableImpactFactorForWithdrawals": "0xe747a8862385c810a6a424472e69c7774549bbbf532d91c87861d0ac1bcb93df",
+ "maxLendableImpactUsd": "0xa9b9ec70460741f91d78a921f8aabbdb18ece7faefbc2934034a21ce9f38b78b",
"minCollateralFactor": "0x99b3701cc7c1265785f49ccd881b41099fbe598b8eec779a1cb9f9d0ab47c538",
"minCollateralFactorForLiquidation": "0xa3555afc1b6acabe022942d56a72327d65daf86bf7eec60ebd84645c8793ad58",
"minCollateralFactorForOpenInterestLong": "0xc711c4d6d1307e7c53adb1d3e70e48374818834facdddda9f3aa07ab3b84b6eb",
@@ -973,6 +1027,9 @@
"maxPositionImpactFactorPositive": "0xebacab0fccc785fffddf4ce399ec5f857e302fa137d3b3443f5a3153b5d925b1",
"maxPositionImpactFactorNegative": "0x0a64b1059a69b7fb1f5738256b5d1009c654a0343331b552b0946bce23fa5abb",
"maxPositionImpactFactorForLiquidations": "0x9f5eb4d0a87742d78eb809fd1c85d378f22e830e2155e4c130147b107606db2c",
+ "maxLendableImpactFactor": "0xfbe064e19c3e25cc5bfd9034893728a86c34fe48c285de49de11478c9763c2c2",
+ "maxLendableImpactFactorForWithdrawals": "0x6f18cbb5bc5d13d823dfa54644e3830fa136f22c5249c629344ce22761600d77",
+ "maxLendableImpactUsd": "0x760f274dbc4197734350f453e31e52e0f92218688034645fd667c249904ce555",
"minCollateralFactor": "0x505fc7c1a1954b72fd3b5f7f9b5250661340b75ce9e9044e6dd11c8da2d692db",
"minCollateralFactorForLiquidation": "0xf2a71a4e761efd126653b700f3f521749f94b22a97852ad66374cdd674e545c9",
"minCollateralFactorForOpenInterestLong": "0x7be7f22de8ae3c36d8218b44d06c5a126ea07b5bf1176ff4e90c34ccdae32302",
@@ -1025,6 +1082,9 @@
"maxPositionImpactFactorPositive": "0xa49f2ccad33245c6c3e4e65abbc1b574fb1b260c790a598aa1607b7916af939b",
"maxPositionImpactFactorNegative": "0x1264f0fe836dba8344c27cfd30a27687f01ede436cbcb88905f3d099866aa385",
"maxPositionImpactFactorForLiquidations": "0x3bee549827b24a6c7258484153433d3e8975a38058ca8301a06274c57c12febb",
+ "maxLendableImpactFactor": "0xa75bce095842fe06e45af063eb831699f32ddf980e20fcfc902ca2631ca02613",
+ "maxLendableImpactFactorForWithdrawals": "0x31db483709baba5a5308053acd07bf2634f332731b317661879c618d0f5c602a",
+ "maxLendableImpactUsd": "0x29e9b1977298989ed1a7683018b65cb8acbcc60e5192fd76c1059701b553e10a",
"minCollateralFactor": "0x23996b6d9b7a115e3ce89b84c1fb992e361ab8b7d0eee682f20dee97ec68ffe1",
"minCollateralFactorForLiquidation": "0x7c2459f97adc8e43337e81a934c826ed807ff31274e3f0092cc5677aa9ff20d2",
"minCollateralFactorForOpenInterestLong": "0x35859412d8490a4c126fe4f1bfc34c55cb8fe37dfa500acd3c8b86af666c5ec3",
@@ -1077,6 +1137,9 @@
"maxPositionImpactFactorPositive": "0xe2991c2345da0cfdfd5b8ec9e7676658276be8890053e15fcccb194d3bf7e12b",
"maxPositionImpactFactorNegative": "0xe113eb600d7bbf5d1eecc81235c5881d5d33afb2f11d9ec2a2be8028b471a17b",
"maxPositionImpactFactorForLiquidations": "0x5837f920215e0e61cea98ec67e54f88ea6b2c37942ce77134be57426826ea24e",
+ "maxLendableImpactFactor": "0xd6ed141e8b8c6e2661ae4c99f03c1a2ee9ad0e40c565c5425075c5e1deb120a7",
+ "maxLendableImpactFactorForWithdrawals": "0xb6877a6bd2fa681248dd21765f9e70148c4a9d8828b25b28477a2b545880afd8",
+ "maxLendableImpactUsd": "0x46ef0d545d15cab8085e3b3fa590e5f0cd1dbe97e8f24becb729ed6174433f85",
"minCollateralFactor": "0x36ab3e3013ad52ba6a0d8f4a0453b7102f49cac48a2a11fa6c73dbe0aefe816f",
"minCollateralFactorForLiquidation": "0x5bfcbab875f4417b539e955ceac950cd006a69b7f451081607ba40e7fbb369dc",
"minCollateralFactorForOpenInterestLong": "0xb53e1f7357d8985ac911799567e535ae47b4b735a3aa570d896d2675c5ebb6d9",
@@ -1129,6 +1192,9 @@
"maxPositionImpactFactorPositive": "0xcc90fb298e671c27c085ae0f7416295fadedbd92249139252ddc869a5ca25dc7",
"maxPositionImpactFactorNegative": "0x08e3b3b485b631d3a46abbc16ece5d6f745d41def3f018df49b7c4943d4a15e0",
"maxPositionImpactFactorForLiquidations": "0x52ac32768630686448d7056b478dbb59679a30728f24b36d590687f6188e1491",
+ "maxLendableImpactFactor": "0x1377b71f205affe712d85cc326a1813712cb326b30389154258cad6dad05449f",
+ "maxLendableImpactFactorForWithdrawals": "0x12e5f81e5061c091fe8da4eb9fc0578d98e6295028fb78b95908fddd566f75a0",
+ "maxLendableImpactUsd": "0x40eac551dff2fa3fd0b390d4fe083c05fde69ac07714f4c3b7b7effde854972e",
"minCollateralFactor": "0xb763d546f4c43a22e39e6d544d2a097e2b739449ac8125be625ca1b3edb6c7e6",
"minCollateralFactorForLiquidation": "0x58a728580355a6c6f82d3091d369b941e0376ff8b3d79274d71ad1d29d0748e2",
"minCollateralFactorForOpenInterestLong": "0x4279cffcd52e0915df8447175e708381712393531426166172e9a466f544ea6e",
@@ -1181,6 +1247,9 @@
"maxPositionImpactFactorPositive": "0x19d692d2b95d1189dba6f596c97673a944821958599797b977eb5408ce276ba3",
"maxPositionImpactFactorNegative": "0x36ed3cee02b2c2f532d0985c0ea3f92ed5e980ce06a1116a0b6f2f65fa0de69d",
"maxPositionImpactFactorForLiquidations": "0xc7ca98bf7ac93f2ca8dc4a8a99e99194279493898e08ebf4b7e8f6cfe0452d7c",
+ "maxLendableImpactFactor": "0x186d29173beb29e46af8507ad99c5439541dde2f0ee0c5daaa001ff1522560f4",
+ "maxLendableImpactFactorForWithdrawals": "0xe646136991d826f11c1fd55ac36d40ea073be24c6353d193a821948bb77807cf",
+ "maxLendableImpactUsd": "0xc2038495be0ecd8d1bda4b8095be40012716d2c89bd121fa47fb714fd43a3ff4",
"minCollateralFactor": "0x1cddd19b6c5ab7bac13bca435de5c29b7eb8b6d8f63653990ca7d124b6630211",
"minCollateralFactorForLiquidation": "0x59c09f1291f52daa4c169c57c3226ef99241adaf315a955970e8f7c25f3735a2",
"minCollateralFactorForOpenInterestLong": "0xf62a2cd524471634da150460345daeb42bcc47fc9a8b5ea5b1a581013edfef77",
@@ -1233,6 +1302,9 @@
"maxPositionImpactFactorPositive": "0x6823916303f2ab71c4c0c51d8ebe85bd81c3e041feeead165128a864338a7e2b",
"maxPositionImpactFactorNegative": "0xbea9f39702340352b6210661276d0196a3d4f0f52787211fdf3b2aa7e428ea83",
"maxPositionImpactFactorForLiquidations": "0x21fe4ef5e0d11726ac12f09444f2a2a5296577de3e50ecaf41f28796c2f315ed",
+ "maxLendableImpactFactor": "0x893c92528968bfdcb2a8db3a3fd0d59a0469784a6a49c05e26bbf0696d241251",
+ "maxLendableImpactFactorForWithdrawals": "0x7d85b777c2461c1a7e4da064d63497d13736603dd9f5325cf60cc03e87e4e1d3",
+ "maxLendableImpactUsd": "0x8a0266bb93a239abfff419f4b80eb82e728536bd984d277b856de7864bb9ace1",
"minCollateralFactor": "0xcc59cb6b61c7943f711dc18dfc2fa4726e3e0e23320769e9599a2362835575cd",
"minCollateralFactorForLiquidation": "0x917066ba7cd6f4221b0632336d34aded85c1e557fa3093cc7014cb86885d30fc",
"minCollateralFactorForOpenInterestLong": "0xd0b617f09379ad18f7bc551443b94d4b5c55e0023fb79c7165eec37289860743",
@@ -1285,6 +1357,9 @@
"maxPositionImpactFactorPositive": "0xe74534e23b02234d9c1b63786b1e0595a47d733a393bb45daaff8b82dc4937d4",
"maxPositionImpactFactorNegative": "0xe75fecd581da9d267408fb6b502d011f69de3d9d39119b2ab286e8856516bc22",
"maxPositionImpactFactorForLiquidations": "0x631fd71c9b5735e3fe95e1cacc9080c5cf9a54e0785e4f57040a029e36e71131",
+ "maxLendableImpactFactor": "0x5c1355c208968eb059ad9b5206638c84d384a7bd050a8a5bd779d176eb061ed1",
+ "maxLendableImpactFactorForWithdrawals": "0xaabc0fbaf18db25648fee631c4ed2517dd0441bda5c364f31c021fc0d69f7e34",
+ "maxLendableImpactUsd": "0x1583168790a4d36c333daa89d68788c041ea06b9d22f8175f90f241efee55e71",
"minCollateralFactor": "0xc887506d87b14983ab7ed186f9178fed3a134abbbe8245a13be07e42e313249e",
"minCollateralFactorForLiquidation": "0x306a88af5ce2a5f6da2d23fa1fc4da931f660d33ff5b01adb996552ee7a1d8bf",
"minCollateralFactorForOpenInterestLong": "0x974698c39aecd68284a0766fb070354eb0cc788557c000717eb1187a717a465e",
@@ -1337,6 +1412,9 @@
"maxPositionImpactFactorPositive": "0x417f05c74dda8045134d4ea5faa8558b54bd35e13417dad8988bac462d511986",
"maxPositionImpactFactorNegative": "0x8ca16c9c73994cd267eff2951818721a251b0c048efd9f87e97dee49a7b4960d",
"maxPositionImpactFactorForLiquidations": "0x0d1c038bdc72efeda626efe5e534102d4a9b352b46a778ae44aca00da277fde1",
+ "maxLendableImpactFactor": "0xe673faf468e6416b8c56ac71f23fdd068a2338d118d006721482a7ea1dda1206",
+ "maxLendableImpactFactorForWithdrawals": "0xe73a020ca1218e9283b00c7c0667640c24988729c31c72ae05f74ab52aff1bbb",
+ "maxLendableImpactUsd": "0xe8b581b93595f7d71c84dabb879ee50a8ef943c07755fbe6ed96a27d9419b169",
"minCollateralFactor": "0x306c4d11774ba8acc5857bc2b9eed4e6f4eaebd78ca19cc36c9e7543ee4e2baa",
"minCollateralFactorForLiquidation": "0xf999a6e4677e32df80732fac308066abf0b941fa1b8de71fa6ca65c62766fe19",
"minCollateralFactorForOpenInterestLong": "0x1a91d60f924b7371fe96dc19aec25c04a3c778b64b02909898c8ba552f8f8d74",
@@ -1389,6 +1467,9 @@
"maxPositionImpactFactorPositive": "0x92c555de2df6a801fca90169a37445fa9e1b6127ad2b24e9aae09e610daa64d8",
"maxPositionImpactFactorNegative": "0x836e6ed579eef0ce940ce76d025708ed4872eb6897ffdbecbaeba7d3a54e5a90",
"maxPositionImpactFactorForLiquidations": "0x52fb95366a88cf85b51d86af2a6aaca9b2a742d85554af7cbe67a75a2a683f1c",
+ "maxLendableImpactFactor": "0x50bd4bfb7307a385bd505be86ebdd20719b391325c8092ec079e46e0b391d514",
+ "maxLendableImpactFactorForWithdrawals": "0xdd7e3e401c46e60998a084f097c1db69203022f848eb4c0b2699bb9925b7572b",
+ "maxLendableImpactUsd": "0x5fbd94369fc89ae1535ac8c26187fd9566d8bff81ec7c12e8bb0a71480eaa81a",
"minCollateralFactor": "0xf222dcd515762a01b5dcd95d0d7bf6220adebaeeca37241b2334aec31858d008",
"minCollateralFactorForLiquidation": "0x9a80dc36f347f59c5ebe196f2c8ec5e2915f9143d378ee582a5421ce121bb69e",
"minCollateralFactorForOpenInterestLong": "0x159b5efb14ba5fdf82eb9483ce36a5cc511603ddc0851867d2f62e061a1eb5a5",
@@ -1441,6 +1522,9 @@
"maxPositionImpactFactorPositive": "0x054407c473f235dea7a7f175def0de1c030b1617f399a34315331710b5dc0c72",
"maxPositionImpactFactorNegative": "0x7a7bd10cbcf566e8e80449dbcb0b9461c37aa3ca35e289a7f2777b1cf04b2a68",
"maxPositionImpactFactorForLiquidations": "0x5c8317b7e68038721e2b6020e3d99c388914cf6acf570fde1ceacc34bc2abef4",
+ "maxLendableImpactFactor": "0x0eafdffb45f992eecaba504f59d5b5274c6097c4755e607272d17d0b7526da97",
+ "maxLendableImpactFactorForWithdrawals": "0x7b9e2471dc5e5527de90ac527bcb204e159a4e800416d8f50b202df161e71e1e",
+ "maxLendableImpactUsd": "0x5e1be6e2cd707a9073c0528e7bb5f4878fdae6b4fdaae7b22e7757c70ba1d508",
"minCollateralFactor": "0x37c9327170636d2644b4aef9428093a4b840396c017062d69214990437f11295",
"minCollateralFactorForLiquidation": "0x6427bd32e101cea4a95641d89d9c833ff5045eec210d362d5a271894653c6bfb",
"minCollateralFactorForOpenInterestLong": "0x3037baca9542bb9bf19e795a3ea8588f62fd7aa7f391835394eb39113b24f199",
@@ -1493,6 +1577,9 @@
"maxPositionImpactFactorPositive": "0x5d881863abefde1acac40bd9a69e9985a6946e409beee4bc2b1c250afcac9c0f",
"maxPositionImpactFactorNegative": "0x4d5ed30598d7ad750ac5cbb67c1cc9f880103986f5778a65104f0c0a2feb5b0e",
"maxPositionImpactFactorForLiquidations": "0x39c2c99bcc2c851bd93b362e0d6854420c9d73c24c2a64655fe575897284a5af",
+ "maxLendableImpactFactor": "0xafebff4ab40589e68a893108e1eca470ee021f6cf38fac40a564a47689a60145",
+ "maxLendableImpactFactorForWithdrawals": "0xe44b633524783518c74f5a088a5934399ae847c0dbc9d804dd6f1e2b0cca9771",
+ "maxLendableImpactUsd": "0x821fde56a37c89cb5a9277f0897836a1cae8b3a61c46528261926617d51fdc25",
"minCollateralFactor": "0x26cf36b642d845e4537b703e1988ec4f179852681fa1da1da83f0c4f07aaa277",
"minCollateralFactorForLiquidation": "0x6af824714604d471f55475449bcebc7aa7b3aca42f27ceba6c7d803506af84c3",
"minCollateralFactorForOpenInterestLong": "0x093de38ced41ca0b1ed4b1125b61d2b919957df4784cfd03a2bec7169efe69d4",
@@ -1545,6 +1632,9 @@
"maxPositionImpactFactorPositive": "0xfe35d1068a4bf727664f3683964a8585efa69f42b3fa05eb9bf95678e5fd0e9e",
"maxPositionImpactFactorNegative": "0x8559fb313fda3675ef298adde1583c8eed97bc729c3f1797b4238c7e0b169ec8",
"maxPositionImpactFactorForLiquidations": "0xf224c1634c4a4f1e74b27f1f86b940b3848610a8742fe6e05a979282184a8320",
+ "maxLendableImpactFactor": "0x4cb347550b736035c5556779419d724c8c41b3e914a948e225c03ae1f7b99715",
+ "maxLendableImpactFactorForWithdrawals": "0x96916ca557ff5867c9842839682a863984bb584c9cc3b81e67d5c89d65791417",
+ "maxLendableImpactUsd": "0x90c4b4a43e31fb0fda3a72f64fe6f592493a7ec4ce8713ddb9a904bde23095ba",
"minCollateralFactor": "0x9796d33d6fd886b0f785e0e524e2b25f1e7c291b682ece47fe5ae62611e448cc",
"minCollateralFactorForLiquidation": "0x3393a73bc28e5c25db9ac6cb5d316468446a57bc0eab962823b7b1e58e0205ed",
"minCollateralFactorForOpenInterestLong": "0x1677f8025e1e4279b5a1db64264a79835c58c80818191018a56890aa23e9416d",
@@ -1597,6 +1687,9 @@
"maxPositionImpactFactorPositive": "0x83cfcad7830ac109e2d615c46c7061e128c7ecedbaa7b2eaa0f9c37fc1685633",
"maxPositionImpactFactorNegative": "0xdb820abf9ef22cfc064719c1e3f14e54fe667051dd75f879853d5b9181d866ba",
"maxPositionImpactFactorForLiquidations": "0x287b8c27f13d7884cb5147e3748649d0fa2072aad502b1a578d4927b4d908e98",
+ "maxLendableImpactFactor": "0xa384ae723aebe010b544d776903a19dbdf526c96a6269378389805872b13077e",
+ "maxLendableImpactFactorForWithdrawals": "0xc42aa701db13972c5846ace00f090eca1caec9e2fe83498a10ca01c637a48878",
+ "maxLendableImpactUsd": "0xb082c68f34392068dec1fd23f594d0e9232e6a4cafd65ace1fff7de68254942a",
"minCollateralFactor": "0xdfe35a4a7d6fcea0730ea6a1d1296f1e1186dcdab4fec5c377a43ce80f26992b",
"minCollateralFactorForLiquidation": "0x70b5c091c0658a67df16c7e57093a054c69c4e6d02e411141176276f33a3517f",
"minCollateralFactorForOpenInterestLong": "0x28e3fb3d6672b82c0d07651dc08f2dc5b1a60a464edcc11c4ea8b5e0421cb3e7",
@@ -1649,6 +1742,9 @@
"maxPositionImpactFactorPositive": "0xed918a7f0b5755162e808591716e05d3b487c7039d952e15ac9acd2a92c961c6",
"maxPositionImpactFactorNegative": "0x4e865b46729b1650053cd17db3a4367ab0184d8d12518ac0a29217034b6c2950",
"maxPositionImpactFactorForLiquidations": "0xa9251e003d2653e3c04825e915d3cc179577d520b90c0214fd4f656c94ea579f",
+ "maxLendableImpactFactor": "0xf44d56ce7e139490f7b7a4310497c507fcd82e006e6b7b93f2de4ee91278b911",
+ "maxLendableImpactFactorForWithdrawals": "0x229e5e1def9c9266dd5c3e7d22f10393319821c27fe674770002dfdb9dd30c3a",
+ "maxLendableImpactUsd": "0x476dabd1519700890e85a295007d0980df5d982e1e43daa18ebd3fdf91b32a5d",
"minCollateralFactor": "0x71a615ceb63b3067aa53360b743986465151e56e727f6963baeb6f4a25483e6f",
"minCollateralFactorForLiquidation": "0xb0d9ffa1e7e99f2fcef00b4b23323d9b2d060bab7c552c2e7e56c32a638309e7",
"minCollateralFactorForOpenInterestLong": "0x5b602b41a9133139c01e6d0627ad253da782dfa70d615dea06e636974c0d2190",
@@ -1701,6 +1797,9 @@
"maxPositionImpactFactorPositive": "0x7ad9019e284cfbcafb6a562e8c38d38afbf8ceb039fabbda946ab2c4016f27f7",
"maxPositionImpactFactorNegative": "0x7cd82495926051f9036de5ae9a571872375dba1755c20cb061227c8c7cfe1396",
"maxPositionImpactFactorForLiquidations": "0x990890ecc20200de9a1bd87598b95848787445930857aef49c72aab7ba037e97",
+ "maxLendableImpactFactor": "0xc20b6cbf996644c2edfbc13175a89c561b9a6eede297cf186e514e71d47fedc9",
+ "maxLendableImpactFactorForWithdrawals": "0xf4d8ec3322874c694e3e3a263efee74d7d2d26289153ea6359ffa0a99b2d79fa",
+ "maxLendableImpactUsd": "0x07ec6051ce67255d5560112358474ea5d701dfbe4a2e70245dbe06b842e552f2",
"minCollateralFactor": "0xc3e99d30df1bb7237cf5b6a371f53440e558f68381ad34cd7a39c8083f6835f3",
"minCollateralFactorForLiquidation": "0x2a0767e62c001f898fd730979111f1910f5191d8fad78cce263bdf4caa573131",
"minCollateralFactorForOpenInterestLong": "0xa9b976f225b7a1d9aa149a1674b712b8da2245e1d36f7e336a96c3794de912cc",
@@ -1753,6 +1852,9 @@
"maxPositionImpactFactorPositive": "0x19b6035bb9a91088962ca09e26b08a5bf95d95b97c90f4f98ce550cb3e280d23",
"maxPositionImpactFactorNegative": "0xf37ffd53b8ec3da5920c7e9003549490450e14e5f51725b0629e5dd81b4516a5",
"maxPositionImpactFactorForLiquidations": "0x768e1e0b9c1bee456110ec4ba84080574645b213cf3551ac1d0146c3fcf1ae78",
+ "maxLendableImpactFactor": "0xdf991481ba292a004f06af191f9ebb817694b2e7b12bfe21dc145fe72b321dd6",
+ "maxLendableImpactFactorForWithdrawals": "0x264dd9fe7edc154fc6ceeb16f6691474d0bbd1150ce2781e268f416b7737040c",
+ "maxLendableImpactUsd": "0x05dac597c6a585a40b6fd862a6ca41af6a8802157b0ff18cd2dd20bd349871e1",
"minCollateralFactor": "0x063c26170386b99ed813e28bbc466b472d58fbc4c565896708a259e15c426026",
"minCollateralFactorForLiquidation": "0x184f66f184f238b6d676e9de3e79ca166004e6e66c6ef5e51ee3ead951e11a5d",
"minCollateralFactorForOpenInterestLong": "0x49b7345940105477f772afb7f563688a99053ca3edca50f043ea031ef1bfa630",
@@ -1805,6 +1907,9 @@
"maxPositionImpactFactorPositive": "0x786d142f5056003f1e7cd12b82c7954ac0f65b0ddeee41aaab69846be14ba1be",
"maxPositionImpactFactorNegative": "0xbd154e1d9827e166d594ccb658c4b5babe79cdbcf980e65cd25c661aa87071dd",
"maxPositionImpactFactorForLiquidations": "0x10f4c29b08a9a5521940a0f61df0361c0a98e01e3be448bfc8a877fed3e66a67",
+ "maxLendableImpactFactor": "0xdff7d16f81d953b578a822edaabed7fb5ff494ea6094374791de6d5cb13773d0",
+ "maxLendableImpactFactorForWithdrawals": "0x4da16212d85f59f9b6708a03c1d3e84f5c264b72ccf4f9c364d6b4ac9f592650",
+ "maxLendableImpactUsd": "0x3eb8c05030e5c10e984bd45d2f23868fc2c4569788bad788ff4b540ee1e65f63",
"minCollateralFactor": "0xb30c0c9c615ca78136924ffcfd347ccbcfbd07cfbb066331490e171eb1a0a98f",
"minCollateralFactorForLiquidation": "0x716807f898c897a453ca05d0f2aa6ddcca6f7db64055b57f81c8e41ea7848fa3",
"minCollateralFactorForOpenInterestLong": "0xffea67e6c99a9d19d8e0fc2310bfa16b75cdc3634fa319d67a8ddedd5aaaab29",
@@ -1857,6 +1962,9 @@
"maxPositionImpactFactorPositive": "0x554195019be19dded2deebdf7bba714dedc29cf6194613468be1447e51a8aa7a",
"maxPositionImpactFactorNegative": "0x0c49426f88135deb7578441b1a06e9cd0458f2610f844a0e06ee61e846cfca66",
"maxPositionImpactFactorForLiquidations": "0x8d46a381a9692d246102e90ea5b4f53000b4f9407ec0d053e82d3a9ab324cecd",
+ "maxLendableImpactFactor": "0x79f4de524adfca59337487db23a19d9ce11471b5f0acaca903475028621ef792",
+ "maxLendableImpactFactorForWithdrawals": "0x943db693f24a5f67f6db804d36870b3f62823d87ee12f99076a832c8a6814aad",
+ "maxLendableImpactUsd": "0xf4158b055f1f0f76b4688b6f31e847b863fc03b6dae2bf72fb6d6a2c0bd98b5d",
"minCollateralFactor": "0xaf529b6d8c16416ab7e8dea0fee2c88b02a2582e96fd786c3c4aa1b6dd7ab315",
"minCollateralFactorForLiquidation": "0x3bb903a46ad84ce28b36d1c2d16311120b9390829b2edb3e8495b0ef53784c01",
"minCollateralFactorForOpenInterestLong": "0x4d83d368f9ff304adca7477a95605fca7d41bd25fb35ffdba3dc61e7bff2a83b",
@@ -1909,6 +2017,9 @@
"maxPositionImpactFactorPositive": "0xb24b2729d4b986448d34d3161d59c59e280251393ce4262181a2bf7b70e645a4",
"maxPositionImpactFactorNegative": "0x093f21e9a0ab2debd31074f3e73a51eae6adb17095a69777b31fbf09ee66794b",
"maxPositionImpactFactorForLiquidations": "0x6e206fd42772e8fe8a8835b6306583de3b225215da66ffddfff05e9fb823a8e4",
+ "maxLendableImpactFactor": "0x85aa7cfb347e01586d92dca985ea1a0e36b50a35e5c25d595b708f4fe001dd61",
+ "maxLendableImpactFactorForWithdrawals": "0x092a2d629322699c7ec10fde7e4c4064effacd509bb1a530cb300df8f2ec999a",
+ "maxLendableImpactUsd": "0xb3f6e2c9d5a0c535e6114a8218f072fe191dddc6b2197df078e7a4e1ac504fbf",
"minCollateralFactor": "0xde8e2683a32db2582bae01bac254fc9ffdf847f49c73f8e40d70831d516a0d63",
"minCollateralFactorForLiquidation": "0x1c9315aa7049bbb5d2b8bc32ed041d6e07526fc71e2658d12fc64700ba0a85cc",
"minCollateralFactorForOpenInterestLong": "0x2352a72b34e744b19d46183f2e17312f8c6d8e6e55ee031745c01426f29f46ec",
@@ -1961,6 +2072,9 @@
"maxPositionImpactFactorPositive": "0x19a1bd926c6151f48a05d3aac08ff880ab7bc87a6ed2b5292569196a64c4a525",
"maxPositionImpactFactorNegative": "0x431d4f40d2fffb4de5d661edcbc6b0e6554964ec51cff739f127f68ded07377d",
"maxPositionImpactFactorForLiquidations": "0x561b7c6b780552b688ab9f8e3bc96dbcc018702e3caff500fe80d5ffa9d62de3",
+ "maxLendableImpactFactor": "0xb04fe6a6c1deeac6f2a338514cd89d6c5c9e2c9486abb7be28cbc3412319e88d",
+ "maxLendableImpactFactorForWithdrawals": "0x0a0a26cb36e51ab9db31acafc82145edd6fe873661f62d861ccb84c15eed6e2a",
+ "maxLendableImpactUsd": "0x7bf131701265e68dea800bb92e5b2925a107dbd666d437e2cba416a10a63aea1",
"minCollateralFactor": "0xe12f227cd7530228e3e5fd17cc6e483d16da92b2a84c0e5ff1da9e812a5b165f",
"minCollateralFactorForLiquidation": "0x5424fa2cdf22e059599b3129445bc0af41411203cd1c67432b1676ab75977d3f",
"minCollateralFactorForOpenInterestLong": "0x17278babb19736222b2d9de676d18653ddf62c086d3665741aea4e5073e56fc6",
@@ -2013,6 +2127,9 @@
"maxPositionImpactFactorPositive": "0xc5830d4233c3c4b40396b597456329984dd1fa00d54ccc6a0ff3ed8ad24318ed",
"maxPositionImpactFactorNegative": "0xeac0372e3d88ea3b6591a48a239ca5cd3bec458c763374376558ae8de853c342",
"maxPositionImpactFactorForLiquidations": "0xdc60fe72bf55e425533f747c6952ba5d44777e6d701caf52570b3b72f481bc77",
+ "maxLendableImpactFactor": "0xac8263f8aad77e8440d7519e2ccb1bc6df8c27e3cd335fc293090929e8ccd9d4",
+ "maxLendableImpactFactorForWithdrawals": "0x4c498f0497fb8a82fb336a222ead9d6cd2dc6538bef226bbd9ea604d60745b63",
+ "maxLendableImpactUsd": "0xa40dd2d46fe34bb43d4cd0f4e47af87dd9e8416f5eaccf9b2ee8766839ed8715",
"minCollateralFactor": "0xd1a9d8c3945e025659b09a50bbdf19d4b9a115dadcc662b86b59a61af9e795ce",
"minCollateralFactorForLiquidation": "0xf753b5b18d0dd10ddf23bdd1059939f3879247e5f5e1c6b0352cb01bcf4cf5e2",
"minCollateralFactorForOpenInterestLong": "0xbf0cbbcddabe14afa33f3d923e06fc7c713ad118078f7e77f3d2bb9a8d648619",
@@ -2065,6 +2182,9 @@
"maxPositionImpactFactorPositive": "0x2d159b4e62a983c5c028f2c9257af7d9dc7813e54bb7ec68cb5abe37af1f8509",
"maxPositionImpactFactorNegative": "0xb09e57cdc10afaa5d73dcb0b84982faf2bb6fcc8ffce9dc77c3a70668dfe917a",
"maxPositionImpactFactorForLiquidations": "0x264ca4cdc35dd30b69ff7cb46b77b8e60659253ac3c1486a85acce86d758ad6d",
+ "maxLendableImpactFactor": "0xe71b2fe24fcb64b2aee6954430f838ba6446c64f61ce8df03ba35e2aeff60031",
+ "maxLendableImpactFactorForWithdrawals": "0xd00738ffc5c7205a5e40a094b0e53fc88107dba7dc1460e648c58d97d61474dd",
+ "maxLendableImpactUsd": "0x0df0549faf708fc4ac7c15268724150a810bd639c2503a582946fccd53ac76bb",
"minCollateralFactor": "0xeda57e7c9f036aced07cbf0300755e5a198f5b38b8f38709a4b3db66c6614d70",
"minCollateralFactorForLiquidation": "0xaab69b6b17ca07fc7c5e074a238946779c61ba7b06c80ab5ae092d0fa14f5d04",
"minCollateralFactorForOpenInterestLong": "0x4e55b36b90bb86b6c710c7a94743860cf086374614e1de9788b5d60f6f2af678",
@@ -2117,6 +2237,9 @@
"maxPositionImpactFactorPositive": "0xac08965b798a991c076440d2e2678d2e18bf6a22c4a1b7323eefbd345cbf2ddb",
"maxPositionImpactFactorNegative": "0x8e393b5ffccbfaaf16c5ae93cd98901ec890efb2554a03fb723c082280ab2991",
"maxPositionImpactFactorForLiquidations": "0xdcab036d83ec75c77aac09db90596f2b3ad8bb2fa8f908917acff8c9c702822d",
+ "maxLendableImpactFactor": "0xa4f62f601d3256e54696361f07a5311f84a99bad5aab511eaec3462fcd04a27f",
+ "maxLendableImpactFactorForWithdrawals": "0x2e7060aa7c0e96af71f094bc2fdee585d9fb1cc58bd9d06616040b634f612a5c",
+ "maxLendableImpactUsd": "0xb6636bd7d6c845b8e827c4737a6046dcc18f33ca9fc08e3e632b4fc0f6d298aa",
"minCollateralFactor": "0x77bde089799540169026c8dd1d4ae2e2128599fd8b9e31446c4dcc83bb9c23e7",
"minCollateralFactorForLiquidation": "0x07395d2acf2523661f22bac10669c8a51ca55b1618d2d5d8f9e293fce20539de",
"minCollateralFactorForOpenInterestLong": "0x36e72daab303600b4522ff9c0d0bb9a1eaf31c1cce97b8ae17084f0ebefe5924",
@@ -2169,6 +2292,9 @@
"maxPositionImpactFactorPositive": "0x8c12b034ee8ad6fc1164338e82528933622843f83631cef944038173ec07125f",
"maxPositionImpactFactorNegative": "0x812b06e8a9ae30129f248baa9f7e032708f037b1138d7f487060bca9cb4287f6",
"maxPositionImpactFactorForLiquidations": "0xf129060dfcad1deca65540e0b1641443a5f0fcec26235aa946eacb088c0eadf2",
+ "maxLendableImpactFactor": "0x2e64eee7491505d680b57c4c65166533cc03a150e3aaa4f6b886de62ca91baad",
+ "maxLendableImpactFactorForWithdrawals": "0xb16b9e1df74cf0b2170913a3fbe6983fdad89a333d154b095e3e2f0666b7d8cb",
+ "maxLendableImpactUsd": "0xd351d973906e71859bd3af9cf85c2cce74231224edd2c67726a5a3bd39e7dd30",
"minCollateralFactor": "0x64c28b87c54a43b52e4e78491ecc0749386e5fa99986c78e5855e4e0039fdd01",
"minCollateralFactorForLiquidation": "0x80c09ef7c9fd9bd8cfac4a4dfea9a09e895612ea378f41668a753350c6932f69",
"minCollateralFactorForOpenInterestLong": "0xb1f9e034cd8013cd53cef9f0bdec7c7bdbc4db862e555e88eb9d1cf5e6511956",
@@ -2221,6 +2347,9 @@
"maxPositionImpactFactorPositive": "0xb0a73010ecdba53705c694d2f936d18e4a05df0f17c700bdace6271ca813c9a3",
"maxPositionImpactFactorNegative": "0xd5e633acde47db2e2ffff00c56aa46345ef121f1a456f1d77b79706719b2c3f6",
"maxPositionImpactFactorForLiquidations": "0xb9f158697849b94901cc34c765b0796456aef9657a895abbbc4da40e752e6e89",
+ "maxLendableImpactFactor": "0xae87f11395854df27730c03627fe9fa049226d435b0408025dcfb489fcf06a0c",
+ "maxLendableImpactFactorForWithdrawals": "0xd43e4b0d9ebf88c4144b022f8d3241dab3b5c39e4351eee9674cc079ed8df106",
+ "maxLendableImpactUsd": "0xf45c560e511f5fe46d095ba361ff156cb4a0f51a14bc5edd67ef771816704a80",
"minCollateralFactor": "0xe987e328f86edb1ddbe92a10a5a8ed7cc9e27012a3f8eacabb95015d8d4a5029",
"minCollateralFactorForLiquidation": "0xa872cd93df49b89091c0c052b1f9816b051bc3c837802ad34c28a32716a65cf2",
"minCollateralFactorForOpenInterestLong": "0x43fd25f73c5ad7cfa51e170a8e62c4b5267f167b881d77c8db40d0fff9b0cbfd",
@@ -2273,6 +2402,9 @@
"maxPositionImpactFactorPositive": "0x01e8f1ec1cca444aff7fb4841c5e04551eca12a3e3f40d802057aea21b946eec",
"maxPositionImpactFactorNegative": "0x428bc3887bc7489c9485260579d0e0763d783139851ee3f18a14d55cc74cec96",
"maxPositionImpactFactorForLiquidations": "0x309b153983005d88ec9b50ee2d382f58b3d94dbf502ebac9a1df9200f806f7a4",
+ "maxLendableImpactFactor": "0xabeef6af10a3f56b35364626ee2ce74ac4b2fc5e5c73249ff5d2821ee2b4389c",
+ "maxLendableImpactFactorForWithdrawals": "0x99773bf20f3592fbba4ae7d96470d273aedbbc7be2a59f8e0b937733aaa35bfa",
+ "maxLendableImpactUsd": "0x45a363babd50926907d227376a252d13abf447ed356916cbfcae1ad20d79a858",
"minCollateralFactor": "0x4f281cdc49e1f75ea1a028c8c23e00c1331011026e794caf8547cdcfc8afbdd6",
"minCollateralFactorForLiquidation": "0x17804f6665dca57aaf8fefd6e6134d40f30afe8dae60b79da13190d4ca798641",
"minCollateralFactorForOpenInterestLong": "0xb41bba385bea8b61ee3a31a77f9b22ca93ddd1ddd4c0b2122a1479c41245a918",
@@ -2325,6 +2457,9 @@
"maxPositionImpactFactorPositive": "0x1ceebfd867b9918efbe8423ec199d06ce78ca441d305aa9662d3764ab7a9faf5",
"maxPositionImpactFactorNegative": "0xcf7ee5b0a80d4662ffda30f4d157d17612195104d15bb91bee6de03ae3e3599e",
"maxPositionImpactFactorForLiquidations": "0x930f7239b83bc0b01c885d62e1739adb7f47483b2f95d68cb6ae0586991421d0",
+ "maxLendableImpactFactor": "0x761ab4d85c8d02769f1892e9544527e03bf6c30f447f04de8536fe2f3c8700a1",
+ "maxLendableImpactFactorForWithdrawals": "0x760851489978dd8127b1ee813fc067383fa463de207a6ba4fae5d02888dc1d65",
+ "maxLendableImpactUsd": "0x3fa3b2f9d004c88d67722537d6e17392f8c8dbb12709f592ff982371c6bcd483",
"minCollateralFactor": "0x6e2e2d9c129dee202f1002e2c7b8fa62b854c04ed92b2e84ccc8d7874d1d2b82",
"minCollateralFactorForLiquidation": "0xe95b93b905611839520fd90f7f70626dda38eac36b11245e48bd0013c4a96ca8",
"minCollateralFactorForOpenInterestLong": "0xc777cb82bf5fcf2085423ebb02d83a2e797ee69fe92e28bb541585d6d3ef9776",
@@ -2377,6 +2512,9 @@
"maxPositionImpactFactorPositive": "0x66f52be66a69bc53a3985ef3c01c7c7906e8b0ab5b51f155f5fb827401b8c716",
"maxPositionImpactFactorNegative": "0x3ffb5d3349a72f3953a21481cbed2007a44e98153f737f733789c1fc3db6109b",
"maxPositionImpactFactorForLiquidations": "0x47b22aaab270336bca023ac06e6b5231bbb44f56716a9387e91e99241870f616",
+ "maxLendableImpactFactor": "0x8f2d0ed4f96fe24ed2d9c8dd642fb1acfc10a5567e47c4787f50deef6de62e22",
+ "maxLendableImpactFactorForWithdrawals": "0x2ba1e6446967b1ea874ebf51400cc46af88e33787ed9d452ff0bd45e47e3e0d9",
+ "maxLendableImpactUsd": "0x2997295762567bfb9f36140349930ff5febba89eb2aae6d21e157d82bd601168",
"minCollateralFactor": "0xc27860b61b54460909bb28e4c88e66aa1d27de104b8b444fba674362795a4068",
"minCollateralFactorForLiquidation": "0xefd57fd6c01e403503503b2f4e057243ce629c1fbb965350bc5b699db54e3515",
"minCollateralFactorForOpenInterestLong": "0x3e352a600ba2709aa41ad9fe571943bf3119a5d4e2ed56b8d9c26f6b61c24df4",
@@ -2429,6 +2567,9 @@
"maxPositionImpactFactorPositive": "0xcdbb8852bd100d2a2c9e96c3df6c8a3a1fa5166d2b0e6c0a026ff47efdfcec3d",
"maxPositionImpactFactorNegative": "0x02b2d57b10ba38e67b996de41580805338380c5a38991b67cca1d5cd26ae8245",
"maxPositionImpactFactorForLiquidations": "0x60a9b69a9726114c020d44750e3d51dfa117631eef925c2e5bb7d90a8bf0f16d",
+ "maxLendableImpactFactor": "0x280acb1c344ac555de42d4466eff401fd585fa62c27a0d1e3bf74c6a52e90731",
+ "maxLendableImpactFactorForWithdrawals": "0xce052928845fde42d14590daf8b4b29cec8ba7f4ef1fc3767ec4c2c8882aa57a",
+ "maxLendableImpactUsd": "0x32a2ddb5e22d3feceeffa3c959588640a038d3fcf8e70f27b9903c36ba56ada9",
"minCollateralFactor": "0xaf43ec1b76b9c6c2c5167932b08308377bec48ef36aee9e4f40bf44013315ea6",
"minCollateralFactorForLiquidation": "0x751618cd5038dcbf1a35c7b6a4fad895b25d3c85860a57fd5e6f5f677ec85bba",
"minCollateralFactorForOpenInterestLong": "0x1b990975b2ec9cb3d7800bdcf4c2483ad891a580d9bb318b533b40c52c2f9ba8",
@@ -2481,6 +2622,9 @@
"maxPositionImpactFactorPositive": "0xb6030074cf76d818b5e23fff7d930392bdfaff530804a4c269f43ea0c743bdcb",
"maxPositionImpactFactorNegative": "0xf788cd2f0dbfdde4498546dbbf8ae4c3d7f72390ee8ea10079f0a24b88ecf064",
"maxPositionImpactFactorForLiquidations": "0xd9d7a07c1d5606567f0366e489c3262b466af8fe55e8608cf926ee705da17b6f",
+ "maxLendableImpactFactor": "0x9bde08cd019f4d098e8014d5b59827bf15a02053eb110a570e17724780fef0ec",
+ "maxLendableImpactFactorForWithdrawals": "0x6e3e2275f3536b7802157f33a7463a6e30962c362542dd877c9c77b3b035535b",
+ "maxLendableImpactUsd": "0x7b3e8843f6bf26cb9724c627ea4e654dc7617e1582e78ce5405bffa27e3a4793",
"minCollateralFactor": "0xacfac03e8ca9bc9ba4e4139fb22189ce60223a4acf5fcb1c52fe6f5720c8285c",
"minCollateralFactorForLiquidation": "0x0e0c4eca25323de2ad594c25be09587a84873207c577ed3466d2c25c5c588307",
"minCollateralFactorForOpenInterestLong": "0x7aba0e66c4752d2788a33b21c7156bee0a7e7db1ddec971a23e4745cb4af6a44",
@@ -2533,6 +2677,9 @@
"maxPositionImpactFactorPositive": "0x985ded2301ade7f01d33f689a689b151bc07de2912a960554b32ff02786eaeb3",
"maxPositionImpactFactorNegative": "0x9f08921887c462f296204ce4faf11345ac3175e596f6d544cc8b93fef3d4d0a2",
"maxPositionImpactFactorForLiquidations": "0xa7b0973d0ec6caacca6e19044c9914fa639d36bc97ce2751e18c9ec3328bee16",
+ "maxLendableImpactFactor": "0x5073ac467dc2c2772cef5a355213369d78663bf0cb05153167e39db26e383c48",
+ "maxLendableImpactFactorForWithdrawals": "0xea083ff57c4f2b40a56513c09f35108e64c3c8a55d5b9c85b4e8c5162d846020",
+ "maxLendableImpactUsd": "0x823fee4780ac0aacc1528039fc1ae323c007c04cb5f641d08bf1e7d97fe04bc9",
"minCollateralFactor": "0x6dc630ed9d38eb4d509bd15a962a8f3f3e85c305ed38bd87b5a691f8e80c6718",
"minCollateralFactorForLiquidation": "0x5e72cbdf15c7c2759bcf483ad4e11e757e1be816fb2cfb21d0a451017677e93f",
"minCollateralFactorForOpenInterestLong": "0xe92ef25b6ac87cf0fe6420ff0b94dedb1dbcb99afdf6c01f4b0db2532a75bcfe",
@@ -2585,6 +2732,9 @@
"maxPositionImpactFactorPositive": "0xd17fe776c6710be10212b8230e5bc255c13cc6af2b50cac277a13f8c4d6cd675",
"maxPositionImpactFactorNegative": "0x9516040fbf31d98a9814482b56244c126fbf03066c9b2d2c2f8a456b1453fd77",
"maxPositionImpactFactorForLiquidations": "0x3e8a22ffba6968744d62efd7de40d2472b6624acad87770d5dd4ef10357b4555",
+ "maxLendableImpactFactor": "0x1b745ff1648a88505d8071fd9f56d0ac11fad07ea60590542c7b725466cab15e",
+ "maxLendableImpactFactorForWithdrawals": "0x13e180d1a458621dc1a012653d5c163bfc736196ab576bd438f57fe9ad4936d7",
+ "maxLendableImpactUsd": "0xe4bbdea4d6f47bfe9357d37aee197ecc5b66673f6c585cb4cc723a12dd0557dd",
"minCollateralFactor": "0xde6358bbb99972ed5e13eab04486dbe4a4fc8610e3b7c77b120e6bd807cd78b4",
"minCollateralFactorForLiquidation": "0xb62e8ac26d1c39798214c05ecd3b4d2dc5d3af8866088b3f315949b47730a843",
"minCollateralFactorForOpenInterestLong": "0xe51ceab2786b6da44608fcf1c9da64d1760bf55d57ff7ea1f9376b82886cbb20",
@@ -2637,6 +2787,9 @@
"maxPositionImpactFactorPositive": "0xf859b25857e23b61ee284c499197fb6f73683db766cd2b2637edd28191f7e629",
"maxPositionImpactFactorNegative": "0x0e36c4bf7768cf3820f171278211a65d274cc60972a4f72ea6c28f3836763f53",
"maxPositionImpactFactorForLiquidations": "0xf74bf32733bb1d7982b56ad9de64a3908e498950b3f5dfc5014b11b0a824c574",
+ "maxLendableImpactFactor": "0x4e8f427a15641a64d02c069e41212d767f084cf5beb7cdeee73087b51caa18d3",
+ "maxLendableImpactFactorForWithdrawals": "0x88f85dfc2b759826e747760206e5bb4ace1299758e3b3bd5627bf8306211d108",
+ "maxLendableImpactUsd": "0x7a6801727c0d162294cc14fa0727bf7580c8c9ad479bd4c1f1725b4d6c6641f2",
"minCollateralFactor": "0xa8f02a22712a973ce74cc208414ed1f87bff38cccb528fe8aa5dfaaac33387ff",
"minCollateralFactorForLiquidation": "0x4d588606a1bcba8846d247f4195a5ef8db551e3172b7588dda7a762c4b02dc5c",
"minCollateralFactorForOpenInterestLong": "0xf326ae64850d57c362abbe3e1a2223c94f4a69b17e96139800b5016fe434d4ba",
@@ -2689,6 +2842,9 @@
"maxPositionImpactFactorPositive": "0xe24fe8e0a7bf583053b0850fa5a89ae870e0f4c7f1056a941f3c5119e9b626de",
"maxPositionImpactFactorNegative": "0xea48c7733e09bd6c42892be2c6c63cc52eddf6bd2414e6454843803c853b8a98",
"maxPositionImpactFactorForLiquidations": "0x1047ffbe213559d8d5e64a95f8b790cf9b5f58837998080930284ebe9d5d167e",
+ "maxLendableImpactFactor": "0x910deff99a9c7c4041bcbe7140c4fbc75eb27109d1643f2ac719094e026cce79",
+ "maxLendableImpactFactorForWithdrawals": "0xd4689134121be2f40b99593ec0c6cfb536e1c4472ab5f317b4e3de13fff577f3",
+ "maxLendableImpactUsd": "0x228ccbaab0faf5b2247fc5c7bb3bdf152ea87deef6a048ee3d574242d15823ed",
"minCollateralFactor": "0x381baf1ffa3e7466635bafa799da30f2b9b7d274d6c5373aed1627655f1c84cc",
"minCollateralFactorForLiquidation": "0x09f7ab7442e66755f5bfd66d2e3eb08ec1ce60a9fe6f6369b638528f70c6e25f",
"minCollateralFactorForOpenInterestLong": "0x7c973b82d160218ec7405501b5ddc34bb772866294bff340a0046a665e2247d3",
@@ -2741,6 +2897,9 @@
"maxPositionImpactFactorPositive": "0x9e02885d6622621808b0428cad1e6f86b729d3743d3f4917ca6887d62137b8a9",
"maxPositionImpactFactorNegative": "0x5fcadf11f64a3fd603c4947b84d914fcf8213538b9a8108cb154f3826d849cb8",
"maxPositionImpactFactorForLiquidations": "0x6215ceff639dd1317d038fbaaef7e547ab0a4bcc7797721073a0d8aa4787df86",
+ "maxLendableImpactFactor": "0xdaaf876a03460b3249d6fed5b583e70757f5483e9fa0198c32ccb8a3a959750f",
+ "maxLendableImpactFactorForWithdrawals": "0x33df74336a7404127079f5c81aa656bce170179bba7b35e9563f727c6859bdcc",
+ "maxLendableImpactUsd": "0x3101e2eeb89e61a703e9aa3a52542bd271dcf019a3025afc14196a278393fd9a",
"minCollateralFactor": "0x20d8ab78d0283316afeab33bf731344b07da86f7203514d76ee23baee753707e",
"minCollateralFactorForLiquidation": "0x4678d0672e6f710a1b949e87f9d131a666582b002ba33e4611370cb314c4fbbe",
"minCollateralFactorForOpenInterestLong": "0xb67d83d1aa168418e39a9e63db05fc226ef950870c88cef6489ba60614555ec3",
@@ -2793,6 +2952,9 @@
"maxPositionImpactFactorPositive": "0x68831a394cdb16c32bf312f5c948d383c58754a438caaaf51383d97ab6c97e4d",
"maxPositionImpactFactorNegative": "0x18e0e262a34ad1142f0be76b66ed8c655241d4b2d0e4f2d453b1fe347d1b21c7",
"maxPositionImpactFactorForLiquidations": "0x190906736b8dfbfb8905e01464105472a332ab43303122acea7d280f99a89e58",
+ "maxLendableImpactFactor": "0x81e057e65b35d424b515c9d77bf4026c3427d140b9419c6200ba809dd4f2f419",
+ "maxLendableImpactFactorForWithdrawals": "0x906e115c1e1eb40ac022f964967ddeeba02b0c78951d5e016a2286fe6a611cd1",
+ "maxLendableImpactUsd": "0x31d2e65ebed0c8f9c4a1c7647640fcb6cd873429e923ab11432bad93b9f5098b",
"minCollateralFactor": "0x464c137d7e96e96fcec38af328f9f2e20e1ec3ca751b7e347850ba39d3c519c2",
"minCollateralFactorForLiquidation": "0x63f56c8c49720b8c624535a0612b2838aa6c2fd809d28660be826e5593a84ab5",
"minCollateralFactorForOpenInterestLong": "0xac1d1a8dd04b4b1ce72264801861bb8c24d7085a54a992bd00af1c678dab9606",
@@ -2845,6 +3007,9 @@
"maxPositionImpactFactorPositive": "0x4830dab4380c54ddb0ef53e357ed6fa3a58a90317544a59a3a4672828f16a9c6",
"maxPositionImpactFactorNegative": "0x84a8dab8863b30af4f8f17deeb4e8e04e13f946d4486fa1865ac74974b5ad824",
"maxPositionImpactFactorForLiquidations": "0x2a86139fe39821bccc6fd82f93be035edc70f4cb61cdae30917956b8ffce8243",
+ "maxLendableImpactFactor": "0x7b2838de670aaddf75fc39a8e07ebb8b9ee6df9ff61c2818e8aea056458b8ba8",
+ "maxLendableImpactFactorForWithdrawals": "0x6ff0d20259999b453cd3b269bd10324de0c37d28038acbbf876429482dc00a97",
+ "maxLendableImpactUsd": "0x8a6e25ea26a52c10705407eb6152e0047ebf18a901143d38d52873163db1a069",
"minCollateralFactor": "0x68a19f588c4ad0d3e1ee1c870ff0c3d4600a57e7be82732621425395992cbde1",
"minCollateralFactorForLiquidation": "0x7bfa38b3b418ccf0e7148ef4f83761ef84dfac2ede0009121e61a79cca9a8869",
"minCollateralFactorForOpenInterestLong": "0x3b95e2164fa00e54a136f46ac7791ab382b33ca305385943a18908b26110b691",
@@ -2897,6 +3062,9 @@
"maxPositionImpactFactorPositive": "0x951fa1a7252ce2217d6e71fdf8b445f94f389b7b73ecf1297df051acf958fbc3",
"maxPositionImpactFactorNegative": "0xe7b058ca894961f4f40dc9e2566920dfce773f64c438b5d415c1176f92a8b4bd",
"maxPositionImpactFactorForLiquidations": "0x6aac356dc62435be1465f2f736baa23e6ee3db9636a0dadfa42494493729693f",
+ "maxLendableImpactFactor": "0xd8bd66997d12ba501a38b32b2d8f229fc3de3d67c9244a6153ab1183468f20c7",
+ "maxLendableImpactFactorForWithdrawals": "0x519789779c6ac9e09dac42534471068f2f66ba3af0bf3e9bbcc7f5dcb8723c1f",
+ "maxLendableImpactUsd": "0x67d08113992d07e0d31c1d901044d8106805e2b0a9dad9bf7bc799ef06417e53",
"minCollateralFactor": "0xf57f95847b05863e3bb30297592097fcf7c8b2a2e25dec83ec531b914747bb4b",
"minCollateralFactorForLiquidation": "0xda84c5039b11ba8791d306f10ba8eb5897908ddfb3553dd90ae15b19a34558ea",
"minCollateralFactorForOpenInterestLong": "0x7ee7a2ce8cf97ae51b250ef153c4e47b752fe2a51865364cd7e5e0d96213560a",
@@ -2949,6 +3117,9 @@
"maxPositionImpactFactorPositive": "0xdd5137f15d530282126920738b90327f8b0900665509f7244b3f790125559213",
"maxPositionImpactFactorNegative": "0x2240a4aec542c64a8ce2af813d9ffcce8a3cb53c501e67bb56c19e292105d1ec",
"maxPositionImpactFactorForLiquidations": "0xa4fe55cb4ba68ec434258ec31884b8f617ae8d1c8f6d0fff7fd9ddb535812722",
+ "maxLendableImpactFactor": "0xaceaa6ad7a40f895b33159fef9d68e6541bae7e2809915eba26d0866ad3a3c7e",
+ "maxLendableImpactFactorForWithdrawals": "0x5dfd61350cb491e144e2503d41570158cb53a420b25d81a1a3c085595ab3ebce",
+ "maxLendableImpactUsd": "0x1a15338129bd487248d0aed2daa8622bd892913b84243c6f2d80e4be9722ea85",
"minCollateralFactor": "0x876a4e9018e1ba1655bb96f13e4ca16365b7a5ad565f3f2005205f84cc1df97f",
"minCollateralFactorForLiquidation": "0x46faae59a599d91c70cf77626c8a6d97ddf7017fec20821a1d6cdbaa485a9178",
"minCollateralFactorForOpenInterestLong": "0xdbe85b764eb648e48f9fc7ee2ca91b67515bd3c9e5093fc110b0db61825fc00b",
@@ -3001,6 +3172,9 @@
"maxPositionImpactFactorPositive": "0x16df3f537a8c0c960d6eb333e2954d65c3ca572a594869e3d2e770d2ea872c69",
"maxPositionImpactFactorNegative": "0xf73adfe3484d77447f9965114289574d908d3939379f298a8b6c60c3391f4a70",
"maxPositionImpactFactorForLiquidations": "0x603199403c207ee830b69e57605b19208e115487aaea260ba310330df2976383",
+ "maxLendableImpactFactor": "0xc27401710cef786e506dc79ea1f00389be98e1816acb10be44c34bb83432e01c",
+ "maxLendableImpactFactorForWithdrawals": "0xad60473e5dec097f1450caba4b97a0d3c5ce91549067ae465f31c08914b1d28a",
+ "maxLendableImpactUsd": "0x503a20bd9e89616ebb0c2f629d49ae2fb07d4552848f62dba0befbc3cfd339f5",
"minCollateralFactor": "0xf8b84b1cf5ca5b669e90e9fa97bc22a784f39654433ffaf839591bbb9fba803d",
"minCollateralFactorForLiquidation": "0xdccb44a6021a756a790c10935251bd0bc376b3969322208dc9af6c87e11f56b8",
"minCollateralFactorForOpenInterestLong": "0x74c0a14f2a215ff8ff5908b12fbaa3065d35c06a533007ed5e577223ebf46e4b",
@@ -3053,6 +3227,9 @@
"maxPositionImpactFactorPositive": "0x96f96a3dcbac9181d1291533d01cfb863334e4841412fd3bbb89fc252fca1590",
"maxPositionImpactFactorNegative": "0xd2ec0dd1d422983089f9f513b3ee1983a2771a7d3420becdffb6ecbb6b07e82d",
"maxPositionImpactFactorForLiquidations": "0xab08f01b9295494f0d6e576dce047ae84eee136a8c3b2c5302812a75c65b018b",
+ "maxLendableImpactFactor": "0xa8f2560e946160759082aaa313cd2c092a0b062e95cc01a2070211a0e9199cf2",
+ "maxLendableImpactFactorForWithdrawals": "0x4a5efe9a5faf160836b4b55a024b41157e0be5a5fd38f96fd854fbf79d809d4f",
+ "maxLendableImpactUsd": "0x70d4966337c2ecb624614d2358cb2865b871651eb6eda2f17d2fcfa80341f90b",
"minCollateralFactor": "0xe9bee751eeaee778244a0b05e5dea9741d42b8f60a6527812d559db10378364c",
"minCollateralFactorForLiquidation": "0xf8251492b7b09de9de757e6c12b0417e0e8afc7471ea341141af2c59de187e55",
"minCollateralFactorForOpenInterestLong": "0xa588997b3b52f45c5ae3dd23491184ecdd8c73a4a3ad208d2d9b4b83d653cf2e",
@@ -3105,6 +3282,9 @@
"maxPositionImpactFactorPositive": "0x82fd63cb2e91678055b06933cdfb846823e9c3b1481501047881465cb095afc2",
"maxPositionImpactFactorNegative": "0x300e239bc48235396d1fd413d2c8ac9564271f998a2d6d8c76168d4a1a33b3d4",
"maxPositionImpactFactorForLiquidations": "0x81f46680fdbbaf55d36de372843c18dd236a048355c44468a8e675fb7ef344eb",
+ "maxLendableImpactFactor": "0x6597b060c7043b7ffaf7cb3d929817b3f45c47e81f83b063090d41c1e1e93e75",
+ "maxLendableImpactFactorForWithdrawals": "0x4ffbbfe4b22be85287e38705df449305a9d176cd27e7459cd05d6c3e99443dfa",
+ "maxLendableImpactUsd": "0xd43a5d0f9ad8d80a0df71a21de112f24c8c4b72c397f5e3593fbaede2c1619e2",
"minCollateralFactor": "0xe62544109042c59f4f79a7aaa8e44233eb129115b7b113a691ecfe81d6cc82ed",
"minCollateralFactorForLiquidation": "0xda36895ddb7fc90ac64dc9ca121874177903db68868ec4aca2e26c9877083fd1",
"minCollateralFactorForOpenInterestLong": "0x23d5a4de10d52ac5736f00723cb93b596ccb210a54534daf46984afe304838d6",
@@ -3157,6 +3337,9 @@
"maxPositionImpactFactorPositive": "0xeca13146281a419baa821b94f4498cbc4276ff0992e34aa2737f8fb79b508223",
"maxPositionImpactFactorNegative": "0x7c36e7cd53d579958cb553bb9fd79face0c9a226720cf88b05c3620ad9c54dda",
"maxPositionImpactFactorForLiquidations": "0xe1b63d9189f4f9f092128feec975a80cc218a5078db1338445d96c1bf9db4526",
+ "maxLendableImpactFactor": "0x931757e2340ad964545999c2359c1e5034f1254c4a5ee40fbf9a9102bbc1e89b",
+ "maxLendableImpactFactorForWithdrawals": "0x100160edcd2bfedde8802fce2c9f72bfc6c51761e924993cda9f3b3defc0aa32",
+ "maxLendableImpactUsd": "0x3be800af705a3107131e9f2e966fe51e48125a537594aee72f16eba592138a8c",
"minCollateralFactor": "0xc119284ca99194e4d943a6af90e4dd7fb4bb14b050a974fb83142774cba81786",
"minCollateralFactorForLiquidation": "0x4e67474f7d9ec9e7dfccdebd0892b8f96bc85a36a16a90e6c8e1a54e85c4817d",
"minCollateralFactorForOpenInterestLong": "0xdc7d2b11c98f133ad856f4e38b92fae525d6a2ae80ceeb3b420e240dfad9849a",
@@ -3209,6 +3392,9 @@
"maxPositionImpactFactorPositive": "0xc81436f5558cb283c8c590d8b08d2685f138a0a10bf14cf46e547a0bda68720b",
"maxPositionImpactFactorNegative": "0xb375a902c092145cac64c3a449027132cd12c0e9cef6b72d54024276ab1fd84b",
"maxPositionImpactFactorForLiquidations": "0xfd8dcd34d1379f246478a28f69d7ffb710935582517b883cc2114ccd8e574e5e",
+ "maxLendableImpactFactor": "0x9a3bf9c78080a358487159a8b6e44275cf31d3137a1097c7d64622757e25d32a",
+ "maxLendableImpactFactorForWithdrawals": "0xa295945573837b377763d6f09ac4ce18ec3eb2557e4292b645d37104a4501184",
+ "maxLendableImpactUsd": "0x03e814c56af2eac103ecfc5e34c139e8bb79c7e6c3e4f00b8173368e6ee22342",
"minCollateralFactor": "0xc3b683211f897fd3d5139249aff11aa9339db2b59342fb4dde8b9f241ac744b7",
"minCollateralFactorForLiquidation": "0xa4dcc59c9562a3cdb7480e3bbd33b15e0a7272ccf9d3d453df784176ac492b18",
"minCollateralFactorForOpenInterestLong": "0x632d6bc9d36199ead3660e1d54803d97147abc31e2cac1b18dd386d250f44a2a",
@@ -3261,6 +3447,9 @@
"maxPositionImpactFactorPositive": "0x8cc4653a53206f190ed9e6141322f03b880455663553ae906eaea51d7f7f9593",
"maxPositionImpactFactorNegative": "0x8d6cc7722076a7f7c3481a48edef3eb7ae0c3857f46de999989aa6e26f76eb2c",
"maxPositionImpactFactorForLiquidations": "0x6c6d07eef5df4c62d9a6814f48a7dd355fc4cbef5a22b7cd055286f4c4018eba",
+ "maxLendableImpactFactor": "0x39410aa221bb52fda47a9a9aa5bbc3fc56ac816190b4f2fb9ffbcae10a758041",
+ "maxLendableImpactFactorForWithdrawals": "0x701e4d0f98cc7a405c786c2285854dcefbbb646aa3b7ceeca24c3dbd24e698f9",
+ "maxLendableImpactUsd": "0x9fb3ea52913ff1ff83859b0864d2b69e30ac8e3e7e58b75f0c504add0ed57b4c",
"minCollateralFactor": "0x74ff3abbabfffd3a5805a7c152e5b6f0d38444c6b1cf3684540fa3faf6f7bf57",
"minCollateralFactorForLiquidation": "0x373062bd389b4f542a94179cebaf0e1979ec7f3d420160cf1004f6599899fca1",
"minCollateralFactorForOpenInterestLong": "0x635e26e9daa2510e295f35fa17f561563e7428351b9282c13d5c56878aa57f83",
@@ -3313,6 +3502,9 @@
"maxPositionImpactFactorPositive": "0x9feaaedae8e2a793d61085d2d1545f6b03b5ddc48e06a8a4492c2c66701797b9",
"maxPositionImpactFactorNegative": "0xd2f75c6291a799c429b9fc0ead5e7e999583c93ae7e7dbcd94c693acab115f98",
"maxPositionImpactFactorForLiquidations": "0x0dc9c6e1420908930d17d95aa2f6b86cbb245c6c47f36b9f8bd7a51a3d82344e",
+ "maxLendableImpactFactor": "0x788f98ffa2190a5988b35dc79455c3e80c54a0c8f6d797588ef056a348ab0c38",
+ "maxLendableImpactFactorForWithdrawals": "0x5184f8265c3a48b345a8c09d321d60ebefc9df83b223ac00fe70440baeb2f23c",
+ "maxLendableImpactUsd": "0x110a45da52b3e7db79bce35164417ea3233f51addcf53ea56a5cb548b3fedbcd",
"minCollateralFactor": "0x331419dea97f8be91933915bded722dd38f3b607cffba6deabf347336fdc3141",
"minCollateralFactorForLiquidation": "0x008138086200d4db7f493cd1697d2047828dee4c011532ed6d71a47f71aa6ca6",
"minCollateralFactorForOpenInterestLong": "0xbc8a5091e0c1ff7f8b613fe045ad5ada27f7f46e2025bd0365840c89e99bbdbc",
@@ -3365,6 +3557,9 @@
"maxPositionImpactFactorPositive": "0xb50a00942d131a9cdc67aeb2b021f253c5f7770f1a1ba680495a485f25d9e13b",
"maxPositionImpactFactorNegative": "0x93e43b69e532e6d6b7788fb09d13d70e2c6e5b1cac594fe1af51e466f3703af7",
"maxPositionImpactFactorForLiquidations": "0x355b4df66f1c85fa3f11ecb95ce5e55103d0ed24f5670379791a0e82b88352eb",
+ "maxLendableImpactFactor": "0xdad319cf45697bcedde77cfcbe34250d74395c10cca8144e0cd9ce7c3db4a5f9",
+ "maxLendableImpactFactorForWithdrawals": "0xa0dcc39feebd4d40a2fa906c4dd57ad7568e21d02ca7b29f80f2a65cfaba8df7",
+ "maxLendableImpactUsd": "0xc041071fc0ff246cb4e5fb3bdf450e6e15863d4123e7681df11b25b75c0e2e72",
"minCollateralFactor": "0x14f519d670ec6e5b2cdef769007dfcac09f7edd6f64da52fddd8a2160f7c51fe",
"minCollateralFactorForLiquidation": "0x41ba01e8c89c5d7646bfb600f8196c7bdba39101507971f06b9b0377054a7023",
"minCollateralFactorForOpenInterestLong": "0x12be7656b291987a3022965d8be409d4ed7feb1d382eeec36e6d67225d120789",
@@ -3417,6 +3612,9 @@
"maxPositionImpactFactorPositive": "0xef1ee058e62d2940f4c6bdb5d4284a74a47fdfd67bf40881d81675898d995c53",
"maxPositionImpactFactorNegative": "0x6ae25f9f315f358886ff70b307f9d4c7642e783156df77121699c12723850724",
"maxPositionImpactFactorForLiquidations": "0x962ac7fc3cbc4fd8d0aa8dbb670ddc393d37a7f65e15ab52a5324a7d7ec99145",
+ "maxLendableImpactFactor": "0x82e7f2ec187c1ff710ba4e3e47862c411ae48d8830278a64fe9799990f3523a7",
+ "maxLendableImpactFactorForWithdrawals": "0xe0b2a367ae98b305796ad880a05b938d573d1bbbda6b0ad17b8b0979e19e4038",
+ "maxLendableImpactUsd": "0x861ab51a6e050f8f87ea38c363c0dd0daa424191e606a9a3168fa28d926917a1",
"minCollateralFactor": "0x522dce74cbd5b4d440202a34f633bc1a0fad761cc20ccbfd6a6ed661a8e22601",
"minCollateralFactorForLiquidation": "0x9b94fc585564e4ce1edae95b097a9949730d58e43dbafd70e0a5c10203b6d9a0",
"minCollateralFactorForOpenInterestLong": "0x561ab444da9e0a84f33004689eaee0620921f53832690234974beadbb2874c16",
@@ -3469,6 +3667,9 @@
"maxPositionImpactFactorPositive": "0xf3bc0955f963d0405f9e49d759d533014c9d06e7e60049c1b11ad3cf51b02cd4",
"maxPositionImpactFactorNegative": "0xe8584089e60a1fe0f7b9dfd3064915a786668ee667eaae8ab4344ce463488bbf",
"maxPositionImpactFactorForLiquidations": "0x874f76b33cc43ca63e6bbbccf8d5c047081f0d93bc3c8969584c39c6502afbef",
+ "maxLendableImpactFactor": "0xfd3549353cae50095a9c0773319d142d01774ec32b1132b0160e55da5c4b4489",
+ "maxLendableImpactFactorForWithdrawals": "0xb2fe4bf7818c52e2efafc54a069ceb3ef1bff7e3268efd1ec1d4629f6b50b219",
+ "maxLendableImpactUsd": "0x5c585e7bdc935a88ba8ef289ff518c08d861a30adc519571656489406bb425ed",
"minCollateralFactor": "0xffdda94c552e89c37aa851adc7a18e6bc47663010a27d83661a2e2fa8492ad71",
"minCollateralFactorForLiquidation": "0x3a606eb444659fc6d8703d1f4915560cd0e71813d3c824fbb4634c73002f3d62",
"minCollateralFactorForOpenInterestLong": "0xcb36c8d66209bda963fcd3a7029ca669b114218607d825722851aa897eba7ee6",
@@ -3521,6 +3722,9 @@
"maxPositionImpactFactorPositive": "0xd13f53228e8d8bf025faddd4631cc12fd68e4d48f5aa750afad8589402adfa9a",
"maxPositionImpactFactorNegative": "0x9c35cae350439063045993681f2c2e12a3e12aa11f77d56d357e3ceac618617c",
"maxPositionImpactFactorForLiquidations": "0x814777913dda7bcd8fa344525f60a2b92045904645614e796279a2a12a91b43e",
+ "maxLendableImpactFactor": "0x0b27f7e85429e3bcdf576b39139a59b5f087b04e4c60934be6752d8650696937",
+ "maxLendableImpactFactorForWithdrawals": "0x0d78b77825c5c0319c860937d6e7913a1cddf33b55d54f3fa399403bc45469a5",
+ "maxLendableImpactUsd": "0xa0313f1f0a8838e9ed03e4b000d76d325bb4291f349abb20adbffe665b0df33d",
"minCollateralFactor": "0x8e3bed4f25e62e79d236e7ab4e5603e7622ef2eec8639585e4244725d8f409bd",
"minCollateralFactorForLiquidation": "0x67ae2314c7ad70da1afc2ff6bbc4ce36070db06a532137307b3949db7cdea89d",
"minCollateralFactorForOpenInterestLong": "0x9b60006748c20ded25ebeb6cb5b8b4fa1637b243173d9721a4ccfbe3101e7de3",
@@ -3573,6 +3777,9 @@
"maxPositionImpactFactorPositive": "0x81474e9f281247217a132604837f1a17c01f9718727675aad11a63ff67d7f77e",
"maxPositionImpactFactorNegative": "0x071ddcdc5940ce06318c56b5bdce3a27847f535f8f0eac190abca1a73af7d02f",
"maxPositionImpactFactorForLiquidations": "0x65a71358652e1f3f1de3770fe7df2b8400da9e60f8d814ca9a4b13022bee2222",
+ "maxLendableImpactFactor": "0x4226bc69694625b88f1e7ba618f2b5278690afbd7d04d09cd6e3e56adb598b3a",
+ "maxLendableImpactFactorForWithdrawals": "0xa55ea1d8e2d40aabd5bb601806317bae810b955bba23d271d4d45c020248a957",
+ "maxLendableImpactUsd": "0x3121bf7b8abbe87c16343a7a6afae2aa37e63995a487ac70ac184789097a9bd8",
"minCollateralFactor": "0x679fb485dc1559e6adc640756fe4740ee19dee07b8badd48976bdd28a87879e1",
"minCollateralFactorForLiquidation": "0xafc489671c1d4873473ecfcb310025d579c1c8ee4205d613c879338f160e3cd8",
"minCollateralFactorForOpenInterestLong": "0x84677935537cfc967f4cc379eda203039e555599457a5abe92b8d3be4ff80edf",
@@ -3625,6 +3832,9 @@
"maxPositionImpactFactorPositive": "0x1eb9f2b1fe7a5cadc30bf113d195fea531766a1f93c49e2aa83237c6608dcc7b",
"maxPositionImpactFactorNegative": "0xc82616a5adaf7157ed23d8b6e8bede28a99be8cb7856e8eefd9db0176ee5ac92",
"maxPositionImpactFactorForLiquidations": "0x1a672707fd488daa1eb12975ace82f66a734b02e01aa1301289bd08f8b8f7879",
+ "maxLendableImpactFactor": "0x3cf17adf688ac44c780ab85febad2a468a583e3c3399a220e5e29d1a5e53a6ad",
+ "maxLendableImpactFactorForWithdrawals": "0xa6c9ede03fe1cd0adfb5e47772869d804d2fcf9c944a44174c1679abe50884ac",
+ "maxLendableImpactUsd": "0x3cfe77f5b4887aa393147fe72920ff17c49724b3469e887c91f257f6e35546b3",
"minCollateralFactor": "0x3fe844c40773c125c030590d8b180fc7e7eea4b4620fc68b8933bffaa4c67b4a",
"minCollateralFactorForLiquidation": "0xb44f4b78ba17e0d1eff6125cbed7f5c6818e596f01fcd6aab2e739addb731706",
"minCollateralFactorForOpenInterestLong": "0x6e86a14a179aecf4b9c5d905c249fb4e36fcdaa1976cbaf81acccc340311036d",
@@ -3677,6 +3887,9 @@
"maxPositionImpactFactorPositive": "0x7420c427b32409f5e82da6c15ead871dd919fcf1e1e92f384802d5bdb4e8c8f7",
"maxPositionImpactFactorNegative": "0x8503fee7cf10b36db3a5563c313bc4517f5165f26a758cc0017f9ed63275fbbd",
"maxPositionImpactFactorForLiquidations": "0x95f09f9b51350da41df77fc76f4eee0a9d0463e1594b8cc5f7370edddb01cd61",
+ "maxLendableImpactFactor": "0x770b5fe74d57ef3470e215fa854ee1d1e5b2e48cd5701bd56221ccbd0f5ff5c0",
+ "maxLendableImpactFactorForWithdrawals": "0x73ca53f0d77d24492d2fdc72f88e69576692534e1a53e82437e377791579753c",
+ "maxLendableImpactUsd": "0x6d40bb81b7f7cadac5717511628028b36e524c0c2fa42bca0262e3f36d2f0d3d",
"minCollateralFactor": "0x477063fcf3dcb2f7f5ea4dbfa8ebd08b75668e951d64c79c207fe225a1c7d3bc",
"minCollateralFactorForLiquidation": "0xca1ade249503a15c4b948131034294456c5786080676a30a2316606becce1605",
"minCollateralFactorForOpenInterestLong": "0xc28f780855330cd16102ba6fdb7ab47699efa33c0df3fcef42a44026ab9cceac",
@@ -3729,6 +3942,9 @@
"maxPositionImpactFactorPositive": "0xe82f4b73da79de37c6d8828c855bc39363701137c4aafac1e50dddfb3a9841cc",
"maxPositionImpactFactorNegative": "0xe66a60afb8061060957daf068784bab70e61cd6bb1ead11c3f81d4e60551076c",
"maxPositionImpactFactorForLiquidations": "0xeca113ccf913f2b135ffc65612d8208716cc437352f94db4492778dbec26b3b7",
+ "maxLendableImpactFactor": "0xdd2a640ded519663fd6dcd0d0773556890b0bea71d5994f57ca2ae98995b007d",
+ "maxLendableImpactFactorForWithdrawals": "0x018bbb9224779541e9138199e7c2af6b2bbe8e1df422f70d261d08d983ca2c4b",
+ "maxLendableImpactUsd": "0xec2b1eab979e1acb5a68262c3c4e05ade1c5c5e7fa8d22e772a4c81b72cfb004",
"minCollateralFactor": "0x66de3ebde9679ad0d1d7422384e7668a59308642f21b6ed99843bc6333dcfdbd",
"minCollateralFactorForLiquidation": "0xe5ff50ac9a0dfb0d5599b53e9c969ee858db161395ec92307f20922bc708557f",
"minCollateralFactorForOpenInterestLong": "0x979afa01e39a53a0ee59cb19c28a83db1f5ecddcf336a44541738671ea529f07",
@@ -3781,6 +3997,9 @@
"maxPositionImpactFactorPositive": "0xd26604e096680008907eda5411c8f65b79e898f7fced8f2e8f3aeb2e113b2146",
"maxPositionImpactFactorNegative": "0x78f8535809a6190aeef4e5fadd69800c7662133aaa6bf621f4acfc377ab01935",
"maxPositionImpactFactorForLiquidations": "0x551b4069fdca4d0563164496a8b8865893dc2ebb3644af484c0ac7b5a6d9b382",
+ "maxLendableImpactFactor": "0x5515c68b6615a33d29c833a177c28e83eefa8d37359eadefe7f40cc4cf5e931b",
+ "maxLendableImpactFactorForWithdrawals": "0x523659400dbe19d15727217bcb08130ee6d223c198d685fface935b1860f2b0e",
+ "maxLendableImpactUsd": "0xc2bd44e6d3d1beb409b79733a13f2a124b59942c2ecd9f332ac4759623649a5b",
"minCollateralFactor": "0xaea2afd33c6d2466b226b95971101b0250e5a558466f3e688135e606529cdea1",
"minCollateralFactorForLiquidation": "0xa65f72041f4bc42656406438eabaeb3a83e9f4f38aae62c9ff8235d0e81a7910",
"minCollateralFactorForOpenInterestLong": "0xc425f5ca4051c07b0ef0a474ce087918aff548677159081ce684e1832a0dbfe0",
@@ -3833,6 +4052,9 @@
"maxPositionImpactFactorPositive": "0x1b5120ca944c5a33e540a1c6e406b523ce921000a984f97f95fa699d520cb7ed",
"maxPositionImpactFactorNegative": "0x5296af9bb7d06b0cd08eb201218d7f1e6a2329be82fe448fdfd8b8fc39fa68a1",
"maxPositionImpactFactorForLiquidations": "0xfe947f5fc6293d31166df3a75f524470845c7eeef041f8a2e420a094c3fac1cc",
+ "maxLendableImpactFactor": "0x0b0cf71a890beba3339150e4fce46b7790a1c75866ad17f049fa099046b1ecbf",
+ "maxLendableImpactFactorForWithdrawals": "0x39a407d8a89a525883f3f891a6ec25ffbe79da171cef45694bf1899c75f37fba",
+ "maxLendableImpactUsd": "0x5b55fff0d750ba099a6b448ed89defc38c817f3b5ea1a51b1e7c1159ea229250",
"minCollateralFactor": "0x0265939bb7d88fea6fff26636a6858305b038871546f1414e5701ad669d5dc1a",
"minCollateralFactorForLiquidation": "0xca9593cfa0c874962f22b8bb702032807b9427579010b042670806b64ab2df34",
"minCollateralFactorForOpenInterestLong": "0x50d84922790ede06558e4ca6f2e96902c570c45e4f427cc6fcccdd32dddfecad",
@@ -3885,6 +4107,9 @@
"maxPositionImpactFactorPositive": "0x2de659890a4e8d1963570ff9b59d26e46be9b33cf7e136aacfcb2bb200550ccc",
"maxPositionImpactFactorNegative": "0xc1bea97710f8e10627534a240eee6f82cd830e63d7b2c2dbd76556ea4fd033f7",
"maxPositionImpactFactorForLiquidations": "0xf63f2b50f2ecdaa28b16771a42a2b5cd380e09f6de782cecb71e839cdc32f851",
+ "maxLendableImpactFactor": "0x07a3c676f0db6db3d8db26ff2fc47883d483091dccac5fce69b3c09a9b37808d",
+ "maxLendableImpactFactorForWithdrawals": "0xdfb2ca3011540b213a14ddf383ba4ed001f3d1ee172ab3f00b9ee5d376a363e6",
+ "maxLendableImpactUsd": "0x6b9b187296c4c45699c8b5fab9955585b18a428f093ffad2f06784a62a338e1c",
"minCollateralFactor": "0xfb841e5374643d23b05f191cc2f0e1148808a7f71da91675b9a3d8c64b016544",
"minCollateralFactorForLiquidation": "0xd2e092583c07aa062aed1369c062d31719a80ff6e75d84ddc76b5e6bc7826054",
"minCollateralFactorForOpenInterestLong": "0x6d7fcd1f8264f3f59c707af933ec7782df25287b0b6b5f420a319b58b4886f7c",
@@ -3937,6 +4162,9 @@
"maxPositionImpactFactorPositive": "0x07e3c045a079b6ba9dc07038336e09bce8c716941b675d352a7b05ba5b59ce60",
"maxPositionImpactFactorNegative": "0x84e0600c16972b29f7da354d54020464629310f597f791a8dabe846828986384",
"maxPositionImpactFactorForLiquidations": "0xfa799d4aacb60572cdac1ee643f9cd39f700a4b389b24222533c7364f308f5be",
+ "maxLendableImpactFactor": "0x21318669980e0bda8d54714e965f58fd6fee60aefe7a00084c3d2e72029d9057",
+ "maxLendableImpactFactorForWithdrawals": "0x98cadb0d1b4caa4c04ce0fc916b0616d3cbf8d94fe8191190485c40f926b1040",
+ "maxLendableImpactUsd": "0x552b8ab97c40de451e32f563871104f2a3bd6cb004f97bb20d14811feffd9cac",
"minCollateralFactor": "0x3a6062579846cca4b922db1cf9688c3f8f090eb5448600fc904bdf4b4b72bd22",
"minCollateralFactorForLiquidation": "0xabcb9f7c66df854a36c97a3cb49e635446fb7a3c56f8ab8b55b39f68d12aafd1",
"minCollateralFactorForOpenInterestLong": "0x94a978d635ef737465b195eec16b7f19c6f1bff0017c978ca61a17e5fe8b7808",
@@ -3989,6 +4217,9 @@
"maxPositionImpactFactorPositive": "0x2a25ce604cef5d4243bebc4f18af4f6387cbbcd46d1293e23fdfe810cd6854b9",
"maxPositionImpactFactorNegative": "0x9a452777e6806271ad8cc47d6d8bd0a79dcde5bba1bf5fdb99b0c9056a752510",
"maxPositionImpactFactorForLiquidations": "0xb4e94d1b92745024b727c7bcedcd895ed2e00e2ea2ccaf2eb37d50cc590131cf",
+ "maxLendableImpactFactor": "0x611a5706038f2743efbc3edfa3297c04acdf89cd037ac3e53652d6517659970b",
+ "maxLendableImpactFactorForWithdrawals": "0x84fb403374fc081fb547f1949582e0a12f3799f450b3be23e5d405da7e0f21ee",
+ "maxLendableImpactUsd": "0xb87743d8a51c6b26e2392bbbab800e130e3508cd359a5b592c70c6234b90adc1",
"minCollateralFactor": "0x0aa8885df89de8ff34563554e6069a4ad8949cd4e6f77d4e7e5fc6eed353b721",
"minCollateralFactorForLiquidation": "0xce9ba90c380212578833d426e036da7abf6c564caa45e126e5c9f3af3f39727a",
"minCollateralFactorForOpenInterestLong": "0x4434267baa673353b931f72b997d623a8dbb24ad019fb1012b523e3445a9b522",
@@ -4041,6 +4272,9 @@
"maxPositionImpactFactorPositive": "0x5dae48e6dfe9c144cd58a6e4b90c070ef559116c76518323bed64e54cb43c85f",
"maxPositionImpactFactorNegative": "0xf43b9ca73005afa930d529a7b5e512a0b072819f3addcdbf14fdd3c65835f385",
"maxPositionImpactFactorForLiquidations": "0x63855710f19d2605d4dc599aac16e0d6240b8336befa7f7f0f0de89ca8fe48f4",
+ "maxLendableImpactFactor": "0xfb808e24c79a656df31ffd89dd51ea2faeda1bc9041f5b300080910bff27aead",
+ "maxLendableImpactFactorForWithdrawals": "0x970aca94d332873ab727b59cf55588a44f00b9007e4bde414002310939e8b72d",
+ "maxLendableImpactUsd": "0xce9f727834e2984c9a690e0cb55e001ee641c931895c37ce30dbdeb49f4d3085",
"minCollateralFactor": "0xb10b7742e2b3281b2f4c6c986ee610bdaae744a102b587ed040bd5a26d0cfcf6",
"minCollateralFactorForLiquidation": "0x54898fae937ffecc11f45b346e2c2d31190475b9cc7829e2801c3bd2aedf7953",
"minCollateralFactorForOpenInterestLong": "0x24d067bde87a33817afba6f9159b1f879be5f907de489107e0e32433665c7c1d",
@@ -4093,6 +4327,9 @@
"maxPositionImpactFactorPositive": "0x985a11ed1a8a61ba0836724b434483e8888ebbe9e30d8ac70cf036fc4e7685e0",
"maxPositionImpactFactorNegative": "0xb5d03aaa44f4e51f4b5735ce62f55c1a038c064d10f3dbec30b1594f2bc2b5bd",
"maxPositionImpactFactorForLiquidations": "0x26340ddf9e54bffb55bd5cb1470652d3b32960f41efa886140a723a2349d30ba",
+ "maxLendableImpactFactor": "0xc8f6751279bc8ee904f588df45a88d92f862015fa055333d4fb948cc621a6865",
+ "maxLendableImpactFactorForWithdrawals": "0xeedc3dbfb87abeea1d05fe424b4dad10401b1f1be8e153100e2fa74de7d50d1a",
+ "maxLendableImpactUsd": "0x9f3f857116557171c55b06b0c7e73c89dbbea720b7f88829ba87336931047320",
"minCollateralFactor": "0x80cc450de3e38bf0842c74de08feef0c83bbd4bd5b057c6ce752db74e8fc2004",
"minCollateralFactorForLiquidation": "0x8fd4ed805960eda98fc4829e08f9615cd22bfcb89ca38d1947083ff245785e55",
"minCollateralFactorForOpenInterestLong": "0xf2505508b048b3a9f6cd5d4f0f28decb75a374a948a988d270c8da823ffd628d",
@@ -4145,6 +4382,9 @@
"maxPositionImpactFactorPositive": "0xae8761a60ec47c251789ab4ba75ff174152d05306b538265b50ed7906a9edb99",
"maxPositionImpactFactorNegative": "0x3c35a9293aae318368124f14e86c5967640ac6767c0edd9abb2830ff3cd4d534",
"maxPositionImpactFactorForLiquidations": "0xbb6d346ee918ea745aeb83d09af9be9a441249dd326421e57e19e0bfe338d10e",
+ "maxLendableImpactFactor": "0x7afb8a83e5ae3e633a983ecf68a396b1c767ad69879003c6e8ba4764516b1e16",
+ "maxLendableImpactFactorForWithdrawals": "0x862443f2dd7c14b1f9db2ba42990cec39441c33db9e6c0aa951f30a8864dbba9",
+ "maxLendableImpactUsd": "0xb5f25ad6874ca38d7c316af80adbb6479177e5896ff6381b1c5035c6b437df10",
"minCollateralFactor": "0xa5d93c751fd967d449430928a31c30b819fd3a1123a0e85297dd2a15e1975187",
"minCollateralFactorForLiquidation": "0x41bc7acbf6580c7822c4f8242416ec35d9c8b2e50be1d5379221c039a8d1119a",
"minCollateralFactorForOpenInterestLong": "0x4634662dada17c503986cce2faed9f7fc072f1051ebdd20db92b238c9f9ca03b",
@@ -4197,6 +4437,9 @@
"maxPositionImpactFactorPositive": "0x09ab49987e86f02b3648e2765ed1d4d25bd1b0112530f62e0a33b726318fa816",
"maxPositionImpactFactorNegative": "0x35f4914c65363c6934dbb5398de816f6e5ff326bb435026c981067b9481850d9",
"maxPositionImpactFactorForLiquidations": "0x7922e33897dbbe67d00e7d6d23a286eb854b047a28ebc0809460232346fda898",
+ "maxLendableImpactFactor": "0xf98b5a7bea6b04cf524bfb79ac4ef7e8c2d5a63d18433a1069a4a96a5fa97631",
+ "maxLendableImpactFactorForWithdrawals": "0xaf51334f13ecb6f593199c15f26af85ce87d039650fd64b2841c2493c6fc202d",
+ "maxLendableImpactUsd": "0x822e1063ee7b9a5cefac8546f5eb8ec64948dc327a6d8d4f57e3f2c643a8bffb",
"minCollateralFactor": "0x57bc7d6117c01150e63f7d6376a598ee76432123b0a8f097c2b2e3acf36805c2",
"minCollateralFactorForLiquidation": "0x6ee2269ef5eaa11d456e4c5c24fcf4472789e05761bbccde7d124720734daca0",
"minCollateralFactorForOpenInterestLong": "0xb2a7bec849de6c6b7a38d4d561e876a210dbebde36c0a50dc37aad9083f73647",
@@ -4249,6 +4492,9 @@
"maxPositionImpactFactorPositive": "0x9acf59a110f586200c0fc1906a2b18a23d3033df529808b6dcf746e8a235e46c",
"maxPositionImpactFactorNegative": "0xcf04d976c885aa14b78007f6e63a843f74393edd54f99f8d0c8f9878a33f87aa",
"maxPositionImpactFactorForLiquidations": "0x78534eabae34614434e9cbca171a7f3521bb40e26621d621fe9f1280a9eeea7a",
+ "maxLendableImpactFactor": "0xa2b52b7d280ea3167644b7d1d88aa7490627ba799fdccba28117f2723b8da2e3",
+ "maxLendableImpactFactorForWithdrawals": "0xdcaab1fd6f8489a043f5b64e2d047a783e8614c7a18f156c8f1748f31fe890c4",
+ "maxLendableImpactUsd": "0x8e1e71664e9351f656f66459f64b2449d5523d9e7b35a9db3c7bd579fad8ac62",
"minCollateralFactor": "0x9286a24a3b626cd4b440c9ebc31ce5a5b709c22f2f4acc917c3135cac6b26ef6",
"minCollateralFactorForLiquidation": "0x8ed79f4e6d3d38bfdfea170a01f66193eb1ad238a766ceddb168e3621d7eada4",
"minCollateralFactorForOpenInterestLong": "0x8c69704d7ad8d47b8fc79dd9f203c622ac43de9aaa60e25de14b70468e2d9b25",
@@ -4301,6 +4547,9 @@
"maxPositionImpactFactorPositive": "0x44c15ba958ee8bbe1a9e5c73c10b75c6936ba34584c9547fedba2728646ee3c0",
"maxPositionImpactFactorNegative": "0xb4224d32c2294853cc1b30f309298e68e81abe215cf8f950ce667e6bfd815874",
"maxPositionImpactFactorForLiquidations": "0x4a45d8c9790fc0c140182e1495bf7db53c570f70d467d247a75abbb6e4c7dd94",
+ "maxLendableImpactFactor": "0x5aad15db5c0aab031655bbfcdce39721a019dd89143749bb04023c66b3981402",
+ "maxLendableImpactFactorForWithdrawals": "0x7b26a8a4a53b3f84d684319a11f37d5f04064a23c6547e6e80b051a079838fff",
+ "maxLendableImpactUsd": "0xbaec5d6a4eb97c342d5c7755b10a84cb1e91c2d325ddebf0fc549bb0a7639b6f",
"minCollateralFactor": "0xd47ee119ab4e108c88d288443718f11ca44df176472339b0c35e2d6ae56d3ec8",
"minCollateralFactorForLiquidation": "0x426ce46062a702d0d68326ca347a1fa5d705087d2b43789dd0310835cfdaa74a",
"minCollateralFactorForOpenInterestLong": "0xdbaf0c15b855b2a4e1a68a581469b8c5d15f803cdeeb711edb1640fd38715903",
@@ -4353,6 +4602,9 @@
"maxPositionImpactFactorPositive": "0xb47910941cab06e9dc81d5662459e379e94e34b4dfbdd0c7e28fad6ad30e3e76",
"maxPositionImpactFactorNegative": "0x62ce4f0b286c8db680648b24acd47740f9e6d7a8be4c30cff769e41baea09719",
"maxPositionImpactFactorForLiquidations": "0xb472fc0d602f85dcd632ba64a9d563a9e46b83be79ff10fc84eb335346d9bdb1",
+ "maxLendableImpactFactor": "0x467d5377cb56667d1d0cf31bc63a7ceb4e120ead225195e3958bd30b44bcab7e",
+ "maxLendableImpactFactorForWithdrawals": "0x33cefb6f183a39a21457eebb2b74243010381d99af3f692e1860da516b1ca501",
+ "maxLendableImpactUsd": "0x81d4f9b3b66d42b3b7c3a3e9749146b8bff4969f429869f2094c64f8f1907778",
"minCollateralFactor": "0xbe95285a19c0ce88607d7b14c5230c60f53503455db2b61c3020f104d5ddbde0",
"minCollateralFactorForLiquidation": "0x79931b37d86fd4e1c24760f0d9c923458a505993af2db87ae125d2fc1d3b69df",
"minCollateralFactorForOpenInterestLong": "0x2a6d115de938ad85af12ca1d26a0f6644a2fe0599b2ab86f8acf87cb5624ae5d",
@@ -4405,6 +4657,9 @@
"maxPositionImpactFactorPositive": "0x4f8676b09189ae01e2d7895f06b00bfd93fa644c104976a0e56d0ca82bd5f4e4",
"maxPositionImpactFactorNegative": "0x92dbf0ecb90d8a9d5f8448f53a0ab2220070f4836fd4ad0f375f7b08841fbb73",
"maxPositionImpactFactorForLiquidations": "0x9b98aa2ed2c3185e82bc076abca8f66ecd35ff266e183479fba3f0986da0693c",
+ "maxLendableImpactFactor": "0xa200fdbfcb8ef3419f225c8ef2645f7c51ac78632d1d7c0b38178d02468cf5af",
+ "maxLendableImpactFactorForWithdrawals": "0xc92ba1efcc554e66ee1429f7f948f37e6c8d909a1821c89b3f56b77dd257b95c",
+ "maxLendableImpactUsd": "0xaac0b18a1002ea6fabf3793aee54fe98a640085f40b14daee9151ab652d97555",
"minCollateralFactor": "0xa213ede0599ac0ad9d8d63cdfbd2bc353b68313ea17ae036bcc6b12ba1f3b46f",
"minCollateralFactorForLiquidation": "0x53242e803c0bb6381c1b5c42a8fcd00b54fbbe85995488a7a5dec6f225a5e5fc",
"minCollateralFactorForOpenInterestLong": "0x52afa3711c1e690c0bf7e156928aa8384c28f540b26fc9b607b05ca73c18bfd8",
@@ -4457,6 +4712,9 @@
"maxPositionImpactFactorPositive": "0xb34426026ad3844ff8e007e94303faf42789223dfda616700ff05ac9bf3fb53a",
"maxPositionImpactFactorNegative": "0x36dd4505b6a81d6a5d330cfdd00766abdf2b82925c43913674f06cbed5c5f60d",
"maxPositionImpactFactorForLiquidations": "0xedb4f51e93d6c8f03b0d81b69fdd15e493cca80bd51f35deefe354fbd9955f01",
+ "maxLendableImpactFactor": "0x452079f0f8e4232f1216d0e1dbc9899ddbb111cfc95fd67d8808bff645b9a676",
+ "maxLendableImpactFactorForWithdrawals": "0x4aa8d9ced2923efa1e9c767e9b96bdd98d460e517dd0638183d8e3540daa3b48",
+ "maxLendableImpactUsd": "0x6bc54f3ce9aeb8b08143f67bbedd05eec9d60aea96adcb960f288f6eaddbd863",
"minCollateralFactor": "0xfbd9db0e5bcf95a34b4d52a97caee4aaacf32e91fea52fb3d0f6eedaff6b16e5",
"minCollateralFactorForLiquidation": "0xad6053c2d0c04fd2f4bf6806e2dc774d14481617371e602cbc76a83e6bb47d6f",
"minCollateralFactorForOpenInterestLong": "0xa7fc29d21ee4ffceb464f9889c70a3c5f92c8c48dbd5ffc824f088dda4b7515e",
@@ -4509,6 +4767,9 @@
"maxPositionImpactFactorPositive": "0x0d08c828dc9d769eeae616f4eb633aff60e0590d4e9f139ca4ed3896cc1ecef8",
"maxPositionImpactFactorNegative": "0x6d93932f4a91d8b721f586aff6195d1329e865f3e37ba0b5fb3fdb34804dc21d",
"maxPositionImpactFactorForLiquidations": "0xd1ca69a240770f649eac17fcef37e1ec3f08d89c8e052f9f3a52af6bed54bd72",
+ "maxLendableImpactFactor": "0x86d3e82fbbb7ef85d605daf0f3e91d2e2557e78900221935c18e3d8ef4ee45c4",
+ "maxLendableImpactFactorForWithdrawals": "0xab9b13bcbd53b81249545d8c3c013f17a8f3502f5f2fb550b8a08237f93d992e",
+ "maxLendableImpactUsd": "0x332ee1eb11b5ff3fd34fafdb9c874d59aa2f3c3814865c5413f8be67ac82cbda",
"minCollateralFactor": "0x2d6c706dadc679262e11249e94c293095e1d2fbd28b2dc9bf4bb2bdae5a9b60f",
"minCollateralFactorForLiquidation": "0x7571230a5a26f9280aa55776430b802d4ce0c4b1f31edc7d7323e1fb55654fe6",
"minCollateralFactorForOpenInterestLong": "0xb31a483d7cacd648d5b1cead2934dce80ffb22bbb0b1b5eacf4f680e7a7f51ef",
@@ -4563,6 +4824,9 @@
"maxPositionImpactFactorPositive": "0x3be668a8c7be13b0a349732303c4b95a907bd0e9668a4bbec4dc3f1ed5e7c2bc",
"maxPositionImpactFactorNegative": "0xd8d979478a3b8bceafa8a848b25784dd00b64bef081c4c1dc9dd60bff7cea798",
"maxPositionImpactFactorForLiquidations": "0xbbfe96bfe46f446d24be78d7bd2edd34334294e89048f8882360bb743584cf7f",
+ "maxLendableImpactFactor": "0x9db704bec7ac071e0e90f7a93461809904f80664c78d05e69d231e9439dd5dfe",
+ "maxLendableImpactFactorForWithdrawals": "0xba0e0bf03d0c02aa72bc5fc17c3ebd655ee0636528247532b4e13226a1037ef3",
+ "maxLendableImpactUsd": "0x68cb741fa9d254bfcd5c73666794d3e6a3fbb6b6544049e7dffc7f04409ad248",
"minCollateralFactor": "0xe910b1cb7c36fa1e005d1ce213e744ebb8e19c07f0e934605fb998fb518ec4c0",
"minCollateralFactorForLiquidation": "0x363406d304aa67f7d3bbde74f80598186c221785469b490cb4927732ee1de679",
"minCollateralFactorForOpenInterestLong": "0x3a15736cf99d0f99680260b5422bc87fd69925adbb1387bf7048191f19cab935",
@@ -4615,6 +4879,9 @@
"maxPositionImpactFactorPositive": "0x885c542053b7fa77c9a4a2dc267dcb133edcfafd7c93d3e34b3aaaeb84d71e15",
"maxPositionImpactFactorNegative": "0x6a5409f88cb735d2e2ff70cc0c5738c19422c5543034d1bfc997cb4e8e0ff913",
"maxPositionImpactFactorForLiquidations": "0xb6f88dc723473750a0b961170270d31fba437679f22bfde4b267a55325fa5f57",
+ "maxLendableImpactFactor": "0x6905d1082b2762772ab4518370d5c5168d2c3877e2381e37393452d44fd74932",
+ "maxLendableImpactFactorForWithdrawals": "0x1922711cd16e88c089890bb41826689426a3ff93c3f9a56cc5afb69254caa92d",
+ "maxLendableImpactUsd": "0x80124f278e5d8cabb600bb5eab8b4bb250364ebcdfd43d6c301ce4f4deb5fbf6",
"minCollateralFactor": "0x2bda0f19bd0a9c7a0bf9e89a4b1bcf0d06949d290d084f094d1f2daa73890e18",
"minCollateralFactorForLiquidation": "0x4675a79fa14651780daca8e35375904acbeb2958eb5414537ee4214241ee8dbb",
"minCollateralFactorForOpenInterestLong": "0x6cf8feab7ea0d8a785b057c390baee97be69e93f87bd3b5ef1b32522ade977e0",
@@ -4667,6 +4934,9 @@
"maxPositionImpactFactorPositive": "0x06870bc32614718b265349bf6300294056628d60ca10f5d35c63998d55a41f8a",
"maxPositionImpactFactorNegative": "0xe68bf971e0e02267b79e78933811a5fcbb67012ffb373f57d08e6053bf50d2eb",
"maxPositionImpactFactorForLiquidations": "0xda655d82bdfac7f52574b69be3faba4684029b4f692b4d6e9a27e9ed0db5eb18",
+ "maxLendableImpactFactor": "0xfa593d54b5c34e98fec7dc8515a180443bfd9b30e100c68d75df4dfd70527401",
+ "maxLendableImpactFactorForWithdrawals": "0x184a90bdd9e17af13d4c8ff820c9331f157e6db5a2e18d6e5e51735e82734246",
+ "maxLendableImpactUsd": "0xa8b90dcf6d7893f3198c375cdd895ccc3d8497d9742cdd4877e2f876d9a33d8a",
"minCollateralFactor": "0x45d92c625d74a031ce8338d168d2ec1699f338ca8669ad7f210c98ef9461bc43",
"minCollateralFactorForLiquidation": "0xe92fa6b0415f90201edf5c668993487dbedb71de9bb489cc4bec41ecebb369cc",
"minCollateralFactorForOpenInterestLong": "0xff9fe8e3365a18b999251316da505a550055626be033cf34378f1afd550a4f5b",
@@ -4719,6 +4989,9 @@
"maxPositionImpactFactorPositive": "0xe58eaeb5cb769661e5812ed30888816663d04e418a2a2294a60dc183998bc24d",
"maxPositionImpactFactorNegative": "0xbdf2714c7cee0ba4bc78512846368491218658bf4506af2c0a5560c5d2ccb98b",
"maxPositionImpactFactorForLiquidations": "0xb0ea1a8a442d94107fa9d601c8fe41c3071a4f6a212f6ee8cf5d2f3af03af9f3",
+ "maxLendableImpactFactor": "0xe2a4e43bde1878da29dae5a7787f199a8bb5e583957c3ddd566ee2d466af01c8",
+ "maxLendableImpactFactorForWithdrawals": "0xbf2805b8a8888767a4b59cf8ef33f341460051999a88a860f0d352014d579a12",
+ "maxLendableImpactUsd": "0x8fc9544d8899a2083f0091010b86542f2c88c79f9f46951724d8d8b039c94407",
"minCollateralFactor": "0xbaaa90a41b92be436a5c13d02137ab4d1da57a1256942b29ff1122f4ae3910ee",
"minCollateralFactorForLiquidation": "0x87ff74340b078cfd33cae47ce1e3ddb268a2380d8badb47bb14ff760be63c9a8",
"minCollateralFactorForOpenInterestLong": "0x8cbab030e059e5061c5844541de54fd884103976d5748b1afc27800eb6956781",
@@ -4771,6 +5044,9 @@
"maxPositionImpactFactorPositive": "0x7bb5f084d55a70ddca3fd48f65cca1a09c0709f02816844610198577d9f41498",
"maxPositionImpactFactorNegative": "0xb581b24a566d8407faf6b940b547885f670884caa28552f4c4267ed3e292f0e5",
"maxPositionImpactFactorForLiquidations": "0x5ab50ee39c6a00792a7a8994d4881f8b946180b937ebdac34e2d199a9b884c6f",
+ "maxLendableImpactFactor": "0x1387afb6154c7cbf8daf4f65eaadbbeae179487de4bbee973f41a0729bc0b681",
+ "maxLendableImpactFactorForWithdrawals": "0xaa191090a6af58e3f09e9e41a5353a606d8e25033b4e863abfe15077aad8e928",
+ "maxLendableImpactUsd": "0x709de5010e9f8d311a65eeb69d9b8903728d7c6a78a49ab3f838d6123b345b54",
"minCollateralFactor": "0xae80dde9ed11f8ffd789be3583df9e79a38f49ab1ba4dbe01fb87936545f600e",
"minCollateralFactorForLiquidation": "0xcbd111c1ddb157b7224dfa2eebc5b69b6666e02062258c016e027a45b66059d8",
"minCollateralFactorForOpenInterestLong": "0x3ee6bddafa71cc4e83b9278ef2f015a79ffc105e946f4b46c521388432cd9939",
@@ -4823,6 +5099,9 @@
"maxPositionImpactFactorPositive": "0xda40b2f3412500cccbeb10fe49e074350c9332e85d7f2ac70b628198eb5cbe19",
"maxPositionImpactFactorNegative": "0xcc72fedfb67e03fb6e89c35995b133c60e72ebf835ceda1ddcb11dfea7cfd9df",
"maxPositionImpactFactorForLiquidations": "0x12e5eff138fee8a5165e1120e527f7fbedb647b60b8003214942ea80a27eb245",
+ "maxLendableImpactFactor": "0xa943d492ea8a8ee576462f5e20bb1329caa15626d3eecb3cd191c4a09030a172",
+ "maxLendableImpactFactorForWithdrawals": "0x092c6d65ead5d73190c48d23445cc8d833e1d57a9c858110967b1b396becf01a",
+ "maxLendableImpactUsd": "0xaf602d636576bf89bbbb45ed6340469fc1b1f314812b3ea2cc443e77a00ae9b8",
"minCollateralFactor": "0x458441692f08c6fd6bc9096d6c6a85c9b30df02b3f2956d04603b1d84b5823aa",
"minCollateralFactorForLiquidation": "0x2fa437b43c4b8978a735c50513a74e89c5cd7f0d2a35ab4f964c4910b9563771",
"minCollateralFactorForOpenInterestLong": "0x2397923fc51dfa26d6dac95bec87e8d79e15cf9c934d9cfe3b26e3462bcc2145",
@@ -4875,6 +5154,9 @@
"maxPositionImpactFactorPositive": "0x14edeb4f5ee66980440cdfd82bc36b526d86225c9d23444487094c41da526a25",
"maxPositionImpactFactorNegative": "0x4d7a0c4c14200e8f4572eedcd3e0d0ecc5d86504661f9f1390478eb7a7c52108",
"maxPositionImpactFactorForLiquidations": "0x5522503c2d885644e228ff626074c899a79689cdd05bb8d67790e462358751b5",
+ "maxLendableImpactFactor": "0xfb52c27fcefb2609956b29fac761b9eb9b098d57dfbbfa54a8bdffbb11ccddf7",
+ "maxLendableImpactFactorForWithdrawals": "0x0be5d9b16721e73e6e070dfe64d01b649b6d79ee2c263e63189e728a7a09b264",
+ "maxLendableImpactUsd": "0x8013378f3d03169032387578c5e109fb8db8941fe391a656ab3186122c360c3f",
"minCollateralFactor": "0x97ea28d35e02b8862fda306e39a8c77858b4b942901171d778184db29497531e",
"minCollateralFactorForLiquidation": "0x3144b9a5938b191d682d5b8efeed673dc9c06646f4e283817ed5269a4b6cd78f",
"minCollateralFactorForOpenInterestLong": "0xdd677dfaf255e6feb915781df3a369173f1ba6a2fdeab9b5042ec3fe4f996930",
@@ -4927,6 +5209,9 @@
"maxPositionImpactFactorPositive": "0xc0e44af408c1c79ee19e0fef8f6b9c8307a67016336daee3621b3f615c652fe7",
"maxPositionImpactFactorNegative": "0xd2ef5fd6cd84b151dc6b5328579738856c7d99d53c98fd5795aef56623c303af",
"maxPositionImpactFactorForLiquidations": "0xcfded09cfb3bb784b53a06ed6b95c34d3ee29481a0e8166668fbeea50ab3286e",
+ "maxLendableImpactFactor": "0xf9897dcd773b1ba122ecc580128b3a20eb2e3929c268e59b038e498dd0d2e1d2",
+ "maxLendableImpactFactorForWithdrawals": "0x2b55d610f89fae16d27b55ee4da7f9351976d0cc50b6d855ad3627659e3f99b7",
+ "maxLendableImpactUsd": "0x755fea56f53ee53ce8149795f297794b064a2fb7ef5cef2ea858fa2c454ade6e",
"minCollateralFactor": "0xa9476f3721a3ace0e929e1ba274fc72c6d8db29cc1d9e2c0fc2bd49bec67b197",
"minCollateralFactorForLiquidation": "0xe0c8811ffba815d0fbb87b64a17f0f1bac3ea3b6613f79f8646289964d94fec7",
"minCollateralFactorForOpenInterestLong": "0xfab6fae41bc596b1bfcfb94ae9584c0de545d379cd225cb9c25c487d0503e4f7",
@@ -4979,6 +5264,9 @@
"maxPositionImpactFactorPositive": "0xbb9a2a0e8df90d35b1ecbc9a6db7bd441a601352dbcd99cdcbea0056619d0f0b",
"maxPositionImpactFactorNegative": "0xc6a7c94f56163dbe9158b0b91e27abaf66020e9938d9f8d0bf0daff073b208ec",
"maxPositionImpactFactorForLiquidations": "0x56b55f2d38345ee5f7f194546671a92848327ddc4541fe1da6d8128892c85820",
+ "maxLendableImpactFactor": "0x11517d9f021a799d56cc05ffe023b8af3fa22e0179b9afc2ede623c1df2bcc0e",
+ "maxLendableImpactFactorForWithdrawals": "0xc3525088ea56688cdc3f32e3a992678fef8f0a73f5c1a94cbf812c49abf8694b",
+ "maxLendableImpactUsd": "0x26e49505583b0c4d0a766368396063d2fc26383e2ca88093f3547b043fdf6609",
"minCollateralFactor": "0x33951e7ffe03288c836a45ddfaf69495b239d3c884d18c273d65d3293fd82492",
"minCollateralFactorForLiquidation": "0xb8b85be580514372ca4219fe34e89d7d0ff5cff5390ed948981ac4b39e138bdd",
"minCollateralFactorForOpenInterestLong": "0xe7dd7bf273ece58779bb00ae9a2e4ab2d1f6e2f112ee752f0a84ba30faea843c",
@@ -5031,6 +5319,9 @@
"maxPositionImpactFactorPositive": "0x483000e66191fc8c744699dddee741439f87f05f61b1b3b300355642fde81ed3",
"maxPositionImpactFactorNegative": "0xd86f1bc409f50d72733d15fd7c61943af6eab714ee4299f2c00269bdf58debd4",
"maxPositionImpactFactorForLiquidations": "0x08d87760292cca5a5f69a8b95583423ad1be6acc521c68f8b152ccd1283ffdd1",
+ "maxLendableImpactFactor": "0xf86cc4e80ed83486a203d9ff30f38623d0ff5306e16750251f5da994f3edaf6a",
+ "maxLendableImpactFactorForWithdrawals": "0xd371f71f87885ebd4068cf3bd59048947f6fcf6722997d0b7cf4a9dfae5abea7",
+ "maxLendableImpactUsd": "0x6aaf08ea12a86b4684eb7a367795aa8ef1a12c8ed55801045e5614108c512e6d",
"minCollateralFactor": "0x9486c729d2726d090319334bf0c997eb6d988e6503abfc033835f3d21e5369da",
"minCollateralFactorForLiquidation": "0x62d319d61a973cf3d78242c86aaff68636bcfb93ee41be3b9060305db4ea1129",
"minCollateralFactorForOpenInterestLong": "0xd7fbf50ca354ff2b3f6828cd7e94d4ed7aa174e32264de0c0aabd07a70d52335",
@@ -5083,6 +5374,9 @@
"maxPositionImpactFactorPositive": "0x41fbf5bebd182b215d84d8a6cfcd739da1f102035358c8e37161c10bb23bb5e9",
"maxPositionImpactFactorNegative": "0x133b02ce85d0279230305871c5ed18f9a1a995cf1a08c58d84da047224e911b7",
"maxPositionImpactFactorForLiquidations": "0x4bf31804c08ca6629d17e8f51e28fb15a7ae9748960415407accdd4b886bb1ac",
+ "maxLendableImpactFactor": "0xbc4271dc645cdb7a59c16379ebdd343b6d1ada38f01cecd54e9761ed0d574ef1",
+ "maxLendableImpactFactorForWithdrawals": "0x91b91a16da46e40742b38969282b0297214b8a36f5e60638301643bde203c3a0",
+ "maxLendableImpactUsd": "0xe85cd1244e603122d8d3b0419264586117d4da110d1357e8f0812a3e4f9f90d6",
"minCollateralFactor": "0xa5212835c9f726f03f4cc8e303e120a1f7cada099661ad2c42cc57dd28a7e3c1",
"minCollateralFactorForLiquidation": "0x8585b33652b828809ca030664ee0d9ea5e3bf9a37b335e934cb4127331d0ed7b",
"minCollateralFactorForOpenInterestLong": "0x7d50ef920428f507294cd36c1782f6d973a2fe06024c91df3cde7689c79fed96",
@@ -5135,6 +5429,9 @@
"maxPositionImpactFactorPositive": "0x810d342c12f39497d4bdaca55af877dbd05f964e4a6d626792683c2bb37ea46f",
"maxPositionImpactFactorNegative": "0x38aee17eb1d3a3866869b91987c0516326292ccec2a7a87dad70b74fd8ce82ee",
"maxPositionImpactFactorForLiquidations": "0x1383bc6b5727ae22703084ef3665da3c3000c20a53f6e6ab16dd9c1435f2e30f",
+ "maxLendableImpactFactor": "0x87eb71dea79f9e9147e18c50874b625378b9d2dd15db5a290a1da097820d69eb",
+ "maxLendableImpactFactorForWithdrawals": "0x5aebbf4c3422790268750ed775f292618e011ffbd1919d380104ec446620cd4e",
+ "maxLendableImpactUsd": "0x7735b5def38a0561a96a26df53592dc337b7ed02afa7e6232454b7285bdbc391",
"minCollateralFactor": "0xee85c017db292f5a8eb09973adcde4bc15ebfd93d8fed7acc24ab19ebd74b07c",
"minCollateralFactorForLiquidation": "0x33b00fb914ce7903aa886f91080c2351c74dab96ad8d7ddffbb6bef6d8d652a6",
"minCollateralFactorForOpenInterestLong": "0x5ae759fed69d3b0c091d183c77af7e0a17e8e28bf134058733d7e4f6c65a9803",
@@ -5187,6 +5484,9 @@
"maxPositionImpactFactorPositive": "0xae1808bb11b54e6d0fe2b85630feb3c2ded4eb5fc8ac820c5178e8038b90ff71",
"maxPositionImpactFactorNegative": "0xeaebc7a49d460ddf770f6014464e36e8b242cba8e657fc32a4a68717108b7309",
"maxPositionImpactFactorForLiquidations": "0x4dbc4b65a887e96a0525c0ed58fe21806d349f7f596ec1d1c66d1020abb11cce",
+ "maxLendableImpactFactor": "0x43f787538d78a2982ef11e17adbd6055fbc1cbe7d7f3321bb713082f2b61add7",
+ "maxLendableImpactFactorForWithdrawals": "0xc2c1928a2bceb51e93a1c8de408430612601e80a44f1f531a216c1f4250bfc01",
+ "maxLendableImpactUsd": "0x81cf9f95385a790d1db64b27d3e85b6e83cf27e8a1efb5e386d329be83f31100",
"minCollateralFactor": "0x0f3ac78bcef32cacef7f434288d1dc395406249bac71ffd1f153ddf1aff1cb18",
"minCollateralFactorForLiquidation": "0x6b71547189b8a846f015a1f2343da687dedcadc907ab4ce46d1b5940de3dfc45",
"minCollateralFactorForOpenInterestLong": "0x45eedbc7142301fe4c59155e6ebd1653a9ff0c9a978099ccb2e9d707967adbca",
@@ -5239,6 +5539,9 @@
"maxPositionImpactFactorPositive": "0xe22c34e3ff7ef7fcb54504b4c66044899d1a384b96d04624c1dc5dabeb6e24a2",
"maxPositionImpactFactorNegative": "0xdb06d0ebe3729da81037c1999fb1b027ed37550201bd6f4075ff5e2d6f56e550",
"maxPositionImpactFactorForLiquidations": "0xabce0e14b6bed5cfb566df3ae082320a41e649005e3fc70da278c9f5569ccee9",
+ "maxLendableImpactFactor": "0x645e69af1d93a9c831437acf36d0470c8cee9cc3aa9a8bf7341a8346a5a5fd40",
+ "maxLendableImpactFactorForWithdrawals": "0xec453c03edf0091beb32aa8f62f9f626ba440ea571d6ff6429f8895d2cd90f2d",
+ "maxLendableImpactUsd": "0x0354f66f3a07b5322458c2d5a07f228c988a01e772550a43b547be2f110dfbde",
"minCollateralFactor": "0xd0e0e53e9fcc4b8aef885995a8c93e42395bc1bde27f72958c9ba5ceaa17b797",
"minCollateralFactorForLiquidation": "0x1b75189827254a93f7a53377e63f17e1b8e28a9e760227a07cab05b17a8c6e8c",
"minCollateralFactorForOpenInterestLong": "0x29db49c2d35032fbaa6998ba219c6b02284f74bfd0acc163ee051df95ed68ca3",
@@ -5291,6 +5594,9 @@
"maxPositionImpactFactorPositive": "0x0555a94ebd0aca297889436c37ca360b21d9a1867d3413495097a4271eca412a",
"maxPositionImpactFactorNegative": "0xe2865315d05144575e7ba076bda6b3e6f1d6a62cfc85b71e54d9656b6806510a",
"maxPositionImpactFactorForLiquidations": "0x8b55985ffe6a807094924998522579cd88bb81f293c1c18cc9ebdd31c0f673c2",
+ "maxLendableImpactFactor": "0xe5721d6e94d288c9654430be4987fa3d783dc1430dd883024130228daf783939",
+ "maxLendableImpactFactorForWithdrawals": "0x967a68e49df22c2a02894afba3eca0e6453e773fa086acf7daaea0df5432eb45",
+ "maxLendableImpactUsd": "0x3f2eed2086112d3b3b1f2a58fa5372070a78a0875ffea86305c4c441763edd92",
"minCollateralFactor": "0x40dde6825fead3925144ef7d7985c7eabc5f1c3989c554c16f0a6750ce8d661b",
"minCollateralFactorForLiquidation": "0x86ec7dea0767afca2e51da7c95db51654f3f0663312019e5e6cc4b0d1ba41843",
"minCollateralFactorForOpenInterestLong": "0x8f3f572e97c9d9c670333b644f13a2d0f6e539e9c061ee0a857cd9792672d22e",
@@ -5343,6 +5649,9 @@
"maxPositionImpactFactorPositive": "0xc46b18667cb5e79692a544765cbf3b008b009c084a840f0716f07e49ffd33a82",
"maxPositionImpactFactorNegative": "0xb374e022a3912b6738b5afb8398914723c91acf6fbd33f1375c0a62d1def494c",
"maxPositionImpactFactorForLiquidations": "0x04560594fff18fe74dd94ec976fe48da33f3ccd2fb5522b10afba7ba587d69e3",
+ "maxLendableImpactFactor": "0x97d1f7d41c638437b98777c03b3388b74eb4980c40c7dca97fba9217ae29c6ed",
+ "maxLendableImpactFactorForWithdrawals": "0xc99f2609161c72997d9c62c49fcf6db65bb39723458bbce2528451f563683e61",
+ "maxLendableImpactUsd": "0x1ceab2cb317724a5fc0354768c165e6dd92822dd5c5390e9d819900036be174d",
"minCollateralFactor": "0xceb66e48992ccf002db99c948b87853fe88fb25d3d2f5639955fda193c33ca22",
"minCollateralFactorForLiquidation": "0xc181dcf243c0f2329ea8f867834c56e7922d6087c6f367ed5c51e860bb1751a2",
"minCollateralFactorForOpenInterestLong": "0x583df5e6f1edfb745d316e7bcd94e72ca9b5ca746577c020be7c18dd7dd4fe06",
@@ -5395,6 +5704,9 @@
"maxPositionImpactFactorPositive": "0xf99eaaaab16734840b8d4300ca590da487556dcc8db34a9268d847536510b97f",
"maxPositionImpactFactorNegative": "0x6535c04d5a63e538f6f562f433d7c993b32f3bcfe19cfc4d3da90a725fdf88ff",
"maxPositionImpactFactorForLiquidations": "0xbc6a63fc5880d67cb592c33676d51dd81ea8b5f48ffc5113afc459ae7186280d",
+ "maxLendableImpactFactor": "0x9d986995d89682b9dcf24e1ae5b7e017a9d4d97cc808212fd610df60e5dc3a33",
+ "maxLendableImpactFactorForWithdrawals": "0xead7c06076b339077d22cf69bfcc2e275509ab440c3ef83eeb4384862155a903",
+ "maxLendableImpactUsd": "0x3500e247bbf32363b84ac11c7d6bf7ebce25e5fda330143d45e10188c796a34d",
"minCollateralFactor": "0xa46adf9b6edb48c1ef2b4bbb2aca842015364a5f80ef06c351663fbf426c409f",
"minCollateralFactorForLiquidation": "0xf72fdbe7a9a4fa1a18392a24aac135b2854ad6702857dcb7a02b0396689742df",
"minCollateralFactorForOpenInterestLong": "0x818e5181980953fa609b761f0ae96c7ca154f7f0646efb32703b8b00f9066681",
@@ -5447,6 +5759,9 @@
"maxPositionImpactFactorPositive": "0x53277309fab06bd5cf4cd915cecab1990fbd08f2cfcdbbe96de2eaca6d3795d6",
"maxPositionImpactFactorNegative": "0x8d19baf07e1b3da292b4f4b001bce49c60d0372a4fc49f934c5ca3c9414dbb24",
"maxPositionImpactFactorForLiquidations": "0x041392716702b20c5a401b7fb483b82cce6c4f4b59876f8f36ffb3c32aa1db80",
+ "maxLendableImpactFactor": "0x2af1c47f779a27a18253d53f6443de1cdffc94a6192e21b639da78604ad9f505",
+ "maxLendableImpactFactorForWithdrawals": "0xb691e2d75e4a37455e4f38a7b8b9b4fde166307d87ba85df806b12ffa2bdc8b7",
+ "maxLendableImpactUsd": "0xf349ba50793ac7f79b1850b03ec2cc01301d6e631b630d11cebbf9154b66ea6f",
"minCollateralFactor": "0x660d36995d7842d65142957335204b2f5a47ee4ef14e45e808cd2a558ee1d64f",
"minCollateralFactorForLiquidation": "0x49ae2627469cbefb68666adbbbeb744cf29a4400c48e0e21c31cc84e0f34670e",
"minCollateralFactorForOpenInterestLong": "0x27e803ec18d5fa51715be719542a289f7423ac9ba9b20f576973d66b2551bf5d",
@@ -5499,6 +5814,9 @@
"maxPositionImpactFactorPositive": "0x0c431c9f06de832473be0ce2b10621da8568de58d41a129cf8dee1cad68e2d31",
"maxPositionImpactFactorNegative": "0x70801029438f48a6f9e93c6c346b4662b7237c7f8956c67f6ed0d6f078a36766",
"maxPositionImpactFactorForLiquidations": "0xf3f9f58a52a4fc1c974c701e5465340061095f605b37e589d1762386d409d1e6",
+ "maxLendableImpactFactor": "0x6c1d98f22fff91d60a00b7c05b1b230a046b90a706418c2316a6c3d04e1d1617",
+ "maxLendableImpactFactorForWithdrawals": "0xa744777827f361636e1ad96588f20e344c7763d253a17cf9b8c5f3cb0eaf3f03",
+ "maxLendableImpactUsd": "0x9946ea3fbd797b9c1613a06aec4c30f015cdb56fa0ec67235106eee841cadcf2",
"minCollateralFactor": "0x47c761a326bc43721df008dbd681a56a95f967c8782f6c5627c44b0ee1e28d09",
"minCollateralFactorForLiquidation": "0x5d8b1de57e1489bee6417db642bdc78295466e0b17ac7cf4f3a4b6cbaf500513",
"minCollateralFactorForOpenInterestLong": "0x8e08f3f7be11c7cf1e417bad78b67816cc018466d09dbc178cbf14e775ec84fb",
@@ -5551,6 +5869,9 @@
"maxPositionImpactFactorPositive": "0x6a348a258a1098bae9ec5b403d66b4e0b14d27f5ce1fb2b13767d6655c4ea428",
"maxPositionImpactFactorNegative": "0x3119b21aa76ac0e07b2df9300c392b6156a893a2bf6c75c785dd67b8e3dcc8a1",
"maxPositionImpactFactorForLiquidations": "0x74f32194510fe6d7b037bc0fc902159ad98ec50b06317ca50726ee5695ed5920",
+ "maxLendableImpactFactor": "0x7b03b41e9a35c9255a36f3a2ea41f5d8c94ca90a8e56658957a4c47b14a6711b",
+ "maxLendableImpactFactorForWithdrawals": "0xddaf6fa2c5ac46d8f95e4f366bb5e4b0f86f4fcace6d44d2f09b9be4db3e5887",
+ "maxLendableImpactUsd": "0x4916e8e20539620254fe26d080e1c680d02dae6a51ba6739263bf33d778775ba",
"minCollateralFactor": "0x70d8296fff44280d8f08d21c4827e88e576995b4ba5abe74057005597a25366f",
"minCollateralFactorForLiquidation": "0x9ea6294cb72900e32d374e281f6bf719a9a65fd530ecfb43f4fd2dccd7d267b1",
"minCollateralFactorForOpenInterestLong": "0x1ad4a9c2b4ce935ef436514c8854eedb430a2d63208a46b5b4c1a539c33e3d09",
@@ -5605,6 +5926,9 @@
"maxPositionImpactFactorPositive": "0xc6e8ff82b7067dd8ba4d505f65921fa7ef232a09369691b1bccb4f36a5fc478c",
"maxPositionImpactFactorNegative": "0x505752b0d40ffae647798a4bd22d80761466d2a05ccd57c64c55c65e96c46beb",
"maxPositionImpactFactorForLiquidations": "0x2ed4cb8dc5a833446a21721d3415cc0338c637436b0d9dd5800b6493fb998b36",
+ "maxLendableImpactFactor": "0xede02bf5b44840e30969babd4f118cc6b7e1417a8c9679dba4e4343d1849cfdb",
+ "maxLendableImpactFactorForWithdrawals": "0x47f9d09cd9c1e56b7433edbf033d908ee9e2516e3063f470d46d5de26a0866e4",
+ "maxLendableImpactUsd": "0x575358386936c0620890f124f6d19141fd53c5745167a1a23d8a461a5e3aae29",
"minCollateralFactor": "0x79c16947dbddcd32e966cec7dab3ba71dfdcc0024ae40d2207d271067d727681",
"minCollateralFactorForLiquidation": "0xb8e50c3357c9b0687230c6323576d8c4ee3945c335963d1b140edeaacb2d4266",
"minCollateralFactorForOpenInterestLong": "0xa4bfbf6c0ee876da9dcbfee32442a86b0f70ea215d40f50d6136531dde67e999",
@@ -5657,6 +5981,9 @@
"maxPositionImpactFactorPositive": "0x30e99c791acc5aee7b6dc78ac7375ce3f9edf7745062239ee1b6fa54793ec829",
"maxPositionImpactFactorNegative": "0x2eda01c71a69850c6bc77ec241f94fa7dd2b3a5663a8e91c7d881a9b376c8dc8",
"maxPositionImpactFactorForLiquidations": "0xc3f4605a72bee84cf508210e7cc38fb8ec214af45a27fb5896bed941b4295358",
+ "maxLendableImpactFactor": "0xa4b4dcc843bd519c25c8f9e70d0ba37cfd2ff83d416261138e059c2e430a1f00",
+ "maxLendableImpactFactorForWithdrawals": "0x8146f601db0a6724c0490b88a7d1131ffdc58dd2c4bda1b2cb89acbe5db00572",
+ "maxLendableImpactUsd": "0xf4d256872fdefbcf6f9b74b35ef660550377eaf74d9d13f26c70df2f30c9cf66",
"minCollateralFactor": "0xc2edb3063d48246267159dc0decbc6ad303c34d2ca3dfccd5f22ca671ba417a6",
"minCollateralFactorForLiquidation": "0x13c9ef205907f266e10818c057548e059c57d5a0b0fca29f21341a3a34a5f3c8",
"minCollateralFactorForOpenInterestLong": "0x21af53e3b857539d49a91f80cd682c8386a7536bacee74a1e3694fcd304a8e46",
@@ -5709,6 +6036,9 @@
"maxPositionImpactFactorPositive": "0x87906bb7a0d357d25f8ed21eabd489b025c321b2916e03f8694f319053bf1361",
"maxPositionImpactFactorNegative": "0x127276fbb55e276a0f1b3be9f0ca36b656d46b87215b98180bfa14e78471dbb2",
"maxPositionImpactFactorForLiquidations": "0xbacbc40e853def28c8e96ed81e0d395d1a9aa1e654a6e35b590a66b26cd16b15",
+ "maxLendableImpactFactor": "0x0c1c501bad7caa28ce0cda92c9d13c41e1bdc27420c262dc86801600ce4e0300",
+ "maxLendableImpactFactorForWithdrawals": "0x82672a03ee0b97e8fba5febf62e25e2af569f1d84ea5b3ab8e0f29d64baa0745",
+ "maxLendableImpactUsd": "0x5ad0e04cd5e93778c30d1d0c96b2c22a8d5824733cdf0723ea91310a87c888f4",
"minCollateralFactor": "0x44602657c72e1dbb7ac480657ba83e69528e0b3d1cdcf2232dc8f37156fc4d71",
"minCollateralFactorForLiquidation": "0x096a65eaa096404bd43912fab0518b62149c2bf39f85d1848fd4d78c40f8dedd",
"minCollateralFactorForOpenInterestLong": "0xcf807ed6fdcc8664b593225fc63bb816add4008d891a840fc6af82bb00f9bf3c",
@@ -5761,6 +6091,9 @@
"maxPositionImpactFactorPositive": "0x2482cb95ad826a33a01a649439805f9295b2bffe6efe7b22a5b720cf7dfb7adb",
"maxPositionImpactFactorNegative": "0x40f507260eac6d8ef3148a83c4bbb9f3027b8dd0705c25cb0d87fee8f7f2f23d",
"maxPositionImpactFactorForLiquidations": "0x65f16fd2b957f2ebbe014e43740b694eceba4c8f42c90ace60fe4757d7585b0d",
+ "maxLendableImpactFactor": "0x52a172fe78507a9b9add733f90452d0a34ceb3816b9767276b98d85811835206",
+ "maxLendableImpactFactorForWithdrawals": "0x752da6cd6aa8253a60ca57985add1d8ffee67545335af24e4366b8ddc91abce6",
+ "maxLendableImpactUsd": "0xf95b2bd88f276a228ae665c88208504a71e3bfea2e410f081042f071f52bf1fa",
"minCollateralFactor": "0x03257da2786063bfdd152d461897826eaf6dc4b2694b0b10710a6537e478ccdb",
"minCollateralFactorForLiquidation": "0x71a102ce47f7a87ab0db19e35ee9bd0490ab45b2b21733cd96c946728333c56e",
"minCollateralFactorForOpenInterestLong": "0x958a0b1e22336db2aa2a005c0f60bec36679d2f78effd8393d8faa699cb6f401",
@@ -5813,6 +6146,9 @@
"maxPositionImpactFactorPositive": "0x48932c41a37bb5d92ced58448a95e809e96961bd3f7832a7911e3041246e1be7",
"maxPositionImpactFactorNegative": "0x191b0a45795e7aaed845f26d2f8773c8257d42e64cea8af9fda6503f523441c0",
"maxPositionImpactFactorForLiquidations": "0xf36d46d20e0c1d149236595d78dd3ddd30347332890a251c867d61ec30100141",
+ "maxLendableImpactFactor": "0xc15d25d475f4aa50f9a5259cbe7a305a9847cdf6c045b230a6afbc1cd5f18531",
+ "maxLendableImpactFactorForWithdrawals": "0x5d91aa603ca8ea2d4acb5cfdcab217ab180813ca23ff7670b30b9b4607e2b708",
+ "maxLendableImpactUsd": "0xb1de43a4aafe1524432c9c4db804da4f7367fc8bd9cc0ae46e9e466c04d6283d",
"minCollateralFactor": "0x03ecbc69da5ac390ea111fe758b31fa45985710c5a9c25586abb760798bbbf9c",
"minCollateralFactorForLiquidation": "0xd920b7294e62802604fada6c7c980ebb231a9aa0696622422269bdda53254fd5",
"minCollateralFactorForOpenInterestLong": "0x5f9b7158e11769003f8be017ed1bf645a37c93d2c7f1a07fbcef8ec7f04cbb6a",
@@ -5865,6 +6201,9 @@
"maxPositionImpactFactorPositive": "0x44883af09d61a5b41c7deb568c97737dc232031443215f6042ab1fa0054e99ce",
"maxPositionImpactFactorNegative": "0x8d3d65312060d4e8c2e1ef88e1b12303fbb03e94b4067d2568a696aec00deacb",
"maxPositionImpactFactorForLiquidations": "0xff0330b70a4077634b40ca74c3933d6d7815a91a542082add3fc1ebe41273d50",
+ "maxLendableImpactFactor": "0xafb174ffaf8c22d2186ede3633386a2679c5ed9dffe2ba2ab2cf2d56467e6d92",
+ "maxLendableImpactFactorForWithdrawals": "0xf600423e844ceebbe6fbae6cd7555a99b428eb86905f6115658fb17146d07eeb",
+ "maxLendableImpactUsd": "0x5fc6ba3bfef635a161b780169896828c41dc9166a4430883ccd793f8c6c74542",
"minCollateralFactor": "0x27aae14bd281c4cad2e25eb7dddf2056cf33fe30c92334b6c1908e33603a594a",
"minCollateralFactorForLiquidation": "0x4d36cb411e16178e83604c194f3384eea3dfc987123fd9cc25ef8f78dd043ee1",
"minCollateralFactorForOpenInterestLong": "0x35b24de0a1a1af62333ba0be24b03cf0639b0e1395d94c4cedec839ca221b0e7",
@@ -5917,6 +6256,9 @@
"maxPositionImpactFactorPositive": "0x9a594d5ba6384739325febf4bddd5b6cca6fb616edfd9088afbee47fb41ff533",
"maxPositionImpactFactorNegative": "0x1fe2b6e82973868d11b609eaabb2aaad17824947cf596b31285207b6a783a402",
"maxPositionImpactFactorForLiquidations": "0xacd16f5d1fc4dbfe6e4d7ea04482a833154d53ee9158fd4bcf814a3c152c7968",
+ "maxLendableImpactFactor": "0x218dfb2f3fa7191c4314e14e2e8ba2945227027b451a23eea586f505242377fa",
+ "maxLendableImpactFactorForWithdrawals": "0xb260aecb10c9f454588ec8744bd33fe7996e449f70f197bff29b8f9d4ec9a3d5",
+ "maxLendableImpactUsd": "0x726bf4307a78ca4571ac740aaa9b8b643ce70e00fd2875843a363eb07bbf971e",
"minCollateralFactor": "0x698b96cd3a094ea412a7628c971920e715fe06bd06e200035b367b3dc046f745",
"minCollateralFactorForLiquidation": "0x00a26c33e84c34d7464b8b5e05c899812831d9c82e964ca0f6f73e84eb5a7c1e",
"minCollateralFactorForOpenInterestLong": "0x58330b893e1565ce7732e4b4d3255dc018500d7aefd5d58946144d3067508cc0",
@@ -5969,6 +6311,9 @@
"maxPositionImpactFactorPositive": "0x030f83905621bfd3cd25bbfe083e31bcb71db9826b067f346ee05170950136dd",
"maxPositionImpactFactorNegative": "0x1926d782940abb168cdd50e7c4a4db14fb213dab129751ff6b6cfdda7a1153e3",
"maxPositionImpactFactorForLiquidations": "0x72bbd2b2d9d41e43f87c725279a503454cf2ee59430cdde4b5c8efc5d07f0aea",
+ "maxLendableImpactFactor": "0x0def8c8ea46384cb92a739eb0740b85aa9501a27c1e0b83de960af9c67343e4f",
+ "maxLendableImpactFactorForWithdrawals": "0xae42fa5e213f98535331eb37f6d70d88b1b1244713d7dccf1b585ab06436b7f7",
+ "maxLendableImpactUsd": "0x06ca1a93a5dc53cbe9ad35ae34186d6f863555074a5b712728d36d3e8c1aa27e",
"minCollateralFactor": "0x3c8e9a2263e7b3aaed77f397cbb78c154d7df45c8fd9f3293610e7a9499f3bd6",
"minCollateralFactorForLiquidation": "0x8e64049c3c2981df32bed046c45d8b9a264df191d293b069d02d0e790add562c",
"minCollateralFactorForOpenInterestLong": "0x68db012f561515480190c5a28c8b7c8bff8bcfefa9f2329aa4ebb00a64dfb027",
@@ -6021,6 +6366,9 @@
"maxPositionImpactFactorPositive": "0xefc0e6f13b3331a365027b599cb8bceaaa44eba98e35841da10f95042ce2ffc0",
"maxPositionImpactFactorNegative": "0x3f0f9566fb6f301b104bbcdab7775e865df1cffc16a345bb33f8807b947431ee",
"maxPositionImpactFactorForLiquidations": "0x75ecfa326eed4ad5245c1e4bfdda62bd8cf3edf7460afad031192c187071cf70",
+ "maxLendableImpactFactor": "0x22eba806cb5e0c3009a64cbd36dfe0c17608afd15fd51fe16ce47227e3a6dcc2",
+ "maxLendableImpactFactorForWithdrawals": "0x54c88b5d971110d4696941f23633e7580df99a0bb0554d81075f1e7690981907",
+ "maxLendableImpactUsd": "0x5c0c70fd4d948fc0eb766512928cc611648c1c3defc6875b5fa542a4dcfee832",
"minCollateralFactor": "0x2c1b564020448b09588e27ce484dac4ed1e5788851545539ed25326726fa047d",
"minCollateralFactorForLiquidation": "0x9793b322d406bd3ab07bab9bfeba55d733658a1866fcd18806a2ea761138e9ec",
"minCollateralFactorForOpenInterestLong": "0x764b0b370f16745c38880c82893b0b0272f2631f1298984dce74474631a139fd",
@@ -6073,6 +6421,9 @@
"maxPositionImpactFactorPositive": "0xe94e46b223077a3dfcfed3014349de0924dbcafa5d5e12436a179b1148578c09",
"maxPositionImpactFactorNegative": "0x1240bf4cd804c59b4d70c5f53273a26a1f66d6a2a3b041c7eef81b64b2e64e7f",
"maxPositionImpactFactorForLiquidations": "0x69b5edc246570d7a59c97b4b024398d7872e5e809881f97e17c7edee0d084877",
+ "maxLendableImpactFactor": "0x80ca26367a53b7bb69eb63378896b856d9c56873e514539df9fd1f8cbe0f5fcb",
+ "maxLendableImpactFactorForWithdrawals": "0x6946ea1947e9f712789712f745d5501523f92ddc69ee681186e7215cf7f6c325",
+ "maxLendableImpactUsd": "0x389a546d02e4ac6d3d52cfeafe5bd1a34a3a1419974e040e4f8cfee3a6a9b22b",
"minCollateralFactor": "0x8c07e19be90a3b67ead909350737c6f60ec7994cf1284b8de1374a905df4782b",
"minCollateralFactorForLiquidation": "0x47485a33abc979478e8344f4f7d339fe712240f96bba4b1b86e87d5e787073b5",
"minCollateralFactorForOpenInterestLong": "0xe1a895360341ff2c180e3c4243d98086f42adfb2b9d2e5081ac3a5f955d63d07",
@@ -6125,6 +6476,9 @@
"maxPositionImpactFactorPositive": "0x56f3bd4b6832379e513140b9c350ab03da7cc63005fd55651e65d0feb9784906",
"maxPositionImpactFactorNegative": "0x26ccc2913b07c97f219cfb9a1f1f5ed65318c3504404e547bde20c6c7d816310",
"maxPositionImpactFactorForLiquidations": "0xcb6ad3df6f86f0480c0f46ecf12b617607347bc774faf8840d30565f0006fd78",
+ "maxLendableImpactFactor": "0x2951dbec739b96f6c80548203cac5b59883a33f7d8169c7bbe6a6bf99be780bc",
+ "maxLendableImpactFactorForWithdrawals": "0x233d6a215085716798e78c682a74257be7d51f245b2786c4bfe337dc3bbadcb1",
+ "maxLendableImpactUsd": "0xf69e318de5ae2ff85065f2f5240e7f849c3d7e07bdb9004742b1a1e9c0f025a1",
"minCollateralFactor": "0x6e0deb754cc255b60e296d94475feb89ecb013d88a5091c3d9784547a2cd00ea",
"minCollateralFactorForLiquidation": "0xbf4106a36b751df8edfb0c97be58049aa60a9535d83945c1e856f91aac3fbe2e",
"minCollateralFactorForOpenInterestLong": "0x39019addfc2617caa7a3c788332ec013a656af5eeb2726791dd869e978b6f0b5",
@@ -6177,6 +6531,9 @@
"maxPositionImpactFactorPositive": "0xe9bbed667ae52cbcc22d8903f5f3c889e17cc0b4a6fc995a26385ef189bb8c68",
"maxPositionImpactFactorNegative": "0x3c09dbea3b5ac087cac8f9c8f775aeddbdadcb2be2d04ec6e7353bdab8da7635",
"maxPositionImpactFactorForLiquidations": "0x8e295cf7af601901120e22edd2c3ae17b6fa8e0fcf16c1744f374054ae457b1c",
+ "maxLendableImpactFactor": "0x8d16f5c15f018ef27f8fffe83d845516d72374453112ad3c58f6ba9c4854278a",
+ "maxLendableImpactFactorForWithdrawals": "0x71fd88f3e3d94c6b3027b0b13b0c6fcaf00118b551fb1290aae4c362d2959e9b",
+ "maxLendableImpactUsd": "0xbd4ef1fd1114165f56db57865f029ec14b70c5137ab2100cb2f51c263d0701fe",
"minCollateralFactor": "0xd2a56837fd65e7a57ec1b4df363df080248a402cdf8e4e10d32205f1299315c9",
"minCollateralFactorForLiquidation": "0xfbd2218164ffb156dd63428496d0a3038351db6817aa610b8a3d9c01b6da48d6",
"minCollateralFactorForOpenInterestLong": "0xf7423212c3b818bdb9261de36121cde34561293943f7645be9b61f0c35d8a996",
@@ -6229,6 +6586,9 @@
"maxPositionImpactFactorPositive": "0x5bf9efed9d033d8b3d82ac1ba1702bf49d60d7777d313cfbb63d8526acacde52",
"maxPositionImpactFactorNegative": "0xa072463b5208c63f61e70635833da9e17f4c8b309731674dadd4b5ed2aa2d6b1",
"maxPositionImpactFactorForLiquidations": "0x4c6abc8a7e55f93dbe98925db44f441c8a6d58ae4c30f1c292d2de9be2bacc8d",
+ "maxLendableImpactFactor": "0xc6273fcfdf59cd91deb9fb9686994494903d24a668dd4ad0960048cc817a4723",
+ "maxLendableImpactFactorForWithdrawals": "0x6213a0c14104706f4387d058b9cdb7582e400d89a03dc291fd9340077744d57a",
+ "maxLendableImpactUsd": "0xd790b6460a2b4c13213d3a699653358bc4d22d0e5324cb36d2ea96b7082a2fc2",
"minCollateralFactor": "0x2f63aa6789d2240d4a5aad10ba4b0c0db02e4972c9dd4ab57f67efec5028c9fe",
"minCollateralFactorForLiquidation": "0x0665b1af9c69fea970edc0f3ec2b5c6e6319e90749f8f70c60460cd7bde7230f",
"minCollateralFactorForOpenInterestLong": "0x8854c35c045fa4645e96d74bbd69b2e0bc8404a342aa528d70cdc0c015026ca9",
@@ -6281,6 +6641,9 @@
"maxPositionImpactFactorPositive": "0x3f0459921f4e5e61cb8d446dd272e0bfd9f48cdb07d56369dbbc483b2722412d",
"maxPositionImpactFactorNegative": "0x0a70f20878f3ebcb0412780dd074651d29dd4e33564801af749ec1b219e3ce86",
"maxPositionImpactFactorForLiquidations": "0x0c38e8b8f845b3cc6c44e36ddf308aead734dee480d32f423c9e7e77f9b0c20d",
+ "maxLendableImpactFactor": "0x5b88cb66dee6cb5dd91dadb3901d8750fcd4ef4958d904cee1c86a554127e19e",
+ "maxLendableImpactFactorForWithdrawals": "0x2ad2552fb14cf42643c0cd8d117266d5f9306cf7973c8e606b419b86fa432eb2",
+ "maxLendableImpactUsd": "0x223f7aa968e4d0cfa0719b43405e29ecedbc98585b16e36703fb433f3a5c0d90",
"minCollateralFactor": "0xd38d20369d10ff1ed3db4eac4f163d02310aedcd18a1d8ffd0e6e3ebb41d3907",
"minCollateralFactorForLiquidation": "0xb09c34890fe5881ad70910d4f2f6ea1ad50ef8990deedb4f6bd2a67212024656",
"minCollateralFactorForOpenInterestLong": "0x09d4ab823430791729510b7468eaaabcb5e8c00f90ecaa1c0fdcffec4c8aaa0a",
@@ -6333,6 +6696,9 @@
"maxPositionImpactFactorPositive": "0xf89e8a9d7805cfff27c4f5ca38fa2661cd2173227d018b822c254d982665680e",
"maxPositionImpactFactorNegative": "0x43e3fef6d75c28ee36b8f8df12f375aaee95018a1bb6525b40c440a85e40a724",
"maxPositionImpactFactorForLiquidations": "0xa20e5a211dac98b89ee7dd23830d4fef0b911bc430588d4e4a3ffbb443ef888e",
+ "maxLendableImpactFactor": "0x60ea3fb8c0541347b44a27c9adf58e1d7977c75a12da3231c1f5d99177670b91",
+ "maxLendableImpactFactorForWithdrawals": "0xae7bf691e11f1ada5a403209414a428140d869b9f15bf32c4d8abffb7b4f37b4",
+ "maxLendableImpactUsd": "0x7cca29147821282e9cd61ddbbc45b2989d9a4fab470d277e19af5d91c49df52b",
"minCollateralFactor": "0x28b8c6de3b16af893d3062b3c6dd997355b0571f574d9d3614932a2aee60c2bc",
"minCollateralFactorForLiquidation": "0xdf248c72ad94002750220a12ba36fc086656e26676a6700755ba2e70eb3bd3a7",
"minCollateralFactorForOpenInterestLong": "0xdfad34850b6f15e9790e144784adf3e0dbe917690bb3f58260b5e578ff17e8c6",
@@ -6385,6 +6751,9 @@
"maxPositionImpactFactorPositive": "0xfa7f7b8a323dfc202971fc487699fe4182f7bea1e938000a0ac5cdf2e3e4d08c",
"maxPositionImpactFactorNegative": "0x0f8d93bbcd3913979a10b97c5c35c0ac9422be88b98c33f2a2ac7883626c8c46",
"maxPositionImpactFactorForLiquidations": "0x631c0c8acda0aa7818ad99ee375e50d8c4275aa073e6b3dc0861797d835ab103",
+ "maxLendableImpactFactor": "0x2a06ec84a62ccb33f287dd45185f7bf53cc99a1f93569c347a3235b9c7627ae6",
+ "maxLendableImpactFactorForWithdrawals": "0x2fbf71e0d4fe56729305f96cabf0114d94bb0f0b6084c580588b4b44a9d492e5",
+ "maxLendableImpactUsd": "0xbd9c23f98d94e6649cb6abe4422a6332e3860e2c52306a711662240d466fd90a",
"minCollateralFactor": "0x31ff077a89a32edefaa4d80de3855e73eaf6a40cc50f32ebe71560a577c4afba",
"minCollateralFactorForLiquidation": "0x5d282deab53e4da440e31d2f5627a9596a180d66855aa39e8afb0fb887459757",
"minCollateralFactorForOpenInterestLong": "0x5adf64aba368af76710a5ace26141cbcc2d482564ff50ff73428a666445593c1",
@@ -6439,6 +6808,9 @@
"maxPositionImpactFactorPositive": "0x195d5103e0b678fe18962202af5e0f7d23f006ff5d6f4251507fdc33b0904322",
"maxPositionImpactFactorNegative": "0x2d7f0f5d04c19fd9d7f353e8f51112370c9797b3cf3e47df3cf405a8f984a6af",
"maxPositionImpactFactorForLiquidations": "0x0f49be714a6c0867808bd206252d6923e950915118468a8abe497acb9d266093",
+ "maxLendableImpactFactor": "0x022ad3811d7b7d91bc080bd3301809fcf2f2d81a8038cc01dd3055b8eb688620",
+ "maxLendableImpactFactorForWithdrawals": "0x19d6b24c84ef3046336297552cb5a0d5d7bb5b7b7d08fbaa16f0891be5cf1209",
+ "maxLendableImpactUsd": "0x99b21d3e9498dee8d5ac721b3ee663996f73b5c396afff9e8d85a398cafed053",
"minCollateralFactor": "0xc8ac65a0133369e799e6bf3c2643209fc8999c2bcff00259d9627e16ab94df40",
"minCollateralFactorForLiquidation": "0x5f1772e6791b6c0a69b330be106779748f3a9f8d283357a42308bcd741f65989",
"minCollateralFactorForOpenInterestLong": "0xce4c8aa0201126eed98457458fc4d149dcf4493dd67f019fba0201d31699ef29",
@@ -6491,6 +6863,9 @@
"maxPositionImpactFactorPositive": "0xc0298da5a9e2deaa3cb58fef159a83d6acd73199e529486e390d8954d805d54e",
"maxPositionImpactFactorNegative": "0xc0adebdf41a6f30c0a33e801dfe4441bd35a183f3a78a7799831c978f222fd42",
"maxPositionImpactFactorForLiquidations": "0x71d401a3103b3ad15f7b3bd545bff45fd3e911b15a372869c7da887e570b2ca7",
+ "maxLendableImpactFactor": "0x7b6fddaaab7639f429fe405d397616696bb906c4be231cfb1c4d7e236562c50b",
+ "maxLendableImpactFactorForWithdrawals": "0xe556b79a93716a37cb4b0a756f9742dcdadef058d74a812d65ae62ae59a89e54",
+ "maxLendableImpactUsd": "0x9cfe20df3a4b61875138447ee723fe49dbeb3527295e022c21c020256c16ed3c",
"minCollateralFactor": "0xc71123704a2c87e18f41f95e892d2e27ce8da0b6018544ae460f48f8f2144ea4",
"minCollateralFactorForLiquidation": "0x7992b22e42f8e8f71ab230265b54505134806d370ae23ea1846b52cadd750028",
"minCollateralFactorForOpenInterestLong": "0x06dae7e677152cf439b23a94671cfe2f632bae0a0eb85f52610742b73280818d",
@@ -6543,6 +6918,9 @@
"maxPositionImpactFactorPositive": "0x8bf288bd429a21ec0e505a4b76fc46ad8599a7cdd7acf412e703e05cba852e15",
"maxPositionImpactFactorNegative": "0xee5014c8e6b0d317afa6dbf3ad0512046c5352ebfbc9e2c5bb8b194b9584a2df",
"maxPositionImpactFactorForLiquidations": "0x5fc79117f4e9b35419d2f5cd17f558be6f5c080156f3f80ccc26bbca8d57f574",
+ "maxLendableImpactFactor": "0x9200212f010b5dd1abeb243eb2ac086d9bbcd93551d90e20804aea6cab322b56",
+ "maxLendableImpactFactorForWithdrawals": "0x7300e17fa70454eb385939bf4ec80163beddeaf3f354790ef94aed9dc4c13d10",
+ "maxLendableImpactUsd": "0x280ea380e16eb78606095ca2ddfc82434fbec454e9779085a9d7163e8d951f8e",
"minCollateralFactor": "0xf7acb321f5990dbd2bf54ddab8e7426f8c045dd4be514bb56b519748395f3cb5",
"minCollateralFactorForLiquidation": "0x9a87fa7bb6705fede532152e983195af8bf8b86ed9b80c87ea22dea75b961c3b",
"minCollateralFactorForOpenInterestLong": "0x6ed33823024e228a1e472abbb2b3101ade60d23a6a6039ce31db1558d0954430",
@@ -6595,6 +6973,9 @@
"maxPositionImpactFactorPositive": "0x5aaf6678ea33ed3d589fc87b7805bbb094492c3ae15e56ae493dd9f14fb7eb15",
"maxPositionImpactFactorNegative": "0xff1c5cc44fb9debaf827b86c2caa20763dc9a3af29f0190b8ca7f0e023803f45",
"maxPositionImpactFactorForLiquidations": "0x3f2252f85c1256f07b5f8d3653ba0d151275399bd78c9c150d2d5fdd793dff1c",
+ "maxLendableImpactFactor": "0x2eb81ca2db52707f192ab9632661f0e1132cdfc0694ad18bee397a254f222731",
+ "maxLendableImpactFactorForWithdrawals": "0x6a89295107925cc7889dd59bbb7105ac3c9584561e8c96004478d45814e912a2",
+ "maxLendableImpactUsd": "0x3988b771b9d14b205a91822bd00ca86670b27988546645d5be212e6249b58312",
"minCollateralFactor": "0x0ea5c12870d31f5d56509a8d6f937d6d265bb0835b1633663c78d3b55ad2cbc6",
"minCollateralFactorForLiquidation": "0x4dc8fa882d20557c438d4b989132dffcdec3a2eaba1089cef51b90436232479e",
"minCollateralFactorForOpenInterestLong": "0x638947e41e3db0abc6f46332e4c0312c0f771ed78912b88148a27aa777c9b3f6",
@@ -6647,6 +7028,9 @@
"maxPositionImpactFactorPositive": "0x8ed5cf785b7bbf911434a93877ef8ff62ee004e6a316d584a14e5cf694267435",
"maxPositionImpactFactorNegative": "0x89a8e7d6a7a53617847d3c7101d1e9b637eacb8f614cef2148dcbc1753cc860e",
"maxPositionImpactFactorForLiquidations": "0x8d5706ffa347c8e3730dbb1ca3c5d280c77059ff6f2a8fe4ef0968d71d46a3dd",
+ "maxLendableImpactFactor": "0xf708b5ec47885aabb16b2d447bf2cd5c1402a3bdcf70b3a5e109371f1369a98c",
+ "maxLendableImpactFactorForWithdrawals": "0x28de0a3bba927558d52feec34658ddc40cbc5ba8dc1b93a4375d92657bd287e6",
+ "maxLendableImpactUsd": "0x2eca434623f8709dc1cfe29b4c8ee81075194579976131913f1b79cce84dd375",
"minCollateralFactor": "0xe90b7b04eb6f259d072fd69ed1f54345da2f08de8fc9a0dcc299a87c8bf98244",
"minCollateralFactorForLiquidation": "0x97c9697f9c54bee1d7aa87aafb951e9271ee448039c033ee1b07f82f6bd393c6",
"minCollateralFactorForOpenInterestLong": "0xa671eebbbbf69e5fdc8ba09cd259de013c3efedf731d39a16b2aacfcb0897650",
diff --git a/sdk/src/test/mock.ts b/sdk/src/test/mock.ts
index 0c090768ca..9b9365679f 100644
--- a/sdk/src/test/mock.ts
+++ b/sdk/src/test/mock.ts
@@ -223,6 +223,9 @@ export function mockMarketsInfoData(
maxPositionImpactFactorPositive: expandDecimals(2, 23),
maxPositionImpactFactorNegative: expandDecimals(1, 23),
maxPositionImpactFactorForLiquidations: expandDecimals(1, 23),
+ maxLendableImpactFactor: expandDecimals(1, 23),
+ maxLendableImpactFactorForWithdrawals: expandDecimals(1, 23),
+ maxLendableImpactUsd: expandDecimals(1, 23),
positionImpactExponentFactor: expandDecimals(2, 30),
swapFeeFactorForBalanceWasImproved: expandDecimals(2, 27),
diff --git a/sdk/src/types/markets.ts b/sdk/src/types/markets.ts
index 3aa1f3a34d..418eac2046 100644
--- a/sdk/src/types/markets.ts
+++ b/sdk/src/types/markets.ts
@@ -100,6 +100,9 @@ export type MarketInfo = Market &
maxPositionImpactFactorPositive: bigint;
maxPositionImpactFactorNegative: bigint;
maxPositionImpactFactorForLiquidations: bigint;
+ maxLendableImpactFactor: bigint;
+ maxLendableImpactFactorForWithdrawals: bigint;
+ maxLendableImpactUsd: bigint;
positionImpactExponentFactor: bigint;
swapFeeFactorForBalanceWasImproved: bigint;
diff --git a/sdk/src/types/positions.ts b/sdk/src/types/positions.ts
index 16073ff44d..0f7e65de8e 100644
--- a/sdk/src/types/positions.ts
+++ b/sdk/src/types/positions.ts
@@ -66,6 +66,8 @@ export type PositionInfo = Position & {
pendingClaimableFundingFeesUsd: bigint;
};
+export type PositionInfoLoaded = PositionInfo & { marketInfo: MarketInfo };
+
export type PositionsData = {
[positionKey: string]: Position;
};
diff --git a/sdk/src/types/trade.ts b/sdk/src/types/trade.ts
index 863edb0e38..0ae90d8ba0 100644
--- a/sdk/src/types/trade.ts
+++ b/sdk/src/types/trade.ts
@@ -112,6 +112,7 @@ export type DecreasePositionAmounts = {
proportionalPendingImpactDeltaUsd: bigint;
totalPendingImpactDeltaUsd: bigint;
priceImpactDiffUsd: bigint;
+ balanceWasImproved: boolean;
payedRemainingCollateralAmount: bigint;
payedOutputUsd: bigint;
diff --git a/sdk/src/utils/fees/priceImpact.ts b/sdk/src/utils/fees/priceImpact.ts
index d24306e3e2..ad7911f987 100644
--- a/sdk/src/utils/fees/priceImpact.ts
+++ b/sdk/src/utils/fees/priceImpact.ts
@@ -73,13 +73,14 @@ export function getCappedPositionImpactUsd(
opts: { fallbackToZero?: boolean; shouldCapNegativeImpact?: boolean } = {}
) {
sizeDeltaUsd = isIncrease ? sizeDeltaUsd : sizeDeltaUsd * -1n;
+
const { priceImpactDeltaUsd, balanceWasImproved } = getPriceImpactForPosition(marketInfo, sizeDeltaUsd, isLong, opts);
if (priceImpactDeltaUsd < 0 && !opts.shouldCapNegativeImpact) {
return { priceImpactDeltaUsd, balanceWasImproved };
}
- const cappedImpactUsd = capPositionImpactUsdByMaxPriceImpactFactor(marketInfo, priceImpactDeltaUsd);
+ const cappedImpactUsd = capPositionImpactUsdByMaxPriceImpactFactor(marketInfo, sizeDeltaUsd, priceImpactDeltaUsd);
return {
priceImpactDeltaUsd: cappedImpactUsd,
@@ -107,17 +108,19 @@ export function capPositionImpactUsdByMaxImpactPool(marketInfo: MarketInfo, posi
return positionImpactDeltaUsd;
}
-export function capPositionImpactUsdByMaxPriceImpactFactor(marketInfo: MarketInfo, positionImpactDeltaUsd: bigint) {
+export function capPositionImpactUsdByMaxPriceImpactFactor(
+ marketInfo: MarketInfo,
+ sizeDeltaUsd: bigint,
+ positionImpactDeltaUsd: bigint
+) {
const { maxPositiveImpactFactor, maxNegativeImpactFactor } = getMaxPositionImpactFactors(marketInfo);
- const maxPriceImpactFactor = positionImpactDeltaUsd > 0 ? maxPositiveImpactFactor : maxNegativeImpactFactor;
- const maxPriceImpactUsdBasedOnMaxPriceImpactFactor = applyFactor(
- bigMath.abs(positionImpactDeltaUsd),
- maxPriceImpactFactor
- );
+ const maxPriceImapctFactor = positionImpactDeltaUsd > 0 ? maxPositiveImpactFactor : maxNegativeImpactFactor;
+
+ const maxPriceImpactUsdBasedOnMaxPriceImpactFactor = applyFactor(bigMath.abs(sizeDeltaUsd), maxPriceImapctFactor);
- if (bigMath.abs(positionImpactDeltaUsd) > bigMath.abs(maxPriceImpactUsdBasedOnMaxPriceImpactFactor)) {
- positionImpactDeltaUsd = maxPriceImpactUsdBasedOnMaxPriceImpactFactor;
+ if (bigMath.abs(positionImpactDeltaUsd) > maxPriceImpactUsdBasedOnMaxPriceImpactFactor) {
+ positionImpactDeltaUsd = maxPriceImpactUsdBasedOnMaxPriceImpactFactor * (positionImpactDeltaUsd > 0 ? 1n : -1n);
}
return positionImpactDeltaUsd;
diff --git a/sdk/src/utils/marketKeysAndConfigs.ts b/sdk/src/utils/marketKeysAndConfigs.ts
index 159530e69d..015599bad7 100644
--- a/sdk/src/utils/marketKeysAndConfigs.ts
+++ b/sdk/src/utils/marketKeysAndConfigs.ts
@@ -8,6 +8,9 @@ import {
FUNDING_INCREASE_FACTOR_PER_SECOND,
IS_MARKET_DISABLED_KEY,
MAX_FUNDING_FACTOR_PER_SECOND,
+ MAX_LENDABLE_IMPACT_FACTOR_FOR_WITHDRAWALS_KEY,
+ MAX_LENDABLE_IMPACT_FACTOR_KEY,
+ MAX_LENDABLE_IMPACT_USD_KEY,
MAX_OPEN_INTEREST_KEY,
MAX_PNL_FACTOR_FOR_TRADERS_KEY,
MAX_PNL_FACTOR_KEY,
@@ -190,6 +193,18 @@ export function hashMarketConfigKeys(market: MarketConfig) {
["bytes32", "address"],
[MAX_POSITION_IMPACT_FACTOR_FOR_LIQUIDATIONS_KEY, marketAddress],
],
+ maxLendableImpactFactor: [
+ ["bytes32", "address"],
+ [MAX_LENDABLE_IMPACT_FACTOR_KEY, marketAddress],
+ ],
+ maxLendableImpactFactorForWithdrawals: [
+ ["bytes32", "address"],
+ [MAX_LENDABLE_IMPACT_FACTOR_FOR_WITHDRAWALS_KEY, marketAddress],
+ ],
+ maxLendableImpactUsd: [
+ ["bytes32", "address"],
+ [MAX_LENDABLE_IMPACT_USD_KEY, marketAddress],
+ ],
minCollateralFactor: [
["bytes32", "address"],
[MIN_COLLATERAL_FACTOR_KEY, marketAddress],
diff --git a/sdk/src/utils/positions.ts b/sdk/src/utils/positions.ts
index c1caff5c30..387865724e 100644
--- a/sdk/src/utils/positions.ts
+++ b/sdk/src/utils/positions.ts
@@ -1,5 +1,6 @@
import { BASIS_POINTS_DIVISOR_BIGINT } from "configs/factors";
import { MarketInfo } from "types/markets";
+import { PositionInfoLoaded } from "types/positions";
import { UserReferralInfo } from "types/referrals";
import { Token, TokenData } from "types/tokens";
@@ -12,8 +13,8 @@ import {
getPriceImpactForPosition,
getProportionalPendingImpactValues,
} from "./fees";
-import { getCappedPoolPnl, getMarketPnl, getPoolUsdWithoutPnl } from "./markets";
-import { applyFactor, expandDecimals } from "./numbers";
+import { getCappedPoolPnl, getMarketPnl, getOpenInterestUsd, getPoolUsdWithoutPnl } from "./markets";
+import { applyFactor, expandDecimals, PRECISION } from "./numbers";
import { convertToUsd, getIsEquivalentTokens } from "./tokens";
export function getPositionKey(account: string, marketAddress: string, collateralAddress: string, isLong: boolean) {
@@ -175,7 +176,7 @@ export function getLiquidationPrice(p: {
priceImpactDeltaUsd = priceImapctForPosition.priceImpactDeltaUsd;
if (priceImpactDeltaUsd > 0) {
- priceImpactDeltaUsd = capPositionImpactUsdByMaxPriceImpactFactor(marketInfo, priceImpactDeltaUsd);
+ priceImpactDeltaUsd = capPositionImpactUsdByMaxPriceImpactFactor(marketInfo, sizeInUsd, priceImpactDeltaUsd);
}
const pendingImpactUsd = convertToUsd(
@@ -283,7 +284,7 @@ export function getNetPriceImpactDeltaUsdForDecrease({
}
if (totalImpactDeltaUsd > 0) {
- totalImpactDeltaUsd = capPositionImpactUsdByMaxPriceImpactFactor(marketInfo, totalImpactDeltaUsd);
+ totalImpactDeltaUsd = capPositionImpactUsdByMaxPriceImpactFactor(marketInfo, sizeDeltaUsd, totalImpactDeltaUsd);
}
totalImpactDeltaUsd = capPositionImpactUsdByMaxImpactPool(marketInfo, totalImpactDeltaUsd);
@@ -294,3 +295,21 @@ export function getNetPriceImpactDeltaUsdForDecrease({
priceImpactDiffUsd,
};
}
+
+export function getMinCollateralFactorForPosition(position: PositionInfoLoaded, openInterestDelta: bigint) {
+ const marketInfo = position.marketInfo;
+
+ const isLong = position.isLong;
+ const openInterest = getOpenInterestUsd(marketInfo, isLong) + openInterestDelta;
+ const minCollateralFactorMultiplier = isLong
+ ? marketInfo.minCollateralFactorForOpenInterestLong
+ : marketInfo.minCollateralFactorForOpenInterestShort;
+ let minCollateralFactor = bigMath.mulDiv(openInterest, minCollateralFactorMultiplier, PRECISION);
+ const minCollateralFactorForMarket = marketInfo.minCollateralFactor;
+
+ if (minCollateralFactorForMarket > minCollateralFactor) {
+ minCollateralFactor = minCollateralFactorForMarket;
+ }
+
+ return minCollateralFactor;
+}
diff --git a/src/domain/synthetics/trade/utils/decrease.ts b/sdk/src/utils/trade/decrease.ts
similarity index 93%
rename from src/domain/synthetics/trade/utils/decrease.ts
rename to sdk/src/utils/trade/decrease.ts
index a3980464a3..897d550473 100644
--- a/src/domain/synthetics/trade/utils/decrease.ts
+++ b/sdk/src/utils/trade/decrease.ts
@@ -1,33 +1,36 @@
-import { ethers } from "ethers";
-
-import { BASIS_POINTS_DIVISOR_BIGINT, DEFAULT_ACCEPTABLE_PRICE_IMPACT_BUFFER } from "config/factors";
-import { UserReferralInfo } from "domain/referrals";
-import { getPositionFee } from "domain/synthetics/fees";
-import { MarketInfo } from "domain/synthetics/markets";
-import { DecreasePositionSwapType, OrderType } from "domain/synthetics/orders";
+import { DEFAULT_ACCEPTABLE_PRICE_IMPACT_BUFFER } from "configs/factors";
+import { MarketInfo } from "types/markets";
+import { DecreasePositionSwapType, OrderType } from "types/orders";
+import { PositionInfo, PositionInfoLoaded } from "types/positions";
+import { UserReferralInfo } from "types/referrals";
+import { TokenData } from "types/tokens";
+import { DecreasePositionAmounts, NextPositionValues } from "types/trade";
+import { bigMath } from "utils/bigmath";
+import { getPositionFee } from "utils/fees";
+import {
+ applyFactor,
+ BASIS_POINTS_DIVISOR_BIGINT,
+ expandDecimals,
+ getBasisPoints,
+ roundUpDivision,
+ USD_DECIMALS,
+ MaxUint256,
+} from "utils/numbers";
import {
- PositionInfo,
- PositionInfoLoaded,
getLeverage,
getLiquidationPrice,
getMinCollateralFactorForPosition,
+ getNetPriceImpactDeltaUsdForDecrease,
getPositionPnlUsd,
-} from "domain/synthetics/positions";
-import { TokenData, convertToTokenAmount, convertToUsd } from "domain/synthetics/tokens";
-import { DUST_USD } from "lib/legacy";
-import { applyFactor, getBasisPoints, roundUpDivision } from "lib/numbers";
-import { DecreasePositionAmounts, NextPositionValues } from "sdk/types/trade";
-import { bigMath } from "sdk/utils/bigmath";
-import { getNetPriceImpactDeltaUsdForDecrease } from "sdk/utils/positions";
-import { getSwapStats } from "sdk/utils/swap/swapStats";
-import { getIsEquivalentTokens } from "sdk/utils/tokens";
-
+} from "utils/positions";
import {
getAcceptablePriceInfo,
getDefaultAcceptablePriceImpactBps,
getMarkPrice,
getOrderThresholdType,
-} from "./prices";
+} from "utils/prices";
+import { getSwapStats } from "utils/swap";
+import { convertToTokenAmount, convertToUsd, getIsEquivalentTokens } from "utils/tokens";
export function getDecreasePositionAmounts(p: {
marketInfo: MarketInfo;
@@ -85,6 +88,7 @@ export function getDecreasePositionAmounts(p: {
proportionalPendingImpactDeltaUsd: 0n,
totalPendingImpactDeltaUsd: 0n,
priceImpactDiffUsd: 0n,
+ balanceWasImproved: false,
acceptablePriceDeltaBps: 0n,
recommendedAcceptablePriceDeltaBps: 0n,
@@ -153,7 +157,7 @@ export function getDecreasePositionAmounts(p: {
const positionFeeInfo = getPositionFee(
marketInfo,
values.sizeDeltaUsd,
- values.totalPendingImpactDeltaUsd > 0,
+ values.balanceWasImproved,
userReferralInfo
);
@@ -240,12 +244,7 @@ export function getDecreasePositionAmounts(p: {
const profitAmount = convertToTokenAmount(profitUsd, collateralToken.decimals, values.collateralPrice)!;
// Fees
- const positionFeeInfo = getPositionFee(
- marketInfo,
- values.sizeDeltaUsd,
- values.totalPendingImpactDeltaUsd > 0,
- userReferralInfo
- );
+ const positionFeeInfo = getPositionFee(marketInfo, values.sizeDeltaUsd, values.balanceWasImproved, userReferralInfo);
const estimatedPositionFeeCost = estimateCollateralCost(
positionFeeInfo.positionFeeUsd,
collateralToken,
@@ -388,7 +387,7 @@ export function getIsFullClose(p: {
const { position, sizeDeltaUsd, indexPrice, remainingCollateralUsd, minCollateralUsd, minPositionSizeUsd } = p;
const { marketInfo, isLong } = position;
- if (position.sizeInUsd - sizeDeltaUsd < DUST_USD) {
+ if (position.sizeInUsd - sizeDeltaUsd < expandDecimals(1, USD_DECIMALS)) {
return true;
}
@@ -518,6 +517,7 @@ function applyAcceptablePrice(p: {
values.acceptablePrice = acceptablePriceInfo.acceptablePrice;
values.acceptablePriceDeltaBps = acceptablePriceInfo.acceptablePriceDeltaBps;
+ values.balanceWasImproved = acceptablePriceInfo.balanceWasImproved;
const totalImpactValues = getNetPriceImpactDeltaUsdForDecrease({
marketInfo,
@@ -536,7 +536,7 @@ function applyAcceptablePrice(p: {
if (isLong) {
values.acceptablePrice = 0n;
} else {
- values.acceptablePrice = ethers.MaxUint256;
+ values.acceptablePrice = MaxUint256;
}
} else {
let maxNegativePriceImpactBps = fixedAcceptablePriceImpactBps;
diff --git a/sdk/src/utils/trade/increase.ts b/sdk/src/utils/trade/increase.ts
index 067dec525e..ebe340b312 100644
--- a/sdk/src/utils/trade/increase.ts
+++ b/sdk/src/utils/trade/increase.ts
@@ -10,13 +10,14 @@ import {
ExternalSwapQuote,
FindSwapPath,
IncreasePositionAmounts,
+ NextPositionValues,
SwapOptimizationOrderArray,
TriggerThresholdType,
} from "types/trade";
import { bigMath } from "utils/bigmath";
import { getPositionFee, getPriceImpactForPosition, getTotalSwapVolumeFromSwapStats } from "utils/fees";
import { applyFactor } from "utils/numbers";
-import { getLeverage } from "utils/positions";
+import { getEntryPrice, getLeverage, getLiquidationPrice, getPositionPnlUsd } from "utils/positions";
import {
getAcceptablePriceInfo,
getDefaultAcceptablePriceImpactBps,
@@ -323,6 +324,7 @@ export function getIncreasePositionAmounts(p: IncreasePositionParams): IncreaseP
});
values.positionPriceImpactDeltaUsd = acceptablePriceInfo.priceImpactDeltaUsd;
+
values.acceptablePrice = acceptablePriceInfo.acceptablePrice;
values.acceptablePriceDeltaBps = acceptablePriceInfo.acceptablePriceDeltaBps;
@@ -502,3 +504,90 @@ export function getIncreasePositionPrices({
triggerPrice,
};
}
+
+export function getNextPositionValuesForIncreaseTrade(p: {
+ existingPosition?: PositionInfo;
+ marketInfo: MarketInfo;
+ collateralToken: TokenData;
+ sizeDeltaUsd: bigint;
+ sizeDeltaInTokens: bigint;
+ collateralDeltaUsd: bigint;
+ collateralDeltaAmount: bigint;
+ indexPrice: bigint;
+ isLong: boolean;
+ showPnlInLeverage: boolean;
+ minCollateralUsd: bigint;
+ userReferralInfo: UserReferralInfo | undefined;
+}): NextPositionValues {
+ const {
+ existingPosition,
+ marketInfo,
+ collateralToken,
+ sizeDeltaUsd,
+ sizeDeltaInTokens,
+ collateralDeltaUsd,
+ collateralDeltaAmount,
+ indexPrice,
+ isLong,
+ showPnlInLeverage,
+ minCollateralUsd,
+ userReferralInfo,
+ } = p;
+
+ const nextCollateralUsd = existingPosition ? existingPosition.collateralUsd + collateralDeltaUsd : collateralDeltaUsd;
+
+ const nextCollateralAmount = existingPosition
+ ? existingPosition.collateralAmount + collateralDeltaAmount
+ : collateralDeltaAmount;
+
+ const nextSizeUsd = existingPosition ? existingPosition.sizeInUsd + sizeDeltaUsd : sizeDeltaUsd;
+ const nextSizeInTokens = existingPosition ? existingPosition.sizeInTokens + sizeDeltaInTokens : sizeDeltaInTokens;
+
+ const nextEntryPrice =
+ getEntryPrice({
+ sizeInUsd: nextSizeUsd,
+ sizeInTokens: nextSizeInTokens,
+ indexToken: marketInfo.indexToken,
+ }) ?? indexPrice;
+
+ const nextPnl = existingPosition
+ ? getPositionPnlUsd({
+ marketInfo,
+ sizeInUsd: nextSizeUsd,
+ sizeInTokens: nextSizeInTokens,
+ markPrice: indexPrice,
+ isLong,
+ })
+ : undefined;
+
+ const nextLeverage = getLeverage({
+ sizeInUsd: nextSizeUsd,
+ collateralUsd: nextCollateralUsd,
+ pnl: showPnlInLeverage ? nextPnl : undefined,
+ pendingBorrowingFeesUsd: 0n, // deducted on order
+ pendingFundingFeesUsd: 0n, // deducted on order
+ });
+
+ const nextLiqPrice = getLiquidationPrice({
+ marketInfo,
+ collateralToken,
+ sizeInUsd: nextSizeUsd,
+ sizeInTokens: nextSizeInTokens,
+ collateralUsd: nextCollateralUsd,
+ collateralAmount: nextCollateralAmount,
+ minCollateralUsd,
+ pendingBorrowingFeesUsd: 0n, // deducted on order
+ pendingFundingFeesUsd: 0n, // deducted on order
+ pendingImpactAmount: existingPosition?.pendingImpactAmount ?? 0n,
+ isLong: isLong,
+ userReferralInfo,
+ });
+
+ return {
+ nextSizeUsd,
+ nextCollateralUsd,
+ nextEntryPrice,
+ nextLeverage,
+ nextLiqPrice,
+ };
+}
diff --git a/src/components/Synthetics/PositionItem/PositionItem.tsx b/src/components/Synthetics/PositionItem/PositionItem.tsx
index 2de37ad823..a6936ff88a 100644
--- a/src/components/Synthetics/PositionItem/PositionItem.tsx
+++ b/src/components/Synthetics/PositionItem/PositionItem.tsx
@@ -118,16 +118,14 @@ export function PositionItem(p: Props) {
/>
0;
diff --git a/src/components/Synthetics/TradeBox/hooks/useTradeButtonState.tsx b/src/components/Synthetics/TradeBox/hooks/useTradeButtonState.tsx
index a13cf69ba5..306ab4737d 100644
--- a/src/components/Synthetics/TradeBox/hooks/useTradeButtonState.tsx
+++ b/src/components/Synthetics/TradeBox/hooks/useTradeButtonState.tsx
@@ -52,10 +52,7 @@ import { getNameByOrderType, substractMaxLeverageSlippage } from "domain/synthet
import { useSidecarEntries } from "domain/synthetics/sidecarOrders/useSidecarEntries";
import { useSidecarOrders } from "domain/synthetics/sidecarOrders/useSidecarOrders";
import { getApprovalRequirements } from "domain/synthetics/tokens/utils";
-import {
- getIncreasePositionAmounts,
- getNextPositionValuesForIncreaseTrade,
-} from "domain/synthetics/trade/utils/increase";
+import { getIncreasePositionAmounts } from "domain/synthetics/trade/utils/increase";
import { getCommonError, getExpressError, getIsMaxLeverageExceeded } from "domain/synthetics/trade/utils/validation";
import { approveTokens } from "domain/tokens/approveTokens";
import { numericBinarySearch } from "lib/binarySearch";
@@ -72,6 +69,7 @@ import { getContract } from "sdk/configs/contracts";
import { getToken, getTokenVisualMultiplier } from "sdk/configs/tokens";
import { ExecutionFee } from "sdk/types/fees";
import { BatchOrderTxnParams } from "sdk/utils/orderTransactions";
+import { getNextPositionValuesForIncreaseTrade } from "sdk/utils/trade/increase";
import ExternalLink from "components/ExternalLink/ExternalLink";
import { BridgingInfo } from "components/Synthetics/BridgingInfo/BridgingInfo";
diff --git a/src/domain/synthetics/__tests__/trade/decrease.spec.ts b/src/domain/synthetics/__tests__/trade/decrease.spec.ts
index a5b3ac9b72..fa1202600d 100644
--- a/src/domain/synthetics/__tests__/trade/decrease.spec.ts
+++ b/src/domain/synthetics/__tests__/trade/decrease.spec.ts
@@ -4,8 +4,8 @@ import { getMarketIndexName, getMarketPoolName, MarketInfo } from "domain/synthe
import { DecreasePositionSwapType } from "domain/synthetics/orders";
import { PositionInfoLoaded } from "domain/synthetics/positions";
import { TokenData } from "domain/synthetics/tokens";
-import { getDecreasePositionAmounts } from "domain/synthetics/trade/utils/decrease";
import { expandDecimals } from "lib/numbers";
+import { getDecreasePositionAmounts } from "sdk/utils/trade/decrease";
const closeSizeUsd = BigInt(99);
@@ -110,6 +110,9 @@ const marketInfo: MarketInfo = {
maxPositionImpactFactorPositive: BigInt("0x1027e72f1f12813088000000"),
maxPositionImpactFactorNegative: BigInt("0x1027e72f1f12813088000000"),
maxPositionImpactFactorForLiquidations: BigInt("0x00"),
+ maxLendableImpactFactor: BigInt("0x00"),
+ maxLendableImpactFactorForWithdrawals: BigInt("0x00"),
+ maxLendableImpactUsd: BigInt("0x00"),
positionImpactExponentFactor: BigInt("0x193e5939a08ce9dbd480000000"),
swapFeeFactorForBalanceWasImproved: BigInt("0x019d971e4fe8401e74000000"),
swapFeeFactorForBalanceWasNotImproved: BigInt("0x024306c4097859c43c000000"),
diff --git a/src/domain/synthetics/markets/useMarketsInfoRequest/buildMarketsConfigsRequest.ts b/src/domain/synthetics/markets/useMarketsInfoRequest/buildMarketsConfigsRequest.ts
index 93901ca6f5..0430422801 100644
--- a/src/domain/synthetics/markets/useMarketsInfoRequest/buildMarketsConfigsRequest.ts
+++ b/src/domain/synthetics/markets/useMarketsInfoRequest/buildMarketsConfigsRequest.ts
@@ -169,6 +169,18 @@ export async function buildMarketsConfigsRequest(
methodName: "getUint",
params: [prebuiltHashedKeys.maxPositionImpactFactorForLiquidations],
},
+ maxLendableImpactFactor: {
+ methodName: "getUint",
+ params: [prebuiltHashedKeys.maxLendableImpactFactor],
+ },
+ maxLendableImpactFactorForWithdrawals: {
+ methodName: "getUint",
+ params: [prebuiltHashedKeys.maxLendableImpactFactorForWithdrawals],
+ },
+ maxLendableImpactUsd: {
+ methodName: "getUint",
+ params: [prebuiltHashedKeys.maxLendableImpactUsd],
+ },
minCollateralFactor: {
methodName: "getUint",
params: [prebuiltHashedKeys.minCollateralFactor],
diff --git a/src/domain/synthetics/markets/useMarketsInfoRequest/index.ts b/src/domain/synthetics/markets/useMarketsInfoRequest/index.ts
index f0080c1220..4c8011fa49 100644
--- a/src/domain/synthetics/markets/useMarketsInfoRequest/index.ts
+++ b/src/domain/synthetics/markets/useMarketsInfoRequest/index.ts
@@ -329,6 +329,10 @@ function useMarketsConfigsRequest({
maxPositionImpactFactorNegative: dataStoreValues.maxPositionImpactFactorNegative.returnValues[0],
maxPositionImpactFactorForLiquidations:
dataStoreValues.maxPositionImpactFactorForLiquidations.returnValues[0],
+ maxLendableImpactFactor: dataStoreValues.maxLendableImpactFactor.returnValues[0],
+ maxLendableImpactFactorForWithdrawals:
+ dataStoreValues.maxLendableImpactFactorForWithdrawals.returnValues[0],
+ maxLendableImpactUsd: dataStoreValues.maxLendableImpactUsd.returnValues[0],
positionImpactExponentFactor: dataStoreValues.positionImpactExponentFactor.returnValues[0],
swapFeeFactorForBalanceWasImproved: dataStoreValues.swapFeeFactorForBalanceWasImproved.returnValues[0],
swapFeeFactorForBalanceWasNotImproved:
diff --git a/src/domain/synthetics/markets/useMarketsInfoRequest/useFastMarketsInfoRequest.ts b/src/domain/synthetics/markets/useMarketsInfoRequest/useFastMarketsInfoRequest.ts
index cd26c75510..bf9c4f7f65 100644
--- a/src/domain/synthetics/markets/useMarketsInfoRequest/useFastMarketsInfoRequest.ts
+++ b/src/domain/synthetics/markets/useMarketsInfoRequest/useFastMarketsInfoRequest.ts
@@ -198,6 +198,9 @@ export function useFastMarketsInfoRequest(chainId: number) {
maxPositionImpactFactorPositive: BigInt(mInfo.maxPositionImpactFactorPositive),
maxPositionImpactFactorNegative: BigInt(mInfo.maxPositionImpactFactorNegative),
maxPositionImpactFactorForLiquidations: BigInt(mInfo.maxPositionImpactFactorForLiquidations),
+ maxLendableImpactFactor: 0n,
+ maxLendableImpactFactorForWithdrawals: 0n,
+ maxLendableImpactUsd: 0n,
positionImpactExponentFactor: BigInt(mInfo.positionImpactExponentFactor),
swapFeeFactorForBalanceWasImproved: BigInt(mInfo.swapFeeFactorForPositiveImpact),
diff --git a/src/domain/synthetics/positions/types.ts b/src/domain/synthetics/positions/types.ts
index 890d46d795..1231d09d06 100644
--- a/src/domain/synthetics/positions/types.ts
+++ b/src/domain/synthetics/positions/types.ts
@@ -1,8 +1,6 @@
import { PendingPositionUpdate } from "context/SyntheticsEvents";
import { Position as BasePosition, PositionInfo as BasePositionInfo } from "sdk/types/positions";
-import { MarketInfo } from "../markets";
-
export * from "sdk/types/positions";
export type Position = BasePosition & {
@@ -12,5 +10,3 @@ export type Position = BasePosition & {
export type PositionInfo = BasePositionInfo & {
pendingUpdate?: PendingPositionUpdate;
};
-
-export type PositionInfoLoaded = PositionInfo & { marketInfo: MarketInfo };
diff --git a/src/domain/synthetics/positions/usePositionsConstants.ts b/src/domain/synthetics/positions/usePositionsConstants.ts
index 9445be4823..19f6202954 100644
--- a/src/domain/synthetics/positions/usePositionsConstants.ts
+++ b/src/domain/synthetics/positions/usePositionsConstants.ts
@@ -1,7 +1,13 @@
import { useMemo } from "react";
import { getContract } from "config/contracts";
-import { MAX_AUTO_CANCEL_ORDERS_KEY, MIN_COLLATERAL_USD_KEY, MIN_POSITION_SIZE_USD_KEY } from "config/dataStore";
+import {
+ CLAIMABLE_COLLATERAL_DELAY_KEY,
+ CLAIMABLE_COLLATERAL_REDUCTION_FACTOR_KEY,
+ MAX_AUTO_CANCEL_ORDERS_KEY,
+ MIN_COLLATERAL_USD_KEY,
+ MIN_POSITION_SIZE_USD_KEY,
+} from "config/dataStore";
import { useMulticall } from "lib/multicall";
import { CONFIG_UPDATE_INTERVAL } from "lib/timeConstants";
import type { ContractsChainId } from "sdk/configs/chains";
@@ -10,6 +16,8 @@ export type PositionsConstantsResult = {
minCollateralUsd?: bigint;
minPositionSizeUsd?: bigint;
maxAutoCancelOrders?: bigint;
+ claimableCollateralDelay?: bigint;
+ claimableCollateralReductionFactor?: bigint;
};
error?: Error;
};
@@ -37,6 +45,14 @@ export function usePositionsConstantsRequest(chainId: ContractsChainId): Positio
methodName: "getUint",
params: [MAX_AUTO_CANCEL_ORDERS_KEY],
},
+ claimableCollateralDelay: {
+ methodName: "getUint",
+ params: [CLAIMABLE_COLLATERAL_DELAY_KEY],
+ },
+ claimableCollateralReductionFactor: {
+ methodName: "getUint",
+ params: [CLAIMABLE_COLLATERAL_REDUCTION_FACTOR_KEY],
+ },
},
},
},
@@ -45,6 +61,8 @@ export function usePositionsConstantsRequest(chainId: ContractsChainId): Positio
minCollateralUsd: res.data.dataStore.minCollateralUsd.returnValues[0],
minPositionSizeUsd: res.data.dataStore.minPositionSizeUsd.returnValues[0],
maxAutoCancelOrders: res.data.dataStore.maxAutoCancelOrders.returnValues[0],
+ claimableCollateralDelay: res.data.dataStore.claimableCollateralDelay.returnValues[0],
+ claimableCollateralReductionFactor: res.data.dataStore.claimableCollateralReductionFactor.returnValues[0],
};
},
});
diff --git a/src/domain/synthetics/positions/utils.ts b/src/domain/synthetics/positions/utils.ts
index 4311887047..54195c6368 100644
--- a/src/domain/synthetics/positions/utils.ts
+++ b/src/domain/synthetics/positions/utils.ts
@@ -2,17 +2,10 @@ import { t } from "@lingui/macro";
import { ethers } from "ethers";
import { BASIS_POINTS_DIVISOR_BIGINT } from "config/factors";
-import {
- MarketInfo,
- getCappedPoolPnl,
- getMarketPnl,
- getOpenInterestUsd,
- getPoolUsdWithoutPnl,
-} from "domain/synthetics/markets";
+import { MarketInfo, getCappedPoolPnl, getMarketPnl, getPoolUsdWithoutPnl } from "domain/synthetics/markets";
import { Token } from "domain/tokens";
import { CHART_PERIODS } from "lib/legacy";
import {
- PRECISION,
applyFactor,
calculateDisplayDecimals,
expandDecimals,
@@ -154,7 +147,7 @@ export function getEstimatedLiquidationTimeInHours(
});
if (priceImpactDeltaUsd > 0) {
- priceImpactDeltaUsd = capPositionImpactUsdByMaxPriceImpactFactor(marketInfo, priceImpactDeltaUsd);
+ priceImpactDeltaUsd = capPositionImpactUsdByMaxPriceImpactFactor(marketInfo, sizeInUsd, priceImpactDeltaUsd);
}
const pendingImpactUsd = convertToUsd(
@@ -323,24 +316,6 @@ export function willPositionCollateralBeSufficientForPosition(
);
}
-export function getMinCollateralFactorForPosition(position: PositionInfoLoaded, openInterestDelta: bigint) {
- const marketInfo = position.marketInfo;
-
- const isLong = position.isLong;
- const openInterest = getOpenInterestUsd(marketInfo, isLong) + openInterestDelta;
- const minCollateralFactorMultiplier = isLong
- ? marketInfo.minCollateralFactorForOpenInterestLong
- : marketInfo.minCollateralFactorForOpenInterestShort;
- let minCollateralFactor = bigMath.mulDiv(openInterest, minCollateralFactorMultiplier, PRECISION);
- const minCollateralFactorForMarket = marketInfo.minCollateralFactor;
-
- if (minCollateralFactorForMarket > minCollateralFactor) {
- minCollateralFactor = minCollateralFactorForMarket;
- }
-
- return minCollateralFactor;
-}
-
export function getIsPositionInfoLoaded(pos: PositionInfo | PositionInfoLoaded | undefined): pos is PositionInfoLoaded {
return Boolean(pos?.marketInfo);
}
diff --git a/src/domain/synthetics/trade/utils/decrease.spec.ts b/src/domain/synthetics/trade/utils/decrease.spec.ts
index e2df0c95be..37b4621337 100644
--- a/src/domain/synthetics/trade/utils/decrease.spec.ts
+++ b/src/domain/synthetics/trade/utils/decrease.spec.ts
@@ -6,7 +6,7 @@ import { PositionInfoLoaded } from "domain/synthetics/positions";
import { TokenData } from "domain/synthetics/tokens";
import { expandDecimals } from "lib/numbers";
-import { getDecreasePositionAmounts } from "./decrease";
+import { getDecreasePositionAmounts } from "../../../../../sdk/src/utils/trade/decrease";
const closeSizeUsd = BigInt(99);
@@ -111,6 +111,9 @@ const marketInfo: MarketInfo = {
maxPositionImpactFactorPositive: BigInt("0x1027e72f1f12813088000000"),
maxPositionImpactFactorNegative: BigInt("0x1027e72f1f12813088000000"),
maxPositionImpactFactorForLiquidations: BigInt("0x00"),
+ maxLendableImpactFactor: BigInt("0x00"),
+ maxLendableImpactFactorForWithdrawals: BigInt("0x00"),
+ maxLendableImpactUsd: BigInt("0x00"),
positionImpactExponentFactor: BigInt("0x193e5939a08ce9dbd480000000"),
swapFeeFactorForBalanceWasImproved: BigInt("0x019d971e4fe8401e74000000"),
swapFeeFactorForBalanceWasNotImproved: BigInt("0x024306c4097859c43c000000"),
diff --git a/src/domain/synthetics/trade/utils/increase.ts b/src/domain/synthetics/trade/utils/increase.ts
index 6536fbf7e7..2969fea05e 100644
--- a/src/domain/synthetics/trade/utils/increase.ts
+++ b/src/domain/synthetics/trade/utils/increase.ts
@@ -1,100 +1 @@
-import { UserReferralInfo } from "domain/referrals";
-import { MarketInfo } from "domain/synthetics/markets";
-import {
- PositionInfo,
- getEntryPrice,
- getLeverage,
- getLiquidationPrice,
- getPositionPnlUsd,
-} from "domain/synthetics/positions";
-import { TokenData } from "domain/synthetics/tokens";
-import { NextPositionValues } from "sdk/types/trade";
-
export * from "sdk/utils/trade/increase";
-
-export function getNextPositionValuesForIncreaseTrade(p: {
- existingPosition?: PositionInfo;
- marketInfo: MarketInfo;
- collateralToken: TokenData;
- sizeDeltaUsd: bigint;
- sizeDeltaInTokens: bigint;
- collateralDeltaUsd: bigint;
- collateralDeltaAmount: bigint;
- indexPrice: bigint;
- isLong: boolean;
- showPnlInLeverage: boolean;
- minCollateralUsd: bigint;
- userReferralInfo: UserReferralInfo | undefined;
-}): NextPositionValues {
- const {
- existingPosition,
- marketInfo,
- collateralToken,
- sizeDeltaUsd,
- sizeDeltaInTokens,
- collateralDeltaUsd,
- collateralDeltaAmount,
- indexPrice,
- isLong,
- showPnlInLeverage,
- minCollateralUsd,
- userReferralInfo,
- } = p;
-
- const nextCollateralUsd = existingPosition ? existingPosition.collateralUsd + collateralDeltaUsd : collateralDeltaUsd;
-
- const nextCollateralAmount = existingPosition
- ? existingPosition.collateralAmount + collateralDeltaAmount
- : collateralDeltaAmount;
-
- const nextSizeUsd = existingPosition ? existingPosition.sizeInUsd + sizeDeltaUsd : sizeDeltaUsd;
- const nextSizeInTokens = existingPosition ? existingPosition.sizeInTokens + sizeDeltaInTokens : sizeDeltaInTokens;
-
- const nextEntryPrice =
- getEntryPrice({
- sizeInUsd: nextSizeUsd,
- sizeInTokens: nextSizeInTokens,
- indexToken: marketInfo.indexToken,
- }) ?? indexPrice;
-
- const nextPnl = existingPosition
- ? getPositionPnlUsd({
- marketInfo,
- sizeInUsd: nextSizeUsd,
- sizeInTokens: nextSizeInTokens,
- markPrice: indexPrice,
- isLong,
- })
- : undefined;
-
- const nextLeverage = getLeverage({
- sizeInUsd: nextSizeUsd,
- collateralUsd: nextCollateralUsd,
- pnl: showPnlInLeverage ? nextPnl : undefined,
- pendingBorrowingFeesUsd: 0n, // deducted on order
- pendingFundingFeesUsd: 0n, // deducted on order
- });
-
- const nextLiqPrice = getLiquidationPrice({
- marketInfo,
- collateralToken,
- sizeInUsd: nextSizeUsd,
- sizeInTokens: nextSizeInTokens,
- collateralUsd: nextCollateralUsd,
- collateralAmount: nextCollateralAmount,
- minCollateralUsd,
- pendingBorrowingFeesUsd: 0n, // deducted on order
- pendingFundingFeesUsd: 0n, // deducted on order
- pendingImpactAmount: existingPosition?.pendingImpactAmount ?? 0n,
- isLong: isLong,
- userReferralInfo,
- });
-
- return {
- nextSizeUsd,
- nextCollateralUsd,
- nextEntryPrice,
- nextLeverage,
- nextLiqPrice,
- };
-}
diff --git a/src/domain/synthetics/trade/utils/index.ts b/src/domain/synthetics/trade/utils/index.ts
index ce50ea3aee..feef289423 100644
--- a/src/domain/synthetics/trade/utils/index.ts
+++ b/src/domain/synthetics/trade/utils/index.ts
@@ -2,7 +2,7 @@ export * from "sdk/utils/swap/swapRouting";
export * from "sdk/utils/swap/swapStats";
export * from "./swap";
export * from "./increase";
-export * from "./decrease";
+export * from "../../../../../sdk/src/utils/trade/decrease";
export * from "./prices";
export * from "./common";
diff --git a/src/pages/SyntheticsStats/SyntheticsStats.tsx b/src/pages/SyntheticsStats/SyntheticsStats.tsx
index f9e54adfcd..b185ab0b3b 100644
--- a/src/pages/SyntheticsStats/SyntheticsStats.tsx
+++ b/src/pages/SyntheticsStats/SyntheticsStats.tsx
@@ -61,7 +61,12 @@ export function SyntheticsStats() {
const { marketsInfoData } = useMarketsInfoRequest(chainId, { tokensData });
const { kinkMarketsBorrowingRatesData } = useKinkModelMarketsRates(chainId);
const {
- positionsConstants: { minCollateralUsd, minPositionSizeUsd },
+ positionsConstants: {
+ minCollateralUsd,
+ minPositionSizeUsd,
+ claimableCollateralDelay,
+ claimableCollateralReductionFactor,
+ },
} = usePositionsConstantsRequest(chainId);
const markets = Object.values(marketsInfoData || {});
@@ -758,7 +763,7 @@ export function SyntheticsStats() {
}
function renderPositionImpactCell() {
- const summaryPoolUsd = (longPoolUsd ?? 0n) + (shortPoolUsd ?? 0n);
+ const summaryPoolUsd = market.poolValueMax;
const bonusApr =
summaryPoolUsd > 0n
@@ -1045,6 +1050,21 @@ export function SyntheticsStats() {
value={formatFactor(market.maxPositionImpactFactorForLiquidations)}
showDollar={false}
/>
+
+
+
@@ -1185,6 +1205,16 @@ export function SyntheticsStats() {
showDollar={false}
/>
+
+
>
)}
/>
diff --git a/tsconfig.json b/tsconfig.json
index 363c3fb8bf..219264198a 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -27,5 +27,5 @@
}
},
"references": [{ "path": "./sdk" }],
- "include": ["src", "scripts"]
+ "include": ["src", "scripts", "sdk/src/utils/trade/decrease.ts"]
}
From 5e1b8fa19bec51d39306ea7933c454693a584794 Mon Sep 17 00:00:00 2001
From: Divhead <110596516+divhead@users.noreply.github.com>
Date: Fri, 25 Jul 2025 06:16:13 -0700
Subject: [PATCH 08/55] fix net value and cap price impact
---
sdk/src/modules/positions/positions.ts | 16 ++++++----
sdk/src/utils/positions.ts | 32 +++++++++++++++----
.../Synthetics/PositionItem/PositionItem.tsx | 24 +++++++-------
src/locales/de/messages.po | 12 ++++---
src/locales/en/messages.po | 12 ++++---
src/locales/es/messages.po | 12 ++++---
src/locales/fr/messages.po | 12 ++++---
src/locales/ja/messages.po | 12 ++++---
src/locales/ko/messages.po | 12 ++++---
src/locales/pseudo/messages.po | 12 ++++---
src/locales/ru/messages.po | 12 ++++---
src/locales/zh/messages.po | 12 ++++---
12 files changed, 120 insertions(+), 60 deletions(-)
diff --git a/sdk/src/modules/positions/positions.ts b/sdk/src/modules/positions/positions.ts
index 849f5a3ae3..ed62125b09 100644
--- a/sdk/src/modules/positions/positions.ts
+++ b/sdk/src/modules/positions/positions.ts
@@ -31,6 +31,7 @@ import {
getPositionKey,
getPositionNetValue,
getPositionPendingFeesUsd,
+ getPositionPnlAfterFees,
getPositionPnlUsd,
} from "utils/positions";
import { getAcceptablePriceInfo, getMarkPrice } from "utils/prices";
@@ -609,13 +610,14 @@ export class Positions extends Module {
priceImpactDiffUsd: netPriceImapctValues?.priceImpactDiffUsd ?? 0n,
});
- const pnlAfterFees =
- pnl -
- totalPendingFeesUsd -
- closingFeeUsd -
- uiFeeUsd -
- (netPriceImapctValues?.totalImpactDeltaUsd ?? 0n) +
- (netPriceImapctValues?.priceImpactDiffUsd ?? 0n);
+ const pnlAfterFees = getPositionPnlAfterFees({
+ pnl,
+ totalPendingFeesUsd,
+ closingFeeUsd,
+ uiFeeUsd,
+ totalPendingImpactDeltaUsd: netPriceImapctValues?.totalImpactDeltaUsd ?? 0n,
+ priceImpactDiffUsd: netPriceImapctValues?.priceImpactDiffUsd ?? 0n,
+ });
const pnlAfterFeesPercentage =
collateralUsd != 0n ? getBasisPoints(pnlAfterFees, collateralUsd + closingFeeUsd) : 0n;
diff --git a/sdk/src/utils/positions.ts b/sdk/src/utils/positions.ts
index 387865724e..4ac0b0ee31 100644
--- a/sdk/src/utils/positions.ts
+++ b/sdk/src/utils/positions.ts
@@ -104,6 +104,27 @@ export function getPositionNetValue(p: {
);
}
+export function getPositionPnlAfterFees({
+ pnl,
+ totalPendingFeesUsd,
+ closingFeeUsd,
+ uiFeeUsd,
+ totalPendingImpactDeltaUsd,
+ priceImpactDiffUsd,
+}: {
+ pnl: bigint;
+ totalPendingFeesUsd: bigint;
+ closingFeeUsd: bigint;
+ uiFeeUsd: bigint;
+ totalPendingImpactDeltaUsd: bigint;
+ priceImpactDiffUsd: bigint;
+}) {
+ const pnlAfterFees =
+ pnl - totalPendingFeesUsd - closingFeeUsd - uiFeeUsd + totalPendingImpactDeltaUsd + priceImpactDiffUsd;
+
+ return pnlAfterFees;
+}
+
export function getLeverage(p: {
sizeInUsd: bigint;
collateralUsd: bigint;
@@ -263,8 +284,8 @@ export function getNetPriceImpactDeltaUsdForDecrease({
}) {
const { proportionalPendingImpactDeltaUsd } = getProportionalPendingImpactValues({
sizeInUsd,
- pendingImpactAmount,
sizeDeltaUsd,
+ pendingImpactAmount,
indexToken: marketInfo.indexToken,
});
@@ -273,13 +294,12 @@ export function getNetPriceImpactDeltaUsdForDecrease({
if (totalImpactDeltaUsd < 0) {
const { maxNegativeImpactFactor } = getMaxPositionImpactFactors(marketInfo);
- const maxPriceImpactFactor = applyFactor(sizeDeltaUsd, maxNegativeImpactFactor);
- const minPriceImpactUsd = -applyFactor(sizeDeltaUsd, maxPriceImpactFactor);
+ const maxNegativeImpactUsd = -applyFactor(sizeDeltaUsd, maxNegativeImpactFactor);
- if (totalImpactDeltaUsd < minPriceImpactUsd) {
- priceImpactDiffUsd = minPriceImpactUsd - totalImpactDeltaUsd;
- totalImpactDeltaUsd = minPriceImpactUsd;
+ if (totalImpactDeltaUsd < maxNegativeImpactUsd) {
+ priceImpactDiffUsd = maxNegativeImpactUsd - totalImpactDeltaUsd;
+ totalImpactDeltaUsd = maxNegativeImpactUsd;
}
}
diff --git a/src/components/Synthetics/PositionItem/PositionItem.tsx b/src/components/Synthetics/PositionItem/PositionItem.tsx
index a6936ff88a..474037eeed 100644
--- a/src/components/Synthetics/PositionItem/PositionItem.tsx
+++ b/src/components/Synthetics/PositionItem/PositionItem.tsx
@@ -84,9 +84,9 @@ export function PositionItem(p: Props) {
position={p.isLarge ? "bottom-start" : "bottom-end"}
renderContent={() => (
- {p.position.uiFeeUsd > 0
- ? t`Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee - UI Fee - Net Price Impact + Price Impact Rebates`
- : t`Net Value: Initial Collateral + PnL - Borrow Fee - Negative Funding Fee - Close Fee - Net Price Impact + Price Impact Rebates`}
+
+ Net value is the amount held in the position inclusive of Pnl, fees and net price impact at close.
+
-
+ {p.position.priceImpactDiffUsd !== 0n && (
+
+ )}
Date: Fri, 25 Jul 2025 11:05:35 -0700
Subject: [PATCH 09/55] don't substract rebates
---
sdk/src/utils/positions.ts | 1 -
1 file changed, 1 deletion(-)
diff --git a/sdk/src/utils/positions.ts b/sdk/src/utils/positions.ts
index 4ac0b0ee31..f10873adf8 100644
--- a/sdk/src/utils/positions.ts
+++ b/sdk/src/utils/positions.ts
@@ -299,7 +299,6 @@ export function getNetPriceImpactDeltaUsdForDecrease({
if (totalImpactDeltaUsd < maxNegativeImpactUsd) {
priceImpactDiffUsd = maxNegativeImpactUsd - totalImpactDeltaUsd;
- totalImpactDeltaUsd = maxNegativeImpactUsd;
}
}
From b370b6910da131a8bef6835b593b5ec6612db891 Mon Sep 17 00:00:00 2001
From: Divhead <110596516+divhead@users.noreply.github.com>
Date: Fri, 25 Jul 2025 11:20:17 -0700
Subject: [PATCH 10/55] add debug values
---
sdk/src/types/trade.ts | 3 ++
sdk/src/utils/trade/decrease.ts | 2 ++
.../Synthetics/TradeFeesRow/TradeFeesRow.tsx | 28 +++++++++++++++++++
.../selectors/positionSellerSelectors.ts | 2 ++
.../selectors/tradeboxSelectors/index.ts | 5 ++--
src/domain/synthetics/trade/utils/common.ts | 9 ++++++
6 files changed, 47 insertions(+), 2 deletions(-)
diff --git a/sdk/src/types/trade.ts b/sdk/src/types/trade.ts
index 0ae90d8ba0..b20eea2371 100644
--- a/sdk/src/types/trade.ts
+++ b/sdk/src/types/trade.ts
@@ -110,6 +110,7 @@ export type DecreasePositionAmounts = {
fundingFeeUsd: bigint;
swapProfitFeeUsd: bigint;
proportionalPendingImpactDeltaUsd: bigint;
+ closePriceImpactDeltaUsd: bigint;
totalPendingImpactDeltaUsd: bigint;
priceImpactDiffUsd: bigint;
balanceWasImproved: boolean;
@@ -304,6 +305,8 @@ export type TradeFees = {
priceImpactDiff?: FeeItem;
positionCollateralPriceImpact?: FeeItem;
collateralPriceImpactDiff?: FeeItem;
+ proportionalPendingImpact?: FeeItem;
+ closePriceImpact?: FeeItem;
positionFeeFactor?: bigint;
borrowFee?: FeeItem;
fundingFee?: FeeItem;
diff --git a/sdk/src/utils/trade/decrease.ts b/sdk/src/utils/trade/decrease.ts
index 897d550473..fbf142d2ce 100644
--- a/sdk/src/utils/trade/decrease.ts
+++ b/sdk/src/utils/trade/decrease.ts
@@ -86,6 +86,7 @@ export function getDecreasePositionAmounts(p: {
acceptablePrice: 0n,
proportionalPendingImpactDeltaUsd: 0n,
+ closePriceImpactDeltaUsd: 0n,
totalPendingImpactDeltaUsd: 0n,
priceImpactDiffUsd: 0n,
balanceWasImproved: false,
@@ -527,6 +528,7 @@ function applyAcceptablePrice(p: {
priceImpactDeltaUsd: acceptablePriceInfo.priceImpactDeltaUsd,
});
+ values.closePriceImpactDeltaUsd = acceptablePriceInfo.priceImpactDeltaUsd;
values.totalPendingImpactDeltaUsd = totalImpactValues.totalImpactDeltaUsd;
values.proportionalPendingImpactDeltaUsd = totalImpactValues.proportionalPendingImpactDeltaUsd;
values.priceImpactDiffUsd = totalImpactValues.priceImpactDiffUsd;
diff --git a/src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx b/src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
index 326eb9820e..8fd21b187d 100644
--- a/src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+++ b/src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
@@ -34,6 +34,8 @@ type Props = {
swapPriceImpact?: FeeItem;
positionFee?: FeeItem;
positionPriceImpact?: FeeItem;
+ proportionalPendingImpact?: FeeItem;
+ closePriceImpact?: FeeItem;
priceImpactDiff?: FeeItem;
borrowFee?: FeeItem;
fundingFee?: FeeItem;
@@ -291,6 +293,30 @@ export function TradeFeesRow(p: Props) {
}
: undefined;
+ console.log("p.proportionalPendingImpact", p.proportionalPendingImpact);
+
+ const proportionalPendingImpactDeltaUsdRow =
+ showDebugValues &&
+ (p.proportionalPendingImpact?.deltaUsd !== undefined && p.proportionalPendingImpact.deltaUsd !== 0n
+ ? {
+ id: "proportionalPendingImpactDeltaUsd",
+ label: {t`Proportional Pending Impact`}:
,
+ value: formatDeltaUsd(p.proportionalPendingImpact.deltaUsd),
+ className: getPositiveOrNegativeClass(p.proportionalPendingImpact.deltaUsd, "text-green-500"),
+ }
+ : undefined);
+
+ const closePriceImpactDeltaUsdRow =
+ showDebugValues &&
+ (p.closePriceImpact?.deltaUsd !== undefined && p.closePriceImpact.deltaUsd !== 0n
+ ? {
+ id: "closePriceImpactDeltaUsd",
+ label: {t`Close Price Impact`}:
,
+ value: formatDeltaUsd(p.closePriceImpact.deltaUsd),
+ className: getPositiveOrNegativeClass(p.closePriceImpact.deltaUsd, "text-green-500"),
+ }
+ : undefined);
+
const netPriceImpactRow =
p.positionPriceImpact?.deltaUsd !== undefined && p.positionPriceImpact.deltaUsd !== 0n
? {
@@ -385,6 +411,8 @@ export function TradeFeesRow(p: Props) {
if (p.feesType === "decrease") {
return [
+ closePriceImpactDeltaUsdRow,
+ proportionalPendingImpactDeltaUsdRow,
netPriceImpactRow,
priceImpactDiffRow,
borrowFeeRow,
diff --git a/src/context/SyntheticsStateContext/selectors/positionSellerSelectors.ts b/src/context/SyntheticsStateContext/selectors/positionSellerSelectors.ts
index 5445a0ce1c..104f26c1b4 100644
--- a/src/context/SyntheticsStateContext/selectors/positionSellerSelectors.ts
+++ b/src/context/SyntheticsStateContext/selectors/positionSellerSelectors.ts
@@ -248,6 +248,8 @@ export const selectPositionSellerFees = createSelector((q) => {
swapPriceImpactDeltaUsd: swapAmounts?.swapPathStats?.totalSwapPriceImpactDeltaUsd || 0n,
positionPriceImpactDeltaUsd: decreaseAmounts.totalPendingImpactDeltaUsd,
priceImpactDiffUsd: decreaseAmounts.priceImpactDiffUsd,
+ proportionalPendingImpactDeltaUsd: decreaseAmounts.proportionalPendingImpactDeltaUsd,
+ closePriceImpactDeltaUsd: decreaseAmounts.closePriceImpactDeltaUsd,
borrowingFeeUsd: decreaseAmounts.borrowingFeeUsd,
fundingFeeUsd: decreaseAmounts.fundingFeeUsd,
feeDiscountUsd: decreaseAmounts.feeDiscountUsd,
diff --git a/src/context/SyntheticsStateContext/selectors/tradeboxSelectors/index.ts b/src/context/SyntheticsStateContext/selectors/tradeboxSelectors/index.ts
index 490b4b40e7..87e9af8bc8 100644
--- a/src/context/SyntheticsStateContext/selectors/tradeboxSelectors/index.ts
+++ b/src/context/SyntheticsStateContext/selectors/tradeboxSelectors/index.ts
@@ -408,7 +408,6 @@ export const selectTradeboxLeverageStrategy = createSelector((q) => {
});
export const selectTradeboxIncreasePositionAmounts = createSelector((q) => {
- // const tokensData = q(selectTokensData);
const tradeMode = q(selectTradeboxTradeMode);
const tradeType = q(selectTradeboxTradeType);
const fromTokenAddress = q(selectTradeboxFromTokenAddress);
@@ -422,7 +421,7 @@ export const selectTradeboxIncreasePositionAmounts = createSelector((q) => {
const triggerPrice = q(selectTradeboxTriggerPrice);
const externalSwapQuote = q(selectExternalSwapQuote);
const tradeFlags = createTradeFlags(tradeType, tradeMode);
- // const fromToken = fromTokenAddress ? getByKey(tokensData, fromTokenAddress) : undefined;
+
const fromToken = q(selectTradeboxFromToken);
const fromTokenAmount = fromToken ? parseValue(fromTokenInputValue || "0", fromToken.decimals)! : 0n;
@@ -784,6 +783,8 @@ export const selectTradeboxFees = createSelector(function selectTradeboxFees(q)
positionPriceImpactDeltaUsd: decreaseAmounts.totalPendingImpactDeltaUsd,
priceImpactDiffUsd: decreaseAmounts.priceImpactDiffUsd,
borrowingFeeUsd: decreaseAmounts.borrowingFeeUsd,
+ proportionalPendingImpactDeltaUsd: decreaseAmounts.proportionalPendingImpactDeltaUsd,
+ closePriceImpactDeltaUsd: decreaseAmounts.closePriceImpactDeltaUsd,
fundingFeeUsd: decreaseAmounts.fundingFeeUsd,
feeDiscountUsd: decreaseAmounts.feeDiscountUsd,
swapProfitFeeUsd: decreaseAmounts.swapProfitFeeUsd,
diff --git a/src/domain/synthetics/trade/utils/common.ts b/src/domain/synthetics/trade/utils/common.ts
index 48c6224750..9ee72d7556 100644
--- a/src/domain/synthetics/trade/utils/common.ts
+++ b/src/domain/synthetics/trade/utils/common.ts
@@ -97,6 +97,8 @@ export function getTradeFees(p: {
positionFeeUsd: bigint;
swapPriceImpactDeltaUsd: bigint;
positionPriceImpactDeltaUsd: bigint;
+ proportionalPendingImpactDeltaUsd?: bigint;
+ closePriceImpactDeltaUsd?: bigint;
priceImpactDiffUsd: bigint;
borrowingFeeUsd: bigint;
fundingFeeUsd: bigint;
@@ -118,6 +120,8 @@ export function getTradeFees(p: {
fundingFeeUsd,
feeDiscountUsd,
swapProfitFeeUsd,
+ proportionalPendingImpactDeltaUsd,
+ closePriceImpactDeltaUsd,
uiFeeFactor,
} = p;
@@ -176,6 +180,9 @@ export function getTradeFees(p: {
const positionCollateralPriceImpact = getFeeItem(positionPriceImpactDeltaUsd, bigMath.abs(collateralDeltaUsd));
const collateralPriceImpactDiff = getFeeItem(priceImpactDiffUsd, collateralDeltaUsd);
+ const proportionalPendingImpact = getFeeItem(proportionalPendingImpactDeltaUsd, sizeDeltaUsd);
+ const closePriceImpact = getFeeItem(closePriceImpactDeltaUsd, sizeDeltaUsd);
+
const totalFees = getTotalFeeItem([
...(swapFees || []),
externalSwapFee,
@@ -210,6 +217,8 @@ export function getTradeFees(p: {
positionPriceImpact,
priceImpactDiff,
positionCollateralPriceImpact,
+ proportionalPendingImpact,
+ closePriceImpact,
collateralPriceImpactDiff,
borrowFee,
fundingFee,
From 3bdc6302a57a30a097f50c1e9c9230a5f84bb830 Mon Sep 17 00:00:00 2001
From: Divhead <110596516+divhead@users.noreply.github.com>
Date: Fri, 25 Jul 2025 11:31:08 -0700
Subject: [PATCH 11/55] substract price imapct diff from fees
---
sdk/src/utils/trade/decrease.ts | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/sdk/src/utils/trade/decrease.ts b/sdk/src/utils/trade/decrease.ts
index fbf142d2ce..47b046aea6 100644
--- a/sdk/src/utils/trade/decrease.ts
+++ b/sdk/src/utils/trade/decrease.ts
@@ -170,7 +170,8 @@ export function getDecreasePositionAmounts(p: {
0n +
values.positionFeeUsd +
values.uiFeeUsd +
- (values.totalPendingImpactDeltaUsd < 0 ? values.totalPendingImpactDeltaUsd : 0n);
+ (values.totalPendingImpactDeltaUsd < 0 ? values.totalPendingImpactDeltaUsd : 0n) -
+ values.priceImpactDiffUsd;
values.payedOutputUsd = totalFeesUsd;
@@ -306,7 +307,7 @@ export function getDecreasePositionAmounts(p: {
values.swapUiFeeUsd +
values.uiFeeUsd +
negativePnlUsd +
- negativePriceImpactUsd +
+ negativePriceImpactUsd -
priceImpactDiffUsd;
const payedInfo = payForCollateralCost({
From c1fcbeb17188120ac0b4cd395bac1255bcf8a298 Mon Sep 17 00:00:00 2001
From: Divhead <110596516+divhead@users.noreply.github.com>
Date: Fri, 25 Jul 2025 11:38:36 -0700
Subject: [PATCH 12/55] remove translations
---
src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx b/src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
index 8fd21b187d..439bedb4a9 100644
--- a/src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+++ b/src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
@@ -293,14 +293,12 @@ export function TradeFeesRow(p: Props) {
}
: undefined;
- console.log("p.proportionalPendingImpact", p.proportionalPendingImpact);
-
const proportionalPendingImpactDeltaUsdRow =
showDebugValues &&
(p.proportionalPendingImpact?.deltaUsd !== undefined && p.proportionalPendingImpact.deltaUsd !== 0n
? {
id: "proportionalPendingImpactDeltaUsd",
- label: {t`Proportional Pending Impact`}:
,
+ label: {`Proportional Pending Impact`}:
,
value: formatDeltaUsd(p.proportionalPendingImpact.deltaUsd),
className: getPositiveOrNegativeClass(p.proportionalPendingImpact.deltaUsd, "text-green-500"),
}
@@ -311,7 +309,7 @@ export function TradeFeesRow(p: Props) {
(p.closePriceImpact?.deltaUsd !== undefined && p.closePriceImpact.deltaUsd !== 0n
? {
id: "closePriceImpactDeltaUsd",
- label: {t`Close Price Impact`}:
,
+ label: {`Close Price Impact`}:
,
value: formatDeltaUsd(p.closePriceImpact.deltaUsd),
className: getPositiveOrNegativeClass(p.closePriceImpact.deltaUsd, "text-green-500"),
}
From f1fb8f72a77a2d41a4d20139d84e77bb00f1fd63 Mon Sep 17 00:00:00 2001
From: Divhead <110596516+divhead@users.noreply.github.com>
Date: Fri, 25 Jul 2025 12:09:25 -0700
Subject: [PATCH 13/55] don't add price impact diff to fees
---
sdk/src/utils/trade/decrease.ts | 7 ++-----
src/domain/synthetics/trade/utils/common.ts | 14 +-------------
2 files changed, 3 insertions(+), 18 deletions(-)
diff --git a/sdk/src/utils/trade/decrease.ts b/sdk/src/utils/trade/decrease.ts
index 47b046aea6..53a613698c 100644
--- a/sdk/src/utils/trade/decrease.ts
+++ b/sdk/src/utils/trade/decrease.ts
@@ -170,8 +170,7 @@ export function getDecreasePositionAmounts(p: {
0n +
values.positionFeeUsd +
values.uiFeeUsd +
- (values.totalPendingImpactDeltaUsd < 0 ? values.totalPendingImpactDeltaUsd : 0n) -
- values.priceImpactDiffUsd;
+ (values.totalPendingImpactDeltaUsd < 0 ? values.totalPendingImpactDeltaUsd : 0n);
values.payedOutputUsd = totalFeesUsd;
@@ -297,7 +296,6 @@ export function getDecreasePositionAmounts(p: {
const negativePnlUsd = values.realizedPnl < 0 ? bigMath.abs(values.realizedPnl) : 0n;
const negativePriceImpactUsd =
values.totalPendingImpactDeltaUsd < 0 ? bigMath.abs(values.totalPendingImpactDeltaUsd) : 0n;
- const priceImpactDiffUsd = values.priceImpactDiffUsd > 0 ? values.priceImpactDiffUsd : 0n;
const totalFeesUsd =
values.positionFeeUsd +
@@ -307,8 +305,7 @@ export function getDecreasePositionAmounts(p: {
values.swapUiFeeUsd +
values.uiFeeUsd +
negativePnlUsd +
- negativePriceImpactUsd -
- priceImpactDiffUsd;
+ negativePriceImpactUsd;
const payedInfo = payForCollateralCost({
initialCostUsd: totalFeesUsd,
diff --git a/src/domain/synthetics/trade/utils/common.ts b/src/domain/synthetics/trade/utils/common.ts
index 9ee72d7556..53fb807cde 100644
--- a/src/domain/synthetics/trade/utils/common.ts
+++ b/src/domain/synthetics/trade/utils/common.ts
@@ -195,21 +195,9 @@ export function getTradeFees(p: {
uiSwapFee,
]);
- // TODO: this is the same as totalFees, we should remove this
- const payTotalFees = getTotalFeeItem([
- ...(swapFees || []),
- swapProfitFee,
- swapPriceImpact,
- positionFeeAfterDiscount,
- borrowFee,
- fundingFee,
- uiFee,
- uiSwapFee,
- ]);
-
return {
totalFees,
- payTotalFees,
+ payTotalFees: totalFees,
swapFees,
swapProfitFee,
swapPriceImpact,
From 6d17fd67985a67836656ab95dc4ba98cd001eae9 Mon Sep 17 00:00:00 2001
From: Divhead <110596516+divhead@users.noreply.github.com>
Date: Fri, 25 Jul 2025 12:16:10 -0700
Subject: [PATCH 14/55] add position impact to total fees
---
src/domain/synthetics/trade/utils/common.ts | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/domain/synthetics/trade/utils/common.ts b/src/domain/synthetics/trade/utils/common.ts
index 53fb807cde..5c216ddd4d 100644
--- a/src/domain/synthetics/trade/utils/common.ts
+++ b/src/domain/synthetics/trade/utils/common.ts
@@ -188,6 +188,7 @@ export function getTradeFees(p: {
externalSwapFee,
swapProfitFee,
swapPriceImpact,
+ positionPriceImpact,
positionFeeAfterDiscount,
borrowFee,
fundingFee,
From 865d7579df890f82f45dcfd07df1fc106bcae99b Mon Sep 17 00:00:00 2001
From: Divhead <110596516+divhead@users.noreply.github.com>
Date: Fri, 25 Jul 2025 12:17:34 -0700
Subject: [PATCH 15/55] add position impact to total fees
---
src/domain/synthetics/trade/utils/common.ts | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/domain/synthetics/trade/utils/common.ts b/src/domain/synthetics/trade/utils/common.ts
index 5c216ddd4d..4aa5ab1a37 100644
--- a/src/domain/synthetics/trade/utils/common.ts
+++ b/src/domain/synthetics/trade/utils/common.ts
@@ -105,6 +105,7 @@ export function getTradeFees(p: {
feeDiscountUsd: bigint;
swapProfitFeeUsd: bigint;
uiFeeFactor: bigint;
+ type: "increase" | "decrease" | "swap";
}): TradeFees {
const {
initialCollateralUsd,
@@ -123,6 +124,7 @@ export function getTradeFees(p: {
proportionalPendingImpactDeltaUsd,
closePriceImpactDeltaUsd,
uiFeeFactor,
+ type,
} = p;
const swapFees: SwapFeeItem[] | undefined =
@@ -188,7 +190,7 @@ export function getTradeFees(p: {
externalSwapFee,
swapProfitFee,
swapPriceImpact,
- positionPriceImpact,
+ type === "decrease" ? positionPriceImpact : undefined,
positionFeeAfterDiscount,
borrowFee,
fundingFee,
From 75b82c328e8bcb80aa8e74b7851db79e84ab8099 Mon Sep 17 00:00:00 2001
From: Divhead <110596516+divhead@users.noreply.github.com>
Date: Fri, 25 Jul 2025 12:18:24 -0700
Subject: [PATCH 16/55] fix fee type
---
.../SyntheticsStateContext/selectors/orderEditorSelectors.ts | 1 +
.../selectors/positionSellerSelectors.ts | 1 +
.../selectors/tradeboxSelectors/index.ts | 3 +++
3 files changed, 5 insertions(+)
diff --git a/src/context/SyntheticsStateContext/selectors/orderEditorSelectors.ts b/src/context/SyntheticsStateContext/selectors/orderEditorSelectors.ts
index 0cda205235..fd089231d2 100644
--- a/src/context/SyntheticsStateContext/selectors/orderEditorSelectors.ts
+++ b/src/context/SyntheticsStateContext/selectors/orderEditorSelectors.ts
@@ -135,6 +135,7 @@ export const selectOrderEditorSwapFees = createSelector((q) => {
swapProfitFeeUsd: 0n,
uiFeeFactor,
externalSwapQuote: undefined,
+ type: "increase",
});
});
diff --git a/src/context/SyntheticsStateContext/selectors/positionSellerSelectors.ts b/src/context/SyntheticsStateContext/selectors/positionSellerSelectors.ts
index 104f26c1b4..644f0f22b5 100644
--- a/src/context/SyntheticsStateContext/selectors/positionSellerSelectors.ts
+++ b/src/context/SyntheticsStateContext/selectors/positionSellerSelectors.ts
@@ -255,6 +255,7 @@ export const selectPositionSellerFees = createSelector((q) => {
feeDiscountUsd: decreaseAmounts.feeDiscountUsd,
swapProfitFeeUsd: decreaseAmounts.swapProfitFeeUsd,
uiFeeFactor,
+ type: "decrease",
}),
executionFee: getExecutionFee(
chainId,
diff --git a/src/context/SyntheticsStateContext/selectors/tradeboxSelectors/index.ts b/src/context/SyntheticsStateContext/selectors/tradeboxSelectors/index.ts
index 87e9af8bc8..788c572150 100644
--- a/src/context/SyntheticsStateContext/selectors/tradeboxSelectors/index.ts
+++ b/src/context/SyntheticsStateContext/selectors/tradeboxSelectors/index.ts
@@ -731,6 +731,7 @@ export const selectTradeboxFees = createSelector(function selectTradeboxFees(q)
feeDiscountUsd: 0n,
swapProfitFeeUsd: 0n,
uiFeeFactor,
+ type: "swap",
});
}
case "increase": {
@@ -755,6 +756,7 @@ export const selectTradeboxFees = createSelector(function selectTradeboxFees(q)
feeDiscountUsd: increaseAmounts.feeDiscountUsd,
swapProfitFeeUsd: 0n,
uiFeeFactor,
+ type: "increase",
});
}
case "decrease": {
@@ -789,6 +791,7 @@ export const selectTradeboxFees = createSelector(function selectTradeboxFees(q)
feeDiscountUsd: decreaseAmounts.feeDiscountUsd,
swapProfitFeeUsd: decreaseAmounts.swapProfitFeeUsd,
uiFeeFactor,
+ type: "decrease",
});
}
case "edit":
From cc50c3c801d572067c1c313d31760323bd227e23 Mon Sep 17 00:00:00 2001
From: Divhead <110596516+divhead@users.noreply.github.com>
Date: Fri, 1 Aug 2025 06:17:43 -0700
Subject: [PATCH 17/55] fix pnl and fees
---
sdk/src/modules/positions/positions.ts | 3 +-
sdk/src/types/subsquid.ts | 288 ++++++++++++++++++
sdk/src/types/trade.ts | 2 +
sdk/src/utils/positions.ts | 14 +-
sdk/src/utils/trade/decrease.ts | 73 +++--
.../PositionEditor/PositionEditor.tsx | 4 +-
.../PositionSeller/PositionSeller.tsx | 4 +-
.../Synthetics/TradeBox/TradeBox.tsx | 4 +-
.../Synthetics/TradeFeesRow/TradeFeesRow.tsx | 32 +-
.../synthetics/positions/usePositionsInfo.ts | 23 +-
.../trade/usePriceImpactWarningState.ts | 12 +-
src/domain/synthetics/trade/utils/common.ts | 8 +-
src/domain/synthetics/trade/utils/warnings.ts | 14 +-
13 files changed, 424 insertions(+), 57 deletions(-)
diff --git a/sdk/src/modules/positions/positions.ts b/sdk/src/modules/positions/positions.ts
index ed62125b09..6d089273d3 100644
--- a/sdk/src/modules/positions/positions.ts
+++ b/sdk/src/modules/positions/positions.ts
@@ -612,7 +612,8 @@ export class Positions extends Module {
const pnlAfterFees = getPositionPnlAfterFees({
pnl,
- totalPendingFeesUsd,
+ pendingBorrowingFeesUsd: position.pendingBorrowingFeesUsd,
+ pendingFundingFeesUsd: pendingFundingFeesUsd,
closingFeeUsd,
uiFeeUsd,
totalPendingImpactDeltaUsd: netPriceImapctValues?.totalImpactDeltaUsd ?? 0n,
diff --git a/sdk/src/types/subsquid.ts b/sdk/src/types/subsquid.ts
index 53a5308821..f9fd8084b8 100644
--- a/sdk/src/types/subsquid.ts
+++ b/sdk/src/types/subsquid.ts
@@ -1534,6 +1534,155 @@ export interface CumulativePoolValuesConnection {
totalCount: Scalars["Int"]["output"];
}
+export interface Distribution {
+ __typename?: "Distribution";
+ amounts: Array;
+ amountsInUsd: Array;
+ id: Scalars["String"]["output"];
+ receiver: Scalars["String"]["output"];
+ tokens: Array;
+ transaction: Transaction;
+ typeId: Scalars["Int"]["output"];
+}
+
+export interface DistributionEdge {
+ __typename?: "DistributionEdge";
+ cursor: Scalars["String"]["output"];
+ node: Distribution;
+}
+
+export enum DistributionOrderByInput {
+ id_ASC = "id_ASC",
+ id_ASC_NULLS_FIRST = "id_ASC_NULLS_FIRST",
+ id_ASC_NULLS_LAST = "id_ASC_NULLS_LAST",
+ id_DESC = "id_DESC",
+ id_DESC_NULLS_FIRST = "id_DESC_NULLS_FIRST",
+ id_DESC_NULLS_LAST = "id_DESC_NULLS_LAST",
+ receiver_ASC = "receiver_ASC",
+ receiver_ASC_NULLS_FIRST = "receiver_ASC_NULLS_FIRST",
+ receiver_ASC_NULLS_LAST = "receiver_ASC_NULLS_LAST",
+ receiver_DESC = "receiver_DESC",
+ receiver_DESC_NULLS_FIRST = "receiver_DESC_NULLS_FIRST",
+ receiver_DESC_NULLS_LAST = "receiver_DESC_NULLS_LAST",
+ transaction_blockNumber_ASC = "transaction_blockNumber_ASC",
+ transaction_blockNumber_ASC_NULLS_FIRST = "transaction_blockNumber_ASC_NULLS_FIRST",
+ transaction_blockNumber_ASC_NULLS_LAST = "transaction_blockNumber_ASC_NULLS_LAST",
+ transaction_blockNumber_DESC = "transaction_blockNumber_DESC",
+ transaction_blockNumber_DESC_NULLS_FIRST = "transaction_blockNumber_DESC_NULLS_FIRST",
+ transaction_blockNumber_DESC_NULLS_LAST = "transaction_blockNumber_DESC_NULLS_LAST",
+ transaction_from_ASC = "transaction_from_ASC",
+ transaction_from_ASC_NULLS_FIRST = "transaction_from_ASC_NULLS_FIRST",
+ transaction_from_ASC_NULLS_LAST = "transaction_from_ASC_NULLS_LAST",
+ transaction_from_DESC = "transaction_from_DESC",
+ transaction_from_DESC_NULLS_FIRST = "transaction_from_DESC_NULLS_FIRST",
+ transaction_from_DESC_NULLS_LAST = "transaction_from_DESC_NULLS_LAST",
+ transaction_hash_ASC = "transaction_hash_ASC",
+ transaction_hash_ASC_NULLS_FIRST = "transaction_hash_ASC_NULLS_FIRST",
+ transaction_hash_ASC_NULLS_LAST = "transaction_hash_ASC_NULLS_LAST",
+ transaction_hash_DESC = "transaction_hash_DESC",
+ transaction_hash_DESC_NULLS_FIRST = "transaction_hash_DESC_NULLS_FIRST",
+ transaction_hash_DESC_NULLS_LAST = "transaction_hash_DESC_NULLS_LAST",
+ transaction_id_ASC = "transaction_id_ASC",
+ transaction_id_ASC_NULLS_FIRST = "transaction_id_ASC_NULLS_FIRST",
+ transaction_id_ASC_NULLS_LAST = "transaction_id_ASC_NULLS_LAST",
+ transaction_id_DESC = "transaction_id_DESC",
+ transaction_id_DESC_NULLS_FIRST = "transaction_id_DESC_NULLS_FIRST",
+ transaction_id_DESC_NULLS_LAST = "transaction_id_DESC_NULLS_LAST",
+ transaction_timestamp_ASC = "transaction_timestamp_ASC",
+ transaction_timestamp_ASC_NULLS_FIRST = "transaction_timestamp_ASC_NULLS_FIRST",
+ transaction_timestamp_ASC_NULLS_LAST = "transaction_timestamp_ASC_NULLS_LAST",
+ transaction_timestamp_DESC = "transaction_timestamp_DESC",
+ transaction_timestamp_DESC_NULLS_FIRST = "transaction_timestamp_DESC_NULLS_FIRST",
+ transaction_timestamp_DESC_NULLS_LAST = "transaction_timestamp_DESC_NULLS_LAST",
+ transaction_to_ASC = "transaction_to_ASC",
+ transaction_to_ASC_NULLS_FIRST = "transaction_to_ASC_NULLS_FIRST",
+ transaction_to_ASC_NULLS_LAST = "transaction_to_ASC_NULLS_LAST",
+ transaction_to_DESC = "transaction_to_DESC",
+ transaction_to_DESC_NULLS_FIRST = "transaction_to_DESC_NULLS_FIRST",
+ transaction_to_DESC_NULLS_LAST = "transaction_to_DESC_NULLS_LAST",
+ transaction_transactionIndex_ASC = "transaction_transactionIndex_ASC",
+ transaction_transactionIndex_ASC_NULLS_FIRST = "transaction_transactionIndex_ASC_NULLS_FIRST",
+ transaction_transactionIndex_ASC_NULLS_LAST = "transaction_transactionIndex_ASC_NULLS_LAST",
+ transaction_transactionIndex_DESC = "transaction_transactionIndex_DESC",
+ transaction_transactionIndex_DESC_NULLS_FIRST = "transaction_transactionIndex_DESC_NULLS_FIRST",
+ transaction_transactionIndex_DESC_NULLS_LAST = "transaction_transactionIndex_DESC_NULLS_LAST",
+ typeId_ASC = "typeId_ASC",
+ typeId_ASC_NULLS_FIRST = "typeId_ASC_NULLS_FIRST",
+ typeId_ASC_NULLS_LAST = "typeId_ASC_NULLS_LAST",
+ typeId_DESC = "typeId_DESC",
+ typeId_DESC_NULLS_FIRST = "typeId_DESC_NULLS_FIRST",
+ typeId_DESC_NULLS_LAST = "typeId_DESC_NULLS_LAST",
+}
+
+export interface DistributionWhereInput {
+ AND?: InputMaybe>;
+ OR?: InputMaybe>;
+ amountsInUsd_containsAll?: InputMaybe>;
+ amountsInUsd_containsAny?: InputMaybe>;
+ amountsInUsd_containsNone?: InputMaybe>;
+ amountsInUsd_isNull?: InputMaybe;
+ amounts_containsAll?: InputMaybe>;
+ amounts_containsAny?: InputMaybe>;
+ amounts_containsNone?: InputMaybe>;
+ amounts_isNull?: InputMaybe;
+ id_contains?: InputMaybe;
+ id_containsInsensitive?: InputMaybe;
+ id_endsWith?: InputMaybe;
+ id_eq?: InputMaybe;
+ id_gt?: InputMaybe;
+ id_gte?: InputMaybe;
+ id_in?: InputMaybe>;
+ id_isNull?: InputMaybe;
+ id_lt?: InputMaybe;
+ id_lte?: InputMaybe;
+ id_not_contains?: InputMaybe;
+ id_not_containsInsensitive?: InputMaybe;
+ id_not_endsWith?: InputMaybe;
+ id_not_eq?: InputMaybe;
+ id_not_in?: InputMaybe>;
+ id_not_startsWith?: InputMaybe;
+ id_startsWith?: InputMaybe;
+ receiver_contains?: InputMaybe;
+ receiver_containsInsensitive?: InputMaybe;
+ receiver_endsWith?: InputMaybe;
+ receiver_eq?: InputMaybe;
+ receiver_gt?: InputMaybe;
+ receiver_gte?: InputMaybe;
+ receiver_in?: InputMaybe>;
+ receiver_isNull?: InputMaybe;
+ receiver_lt?: InputMaybe;
+ receiver_lte?: InputMaybe;
+ receiver_not_contains?: InputMaybe;
+ receiver_not_containsInsensitive?: InputMaybe;
+ receiver_not_endsWith?: InputMaybe;
+ receiver_not_eq?: InputMaybe;
+ receiver_not_in?: InputMaybe>;
+ receiver_not_startsWith?: InputMaybe;
+ receiver_startsWith?: InputMaybe;
+ tokens_containsAll?: InputMaybe>;
+ tokens_containsAny?: InputMaybe>;
+ tokens_containsNone?: InputMaybe>;
+ tokens_isNull?: InputMaybe;
+ transaction?: InputMaybe;
+ transaction_isNull?: InputMaybe;
+ typeId_eq?: InputMaybe;
+ typeId_gt?: InputMaybe;
+ typeId_gte?: InputMaybe;
+ typeId_in?: InputMaybe>;
+ typeId_isNull?: InputMaybe;
+ typeId_lt?: InputMaybe;
+ typeId_lte?: InputMaybe;
+ typeId_not_eq?: InputMaybe;
+ typeId_not_in?: InputMaybe>;
+}
+
+export interface DistributionsConnection {
+ __typename?: "DistributionsConnection";
+ edges: Array;
+ pageInfo: PageInfo;
+ totalCount: Scalars["Int"]["output"];
+}
+
export enum EntityType {
Glv = "Glv",
Market = "Market",
@@ -5747,6 +5896,103 @@ export interface PricesConnection {
totalCount: Scalars["Int"]["output"];
}
+export interface ProcessorStatus {
+ __typename?: "ProcessorStatus";
+ id: Scalars["String"]["output"];
+ lastParsedBlockNumber: Scalars["Int"]["output"];
+ lastParsedBlockTimestamp: Scalars["Int"]["output"];
+ lastProcessorCallTimestamp: Scalars["Int"]["output"];
+}
+
+export interface ProcessorStatusEdge {
+ __typename?: "ProcessorStatusEdge";
+ cursor: Scalars["String"]["output"];
+ node: ProcessorStatus;
+}
+
+export enum ProcessorStatusOrderByInput {
+ id_ASC = "id_ASC",
+ id_ASC_NULLS_FIRST = "id_ASC_NULLS_FIRST",
+ id_ASC_NULLS_LAST = "id_ASC_NULLS_LAST",
+ id_DESC = "id_DESC",
+ id_DESC_NULLS_FIRST = "id_DESC_NULLS_FIRST",
+ id_DESC_NULLS_LAST = "id_DESC_NULLS_LAST",
+ lastParsedBlockNumber_ASC = "lastParsedBlockNumber_ASC",
+ lastParsedBlockNumber_ASC_NULLS_FIRST = "lastParsedBlockNumber_ASC_NULLS_FIRST",
+ lastParsedBlockNumber_ASC_NULLS_LAST = "lastParsedBlockNumber_ASC_NULLS_LAST",
+ lastParsedBlockNumber_DESC = "lastParsedBlockNumber_DESC",
+ lastParsedBlockNumber_DESC_NULLS_FIRST = "lastParsedBlockNumber_DESC_NULLS_FIRST",
+ lastParsedBlockNumber_DESC_NULLS_LAST = "lastParsedBlockNumber_DESC_NULLS_LAST",
+ lastParsedBlockTimestamp_ASC = "lastParsedBlockTimestamp_ASC",
+ lastParsedBlockTimestamp_ASC_NULLS_FIRST = "lastParsedBlockTimestamp_ASC_NULLS_FIRST",
+ lastParsedBlockTimestamp_ASC_NULLS_LAST = "lastParsedBlockTimestamp_ASC_NULLS_LAST",
+ lastParsedBlockTimestamp_DESC = "lastParsedBlockTimestamp_DESC",
+ lastParsedBlockTimestamp_DESC_NULLS_FIRST = "lastParsedBlockTimestamp_DESC_NULLS_FIRST",
+ lastParsedBlockTimestamp_DESC_NULLS_LAST = "lastParsedBlockTimestamp_DESC_NULLS_LAST",
+ lastProcessorCallTimestamp_ASC = "lastProcessorCallTimestamp_ASC",
+ lastProcessorCallTimestamp_ASC_NULLS_FIRST = "lastProcessorCallTimestamp_ASC_NULLS_FIRST",
+ lastProcessorCallTimestamp_ASC_NULLS_LAST = "lastProcessorCallTimestamp_ASC_NULLS_LAST",
+ lastProcessorCallTimestamp_DESC = "lastProcessorCallTimestamp_DESC",
+ lastProcessorCallTimestamp_DESC_NULLS_FIRST = "lastProcessorCallTimestamp_DESC_NULLS_FIRST",
+ lastProcessorCallTimestamp_DESC_NULLS_LAST = "lastProcessorCallTimestamp_DESC_NULLS_LAST",
+}
+
+export interface ProcessorStatusWhereInput {
+ AND?: InputMaybe>;
+ OR?: InputMaybe>;
+ id_contains?: InputMaybe;
+ id_containsInsensitive?: InputMaybe;
+ id_endsWith?: InputMaybe;
+ id_eq?: InputMaybe;
+ id_gt?: InputMaybe;
+ id_gte?: InputMaybe;
+ id_in?: InputMaybe>;
+ id_isNull?: InputMaybe;
+ id_lt?: InputMaybe;
+ id_lte?: InputMaybe;
+ id_not_contains?: InputMaybe;
+ id_not_containsInsensitive?: InputMaybe;
+ id_not_endsWith?: InputMaybe;
+ id_not_eq?: InputMaybe;
+ id_not_in?: InputMaybe>;
+ id_not_startsWith?: InputMaybe;
+ id_startsWith?: InputMaybe;
+ lastParsedBlockNumber_eq?: InputMaybe;
+ lastParsedBlockNumber_gt?: InputMaybe;
+ lastParsedBlockNumber_gte?: InputMaybe;
+ lastParsedBlockNumber_in?: InputMaybe>;
+ lastParsedBlockNumber_isNull?: InputMaybe;
+ lastParsedBlockNumber_lt?: InputMaybe;
+ lastParsedBlockNumber_lte?: InputMaybe;
+ lastParsedBlockNumber_not_eq?: InputMaybe;
+ lastParsedBlockNumber_not_in?: InputMaybe>;
+ lastParsedBlockTimestamp_eq?: InputMaybe;
+ lastParsedBlockTimestamp_gt?: InputMaybe;
+ lastParsedBlockTimestamp_gte?: InputMaybe;
+ lastParsedBlockTimestamp_in?: InputMaybe>;
+ lastParsedBlockTimestamp_isNull?: InputMaybe;
+ lastParsedBlockTimestamp_lt?: InputMaybe;
+ lastParsedBlockTimestamp_lte?: InputMaybe;
+ lastParsedBlockTimestamp_not_eq?: InputMaybe;
+ lastParsedBlockTimestamp_not_in?: InputMaybe>;
+ lastProcessorCallTimestamp_eq?: InputMaybe;
+ lastProcessorCallTimestamp_gt?: InputMaybe;
+ lastProcessorCallTimestamp_gte?: InputMaybe;
+ lastProcessorCallTimestamp_in?: InputMaybe>;
+ lastProcessorCallTimestamp_isNull?: InputMaybe;
+ lastProcessorCallTimestamp_lt?: InputMaybe;
+ lastProcessorCallTimestamp_lte?: InputMaybe;
+ lastProcessorCallTimestamp_not_eq?: InputMaybe;
+ lastProcessorCallTimestamp_not_in?: InputMaybe>;
+}
+
+export interface ProcessorStatusesConnection {
+ __typename?: "ProcessorStatusesConnection";
+ edges: Array;
+ pageInfo: PageInfo;
+ totalCount: Scalars["Int"]["output"];
+}
+
export interface Query {
__typename?: "Query";
accountPnlHistoryStats: Array;
@@ -5778,6 +6024,9 @@ export interface Query {
cumulativePoolValueById?: Maybe;
cumulativePoolValues: Array;
cumulativePoolValuesConnection: CumulativePoolValuesConnection;
+ distributionById?: Maybe;
+ distributions: Array;
+ distributionsConnection: DistributionsConnection;
glvById?: Maybe;
glvs: Array;
glvsAprByPeriod: Array;
@@ -5816,6 +6065,9 @@ export interface Query {
priceById?: Maybe;
prices: Array;
pricesConnection: PricesConnection;
+ processorStatusById?: Maybe;
+ processorStatuses: Array;
+ processorStatusesConnection: ProcessorStatusesConnection;
squidStatus?: Maybe;
swapInfoById?: Maybe;
swapInfos: Array;
@@ -6000,6 +6252,24 @@ export interface QuerycumulativePoolValuesConnectionArgs {
where?: InputMaybe;
}
+export interface QuerydistributionByIdArgs {
+ id: Scalars["String"]["input"];
+}
+
+export interface QuerydistributionsArgs {
+ limit?: InputMaybe;
+ offset?: InputMaybe;
+ orderBy?: InputMaybe>;
+ where?: InputMaybe;
+}
+
+export interface QuerydistributionsConnectionArgs {
+ after?: InputMaybe;
+ first?: InputMaybe;
+ orderBy: Array;
+ where?: InputMaybe;
+}
+
export interface QueryglvByIdArgs {
id: Scalars["String"]["input"];
}
@@ -6214,6 +6484,24 @@ export interface QuerypricesConnectionArgs {
where?: InputMaybe;
}
+export interface QueryprocessorStatusByIdArgs {
+ id: Scalars["String"]["input"];
+}
+
+export interface QueryprocessorStatusesArgs {
+ limit?: InputMaybe;
+ offset?: InputMaybe;
+ orderBy?: InputMaybe>;
+ where?: InputMaybe;
+}
+
+export interface QueryprocessorStatusesConnectionArgs {
+ after?: InputMaybe;
+ first?: InputMaybe;
+ orderBy: Array;
+ where?: InputMaybe;
+}
+
export interface QueryswapInfoByIdArgs {
id: Scalars["String"]["input"];
}
diff --git a/sdk/src/types/trade.ts b/sdk/src/types/trade.ts
index b20eea2371..23fe8dacff 100644
--- a/sdk/src/types/trade.ts
+++ b/sdk/src/types/trade.ts
@@ -306,6 +306,8 @@ export type TradeFees = {
positionCollateralPriceImpact?: FeeItem;
collateralPriceImpactDiff?: FeeItem;
proportionalPendingImpact?: FeeItem;
+ positionNetPriceImpact?: FeeItem;
+ collateralNetPriceImpact?: FeeItem;
closePriceImpact?: FeeItem;
positionFeeFactor?: bigint;
borrowFee?: FeeItem;
diff --git a/sdk/src/utils/positions.ts b/sdk/src/utils/positions.ts
index f10873adf8..92f3d4976d 100644
--- a/sdk/src/utils/positions.ts
+++ b/sdk/src/utils/positions.ts
@@ -106,21 +106,29 @@ export function getPositionNetValue(p: {
export function getPositionPnlAfterFees({
pnl,
- totalPendingFeesUsd,
+ pendingBorrowingFeesUsd,
+ pendingFundingFeesUsd,
closingFeeUsd,
uiFeeUsd,
totalPendingImpactDeltaUsd,
priceImpactDiffUsd,
}: {
pnl: bigint;
- totalPendingFeesUsd: bigint;
+ pendingBorrowingFeesUsd: bigint;
+ pendingFundingFeesUsd: bigint;
closingFeeUsd: bigint;
uiFeeUsd: bigint;
totalPendingImpactDeltaUsd: bigint;
priceImpactDiffUsd: bigint;
}) {
const pnlAfterFees =
- pnl - totalPendingFeesUsd - closingFeeUsd - uiFeeUsd + totalPendingImpactDeltaUsd + priceImpactDiffUsd;
+ pnl -
+ pendingBorrowingFeesUsd -
+ pendingFundingFeesUsd -
+ closingFeeUsd -
+ uiFeeUsd +
+ totalPendingImpactDeltaUsd +
+ priceImpactDiffUsd;
return pnlAfterFees;
}
diff --git a/sdk/src/utils/trade/decrease.ts b/sdk/src/utils/trade/decrease.ts
index 53a613698c..c5d97b82a5 100644
--- a/sdk/src/utils/trade/decrease.ts
+++ b/sdk/src/utils/trade/decrease.ts
@@ -166,11 +166,16 @@ export function getDecreasePositionAmounts(p: {
values.feeDiscountUsd = positionFeeInfo.discountUsd;
values.uiFeeUsd = applyFactor(values.sizeDeltaUsd, uiFeeFactor);
- const totalFeesUsd =
- 0n +
- values.positionFeeUsd +
- values.uiFeeUsd +
- (values.totalPendingImpactDeltaUsd < 0 ? values.totalPendingImpactDeltaUsd : 0n);
+ const totalFeesUsd = getTotalFeesUsdForDecrease({
+ positionFeeUsd: values.positionFeeUsd,
+ borrowingFeeUsd: 0n,
+ fundingFeeUsd: 0n,
+ swapProfitFeeUsd: 0n,
+ swapUiFeeUsd: 0n,
+ uiFeeUsd: values.uiFeeUsd,
+ pnlUsd: 0n,
+ totalPendingImpactDeltaUsd: values.totalPendingImpactDeltaUsd,
+ });
values.payedOutputUsd = totalFeesUsd;
@@ -293,19 +298,16 @@ export function getDecreasePositionAmounts(p: {
values.swapProfitFeeUsd = 0n;
}
- const negativePnlUsd = values.realizedPnl < 0 ? bigMath.abs(values.realizedPnl) : 0n;
- const negativePriceImpactUsd =
- values.totalPendingImpactDeltaUsd < 0 ? bigMath.abs(values.totalPendingImpactDeltaUsd) : 0n;
-
- const totalFeesUsd =
- values.positionFeeUsd +
- values.borrowingFeeUsd +
- values.fundingFeeUsd +
- values.swapProfitFeeUsd +
- values.swapUiFeeUsd +
- values.uiFeeUsd +
- negativePnlUsd +
- negativePriceImpactUsd;
+ const totalFeesUsd = getTotalFeesUsdForDecrease({
+ positionFeeUsd: values.positionFeeUsd,
+ borrowingFeeUsd: 0n,
+ fundingFeeUsd: 0n,
+ swapProfitFeeUsd: 0n,
+ swapUiFeeUsd: 0n,
+ uiFeeUsd: values.uiFeeUsd,
+ pnlUsd: values.realizedPnl,
+ totalPendingImpactDeltaUsd: values.totalPendingImpactDeltaUsd,
+ });
const payedInfo = payForCollateralCost({
initialCostUsd: totalFeesUsd,
@@ -580,6 +582,41 @@ export function estimateCollateralCost(baseUsd: bigint, collateralToken: TokenDa
};
}
+export function getTotalFeesUsdForDecrease({
+ positionFeeUsd,
+ borrowingFeeUsd,
+ fundingFeeUsd,
+ swapProfitFeeUsd,
+ swapUiFeeUsd,
+ uiFeeUsd,
+ pnlUsd,
+ totalPendingImpactDeltaUsd,
+}: {
+ positionFeeUsd: bigint;
+ borrowingFeeUsd: bigint;
+ fundingFeeUsd: bigint;
+ swapProfitFeeUsd: bigint;
+ swapUiFeeUsd: bigint;
+ uiFeeUsd: bigint;
+ pnlUsd: bigint;
+ totalPendingImpactDeltaUsd: bigint;
+}) {
+ const negativePriceImpactUsd = totalPendingImpactDeltaUsd < 0 ? bigMath.abs(totalPendingImpactDeltaUsd) : 0n;
+ const negativePnlUsd = pnlUsd < 0 ? bigMath.abs(pnlUsd) : 0n;
+
+ const totalFeesUsd =
+ positionFeeUsd +
+ borrowingFeeUsd +
+ fundingFeeUsd +
+ swapProfitFeeUsd +
+ swapUiFeeUsd +
+ uiFeeUsd +
+ negativePnlUsd +
+ negativePriceImpactUsd;
+
+ return totalFeesUsd;
+}
+
export function getNextPositionValuesForDecreaseTrade(p: {
existingPosition?: PositionInfo;
marketInfo: MarketInfo;
diff --git a/src/components/Synthetics/PositionEditor/PositionEditor.tsx b/src/components/Synthetics/PositionEditor/PositionEditor.tsx
index 2d580e5894..dc60d73b04 100644
--- a/src/components/Synthetics/PositionEditor/PositionEditor.tsx
+++ b/src/components/Synthetics/PositionEditor/PositionEditor.tsx
@@ -208,8 +208,8 @@ export function PositionEditor() {
});
const priceImpactWarningState = usePriceImpactWarningState({
- collateralImpact: fees?.positionCollateralPriceImpact,
- positionImpact: fees?.positionPriceImpact,
+ collateralNetPriceImpact: fees?.collateralNetPriceImpact,
+ positionNetPriceImpact: fees?.positionNetPriceImpact,
swapPriceImpact: fees?.swapPriceImpact,
swapProfitFee: fees?.swapProfitFee,
executionFeeUsd: executionFee?.feeUsd,
diff --git a/src/components/Synthetics/PositionSeller/PositionSeller.tsx b/src/components/Synthetics/PositionSeller/PositionSeller.tsx
index 6f8d47ad7d..fc11012e6b 100644
--- a/src/components/Synthetics/PositionSeller/PositionSeller.tsx
+++ b/src/components/Synthetics/PositionSeller/PositionSeller.tsx
@@ -246,8 +246,8 @@ export function PositionSeller() {
const { fees, executionFee } = useSelector(selectPositionSellerFees);
const priceImpactWarningState = usePriceImpactWarningState({
- collateralImpact: fees?.positionCollateralPriceImpact,
- positionImpact: fees?.positionPriceImpact,
+ collateralNetPriceImpact: fees?.collateralNetPriceImpact,
+ positionNetPriceImpact: fees?.positionNetPriceImpact,
swapPriceImpact: fees?.swapPriceImpact,
swapProfitFee: fees?.swapProfitFee,
executionFeeUsd: executionFee?.feeUsd,
diff --git a/src/components/Synthetics/TradeBox/TradeBox.tsx b/src/components/Synthetics/TradeBox/TradeBox.tsx
index a355f95d2d..9f0a4786fd 100644
--- a/src/components/Synthetics/TradeBox/TradeBox.tsx
+++ b/src/components/Synthetics/TradeBox/TradeBox.tsx
@@ -221,8 +221,8 @@ export function TradeBox({ isMobile }: { isMobile: boolean }) {
const decreaseOrdersThatWillBeExecuted = useDecreaseOrdersThatWillBeExecuted();
const priceImpactWarningState = usePriceImpactWarningState({
- collateralImpact: fees?.positionCollateralPriceImpact,
- positionImpact: fees?.positionPriceImpact,
+ collateralNetPriceImpact: fees?.collateralNetPriceImpact,
+ positionNetPriceImpact: fees?.positionNetPriceImpact,
swapPriceImpact: fees?.swapPriceImpact,
swapProfitFee: fees?.swapProfitFee,
executionFeeUsd: executionFee?.feeUsd,
diff --git a/src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx b/src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
index 439bedb4a9..e4949b5cc1 100644
--- a/src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+++ b/src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
@@ -337,7 +337,7 @@ export function TradeFeesRow(p: Props) {
}
: undefined;
- const priceImpactDiffRow =
+ const priceImpactRebatesRow =
p.priceImpactDiff?.deltaUsd !== undefined && p.priceImpactDiff.deltaUsd !== 0n
? {
id: "priceImpactDiff",
@@ -412,7 +412,7 @@ export function TradeFeesRow(p: Props) {
closePriceImpactDeltaUsdRow,
proportionalPendingImpactDeltaUsdRow,
netPriceImpactRow,
- priceImpactDiffRow,
+ priceImpactRebatesRow,
borrowFeeRow,
fundingFeeRow,
positionFeeRow,
@@ -505,7 +505,10 @@ export function TradeFeesRow(p: Props) {
}, [p.priceImpactDiff?.deltaUsd]);
const swapRouteMsg = useMemo(() => {
- if (p.swapFees && p.swapFees.length <= 2) return;
+ if (p.swapFees && p.swapFees.length <= 2) {
+ return null;
+ }
+
return (
<>
@@ -549,11 +552,24 @@ export function TradeFeesRow(p: Props) {
showDollar={false}
/>
))}
- {incentivesBottomText &&
}
- {incentivesBottomText &&
}
- {priceImpactRebatesInfo &&
}
- {swapRouteMsg &&
}
- {swapRouteMsg}
+ {incentivesBottomText && (
+
+
+ {incentivesBottomText}
+
+ )}
+ {priceImpactRebatesInfo && (
+
+
+ {priceImpactRebatesInfo}
+
+ )}
+ {swapRouteMsg && (
+
+
+ {swapRouteMsg}
+
+ )}
}
/>
diff --git a/src/domain/synthetics/positions/usePositionsInfo.ts b/src/domain/synthetics/positions/usePositionsInfo.ts
index e2e670ee87..a2d9b307b6 100644
--- a/src/domain/synthetics/positions/usePositionsInfo.ts
+++ b/src/domain/synthetics/positions/usePositionsInfo.ts
@@ -6,7 +6,12 @@ import { getByKey } from "lib/objects";
import useWallet from "lib/wallets/useWallet";
import { ContractsChainId } from "sdk/configs/chains";
import { convertTokenAddress } from "sdk/configs/tokens";
-import { getEntryPrice, getNetPriceImpactDeltaUsdForDecrease, getPositionPnlUsd } from "sdk/utils/positions";
+import {
+ getEntryPrice,
+ getNetPriceImpactDeltaUsdForDecrease,
+ getPositionPnlAfterFees,
+ getPositionPnlUsd,
+} from "sdk/utils/positions";
import useUiFeeFactorRequest from "../fees/utils/useUiFeeFactor";
import {
@@ -185,13 +190,15 @@ export function usePositionsInfoRequest(
priceImpactDiffUsd: netPriceImapctValues?.priceImpactDiffUsd ?? 0n,
});
- const pnlAfterFees =
- pnl -
- totalPendingFeesUsd -
- closingFeeUsd -
- uiFeeUsd -
- (netPriceImapctValues?.totalImpactDeltaUsd ?? 0n) +
- (netPriceImapctValues?.priceImpactDiffUsd ?? 0n);
+ const pnlAfterFees = getPositionPnlAfterFees({
+ pnl,
+ pendingBorrowingFeesUsd: position.pendingBorrowingFeesUsd,
+ pendingFundingFeesUsd: pendingFundingFeesUsd,
+ closingFeeUsd,
+ uiFeeUsd,
+ totalPendingImpactDeltaUsd: netPriceImapctValues?.totalImpactDeltaUsd ?? 0n,
+ priceImpactDiffUsd: netPriceImapctValues?.priceImpactDiffUsd ?? 0n,
+ });
const pnlAfterFeesPercentage =
collateralUsd != 0n ? getBasisPoints(pnlAfterFees, collateralUsd + closingFeeUsd) : 0n;
diff --git a/src/domain/synthetics/trade/usePriceImpactWarningState.ts b/src/domain/synthetics/trade/usePriceImpactWarningState.ts
index 15286f4d55..df621d8daf 100644
--- a/src/domain/synthetics/trade/usePriceImpactWarningState.ts
+++ b/src/domain/synthetics/trade/usePriceImpactWarningState.ts
@@ -32,8 +32,8 @@ export type WarningState = {
};
export function usePriceImpactWarningState({
- collateralImpact,
- positionImpact,
+ collateralNetPriceImpact,
+ positionNetPriceImpact,
swapPriceImpact,
swapProfitFee,
executionFeeUsd,
@@ -42,8 +42,8 @@ export function usePriceImpactWarningState({
tradeFlags,
payUsd,
}: {
- collateralImpact?: FeeItem;
- positionImpact?: FeeItem;
+ collateralNetPriceImpact?: FeeItem;
+ positionNetPriceImpact?: FeeItem;
swapPriceImpact?: FeeItem;
swapProfitFee?: FeeItem;
executionFeeUsd?: bigint;
@@ -77,10 +77,10 @@ export function usePriceImpactWarningState({
}
}, [prevFlags, tradeFlags]);
- const isHighPositionImpact = getIsHighPositionImpact(positionImpact);
+ const isHighPositionImpact = getIsHighPositionImpact(positionNetPriceImpact);
const prevIsHighPositionImpact = usePrevious(isHighPositionImpact);
- const isHighCollateralImpact = getIsHighCollateralImpact(collateralImpact);
+ const isHighCollateralImpact = getIsHighCollateralImpact(collateralNetPriceImpact);
const prevIsHighCollateralImpact = usePrevious(isHighCollateralImpact);
const isHighSwapImpact = getIsHighSwapImpact(swapPriceImpact);
diff --git a/src/domain/synthetics/trade/utils/common.ts b/src/domain/synthetics/trade/utils/common.ts
index 4aa5ab1a37..84afafa723 100644
--- a/src/domain/synthetics/trade/utils/common.ts
+++ b/src/domain/synthetics/trade/utils/common.ts
@@ -7,8 +7,7 @@ import {
} from "domain/synthetics/fees";
import { OrderInfo, isLimitOrderType, isMarketOrderType, isSwapOrderType } from "domain/synthetics/orders";
import { PRECISION, applyFactor, getBasisPoints } from "lib/numbers";
-import { ExternalSwapQuote } from "sdk/types/trade";
-import { SwapStats, TradeFees, TradeFlags, TradeMode, TradeType } from "sdk/types/trade";
+import { ExternalSwapQuote, SwapStats, TradeFees, TradeFlags, TradeMode, TradeType } from "sdk/types/trade";
import { bigMath } from "sdk/utils/bigmath";
import { OrderOption } from "../usePositionSellerState";
@@ -178,9 +177,11 @@ export function getTradeFees(p: {
const fundingFee = getFeeItem(fundingFeeUsd * -1n, initialCollateralUsd);
const positionPriceImpact = getFeeItem(positionPriceImpactDeltaUsd, sizeDeltaUsd);
const priceImpactDiff = getFeeItem(priceImpactDiffUsd, sizeDeltaUsd);
+ const positionNetPriceImpact = getTotalFeeItem([positionPriceImpact, priceImpactDiff]);
const positionCollateralPriceImpact = getFeeItem(positionPriceImpactDeltaUsd, bigMath.abs(collateralDeltaUsd));
const collateralPriceImpactDiff = getFeeItem(priceImpactDiffUsd, collateralDeltaUsd);
+ const collateralNetPriceImpact = getTotalFeeItem([positionCollateralPriceImpact, collateralPriceImpactDiff]);
const proportionalPendingImpact = getFeeItem(proportionalPendingImpactDeltaUsd, sizeDeltaUsd);
const closePriceImpact = getFeeItem(closePriceImpactDeltaUsd, sizeDeltaUsd);
@@ -191,6 +192,7 @@ export function getTradeFees(p: {
swapProfitFee,
swapPriceImpact,
type === "decrease" ? positionPriceImpact : undefined,
+ type === "decrease" ? priceImpactDiff : undefined,
positionFeeAfterDiscount,
borrowFee,
fundingFee,
@@ -211,6 +213,8 @@ export function getTradeFees(p: {
proportionalPendingImpact,
closePriceImpact,
collateralPriceImpactDiff,
+ positionNetPriceImpact,
+ collateralNetPriceImpact,
borrowFee,
fundingFee,
feeDiscountUsd,
diff --git a/src/domain/synthetics/trade/utils/warnings.ts b/src/domain/synthetics/trade/utils/warnings.ts
index 2bfcb15c1a..9081c342ba 100644
--- a/src/domain/synthetics/trade/utils/warnings.ts
+++ b/src/domain/synthetics/trade/utils/warnings.ts
@@ -4,21 +4,25 @@ import { bigMath } from "sdk/utils/bigmath";
import type { FeeItem } from "../../fees";
-export function getIsHighCollateralImpact(collateralImpact?: FeeItem) {
+export function getIsHighCollateralImpact(collateralNetPriceImpact?: FeeItem) {
return Boolean(
- collateralImpact && collateralImpact.deltaUsd < 0 && bigMath.abs(collateralImpact.bps) >= HIGH_COLLATERAL_IMPACT_BPS
+ collateralNetPriceImpact &&
+ collateralNetPriceImpact.deltaUsd < 0 &&
+ bigMath.abs(collateralNetPriceImpact.bps) > HIGH_COLLATERAL_IMPACT_BPS
);
}
export function getIsHighSwapImpact(swapPriceImpact?: FeeItem) {
return Boolean(
- swapPriceImpact && swapPriceImpact.deltaUsd < 0 && bigMath.abs(swapPriceImpact.bps) >= HIGH_SWAP_IMPACT_BPS
+ swapPriceImpact && swapPriceImpact.deltaUsd < 0 && bigMath.abs(swapPriceImpact.bps) > HIGH_SWAP_IMPACT_BPS
);
}
-export function getIsHighPositionImpact(positionImpact?: FeeItem) {
+export function getIsHighPositionImpact(positionNetPriceImpact?: FeeItem) {
return Boolean(
- positionImpact && positionImpact.deltaUsd < 0 && bigMath.abs(positionImpact.bps) > HIGH_POSITION_IMPACT_BPS
+ positionNetPriceImpact &&
+ positionNetPriceImpact.deltaUsd < 0 &&
+ bigMath.abs(positionNetPriceImpact.bps) > HIGH_POSITION_IMPACT_BPS
);
}
From 58ecfee68e01abf5423ab6a64bd71adc560585fe Mon Sep 17 00:00:00 2001
From: Divhead <110596516+divhead@users.noreply.github.com>
Date: Fri, 1 Aug 2025 06:44:09 -0700
Subject: [PATCH 18/55] fix pnl and fees
---
sdk/src/utils/__tests__/positions.spec.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sdk/src/utils/__tests__/positions.spec.ts b/sdk/src/utils/__tests__/positions.spec.ts
index 3827d14417..c4d5772733 100644
--- a/sdk/src/utils/__tests__/positions.spec.ts
+++ b/sdk/src/utils/__tests__/positions.spec.ts
@@ -120,7 +120,7 @@ describe("getPositionNetValue", () => {
priceImpactDiffUsd: 50n,
});
// netValue = 1000n - (10n+15n) -5n -20n + 200n -100n + 50n = 1100n
- expect(result).toBe(1100);
+ expect(result).toBe(1100n);
});
});
From cb36c05378197a077604b28de2acf8a4434ee80a Mon Sep 17 00:00:00 2001
From: Divhead <110596516+divhead@users.noreply.github.com>
Date: Tue, 5 Aug 2025 22:08:42 -0700
Subject: [PATCH 19/55] upd squid
---
src/config/subgraph.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/config/subgraph.ts b/src/config/subgraph.ts
index 5cacd9bb28..6ca01a95dc 100644
--- a/src/config/subgraph.ts
+++ b/src/config/subgraph.ts
@@ -26,7 +26,7 @@ const SUBGRAPH_URLS = {
},
[ARBITRUM_SEPOLIA]: {
- subsquid: "https://gmx-test.squids.live/multichain-arbitrum-sepolia@bf9a0f/api/graphql",
+ subsquid: "https://gmx-test.squids.live/v22-sepolia@1kvhuz/api/graphql",
},
common: {
From 4eb45567d5c0b77195d6c8ccd99f76251d7188be Mon Sep 17 00:00:00 2001
From: midas-myth
Date: Tue, 5 Aug 2025 17:48:25 +0200
Subject: [PATCH 20/55] Multichain prod contracts
---
sdk/src/abis/CustomErrors.json | 98 ++++++++++++++++
sdk/src/abis/DataStore.json | 2 +-
sdk/src/abis/Multicall.json | 174 ++++++++++++++++++++++-------
sdk/src/abis/SyntheticsReader.json | 60 ++++++++++
sdk/src/configs/chains.ts | 2 +-
sdk/src/configs/contracts.ts | 89 +++++++++------
src/config/multichain.ts | 5 +-
7 files changed, 353 insertions(+), 77 deletions(-)
diff --git a/sdk/src/abis/CustomErrors.json b/sdk/src/abis/CustomErrors.json
index a7caf505bc..df90ee42d3 100644
--- a/sdk/src/abis/CustomErrors.json
+++ b/sdk/src/abis/CustomErrors.json
@@ -275,6 +275,17 @@
"name": "DisabledMarket",
"type": "error"
},
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "existingDistributionId",
+ "type": "uint256"
+ }
+ ],
+ "name": "DuplicateClaimTerms",
+ "type": "error"
+ },
{
"inputs": [
{
@@ -334,6 +345,11 @@
"name": "EmptyAddressInMarketTokenBalanceValidation",
"type": "error"
},
+ {
+ "inputs": [],
+ "name": "EmptyAmount",
+ "type": "error"
+ },
{
"inputs": [
{
@@ -361,6 +377,17 @@
"name": "EmptyClaimFeesMarket",
"type": "error"
},
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "token",
+ "type": "address"
+ }
+ ],
+ "name": "EmptyClaimableAmount",
+ "type": "error"
+ },
{
"inputs": [
{
@@ -1226,6 +1253,17 @@
"name": "InsufficientFee",
"type": "error"
},
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "token",
+ "type": "address"
+ }
+ ],
+ "name": "InsufficientFunds",
+ "type": "error"
+ },
{
"inputs": [
{
@@ -1647,6 +1685,33 @@
"name": "InvalidClaimFundingFeesInput",
"type": "error"
},
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "recoveredSigner",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "expectedSigner",
+ "type": "address"
+ }
+ ],
+ "name": "InvalidClaimTermsSignature",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "expectedSigner",
+ "type": "address"
+ }
+ ],
+ "name": "InvalidClaimTermsSignatureForContract",
+ "type": "error"
+ },
{
"inputs": [
{
@@ -2464,6 +2529,17 @@
"name": "InvalidOutputToken",
"type": "error"
},
+ {
+ "inputs": [
+ {
+ "internalType": "string",
+ "name": "reason",
+ "type": "string"
+ }
+ ],
+ "name": "InvalidParams",
+ "type": "error"
+ },
{
"inputs": [
{
@@ -2716,6 +2792,17 @@
"name": "InvalidSrcChainId",
"type": "error"
},
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "desChainId",
+ "type": "uint256"
+ }
+ ],
+ "name": "InvalidSubaccountApprovalDesChainId",
+ "type": "error"
+ },
{
"inputs": [
{
@@ -2791,6 +2878,17 @@
"name": "InvalidTimelockDelay",
"type": "error"
},
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "token",
+ "type": "address"
+ }
+ ],
+ "name": "InvalidToken",
+ "type": "error"
+ },
{
"inputs": [
{
diff --git a/sdk/src/abis/DataStore.json b/sdk/src/abis/DataStore.json
index fc4918df6f..af4759dd50 100644
--- a/sdk/src/abis/DataStore.json
+++ b/sdk/src/abis/DataStore.json
@@ -1456,4 +1456,4 @@
"type": "function"
}
]
-}
\ No newline at end of file
+}
diff --git a/sdk/src/abis/Multicall.json b/sdk/src/abis/Multicall.json
index da2ad0a409..df41650472 100644
--- a/sdk/src/abis/Multicall.json
+++ b/sdk/src/abis/Multicall.json
@@ -1,7 +1,4 @@
{
- "_format": "hh-sol-artifact-1",
- "contractName": "Multicall2",
- "sourceName": "contracts/mock/Multicall2.sol",
"abi": [
{
"inputs": [
@@ -18,7 +15,7 @@
"type": "bytes"
}
],
- "internalType": "struct Multicall2.Call[]",
+ "internalType": "struct Multicall3.Call[]",
"name": "calls",
"type": "tuple[]"
}
@@ -36,7 +33,108 @@
"type": "bytes[]"
}
],
- "stateMutability": "nonpayable",
+ "stateMutability": "payable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "components": [
+ {
+ "internalType": "address",
+ "name": "target",
+ "type": "address"
+ },
+ {
+ "internalType": "bool",
+ "name": "allowFailure",
+ "type": "bool"
+ },
+ {
+ "internalType": "bytes",
+ "name": "callData",
+ "type": "bytes"
+ }
+ ],
+ "internalType": "struct Multicall3.Call3[]",
+ "name": "calls",
+ "type": "tuple[]"
+ }
+ ],
+ "name": "aggregate3",
+ "outputs": [
+ {
+ "components": [
+ {
+ "internalType": "bool",
+ "name": "success",
+ "type": "bool"
+ },
+ {
+ "internalType": "bytes",
+ "name": "returnData",
+ "type": "bytes"
+ }
+ ],
+ "internalType": "struct Multicall3.Result[]",
+ "name": "returnData",
+ "type": "tuple[]"
+ }
+ ],
+ "stateMutability": "payable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "components": [
+ {
+ "internalType": "address",
+ "name": "target",
+ "type": "address"
+ },
+ {
+ "internalType": "bool",
+ "name": "allowFailure",
+ "type": "bool"
+ },
+ {
+ "internalType": "uint256",
+ "name": "value",
+ "type": "uint256"
+ },
+ {
+ "internalType": "bytes",
+ "name": "callData",
+ "type": "bytes"
+ }
+ ],
+ "internalType": "struct Multicall3.Call3Value[]",
+ "name": "calls",
+ "type": "tuple[]"
+ }
+ ],
+ "name": "aggregate3Value",
+ "outputs": [
+ {
+ "components": [
+ {
+ "internalType": "bool",
+ "name": "success",
+ "type": "bool"
+ },
+ {
+ "internalType": "bytes",
+ "name": "returnData",
+ "type": "bytes"
+ }
+ ],
+ "internalType": "struct Multicall3.Result[]",
+ "name": "returnData",
+ "type": "tuple[]"
+ }
+ ],
+ "stateMutability": "payable",
"type": "function"
},
{
@@ -54,7 +152,7 @@
"type": "bytes"
}
],
- "internalType": "struct Multicall2.Call[]",
+ "internalType": "struct Multicall3.Call[]",
"name": "calls",
"type": "tuple[]"
}
@@ -84,12 +182,25 @@
"type": "bytes"
}
],
- "internalType": "struct Multicall2.Result[]",
+ "internalType": "struct Multicall3.Result[]",
"name": "returnData",
"type": "tuple[]"
}
],
- "stateMutability": "nonpayable",
+ "stateMutability": "payable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "getBasefee",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "basefee",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
"type": "function"
},
{
@@ -126,12 +237,12 @@
},
{
"inputs": [],
- "name": "getCurrentBlockCoinbase",
+ "name": "getChainId",
"outputs": [
{
- "internalType": "address",
- "name": "coinbase",
- "type": "address"
+ "internalType": "uint256",
+ "name": "chainid",
+ "type": "uint256"
}
],
"stateMutability": "view",
@@ -139,12 +250,12 @@
},
{
"inputs": [],
- "name": "getCurrentBlockDifficulty",
+ "name": "getCurrentBlockCoinbase",
"outputs": [
{
- "internalType": "uint256",
- "name": "difficulty",
- "type": "uint256"
+ "internalType": "address",
+ "name": "coinbase",
+ "type": "address"
}
],
"stateMutability": "view",
@@ -195,19 +306,6 @@
"stateMutability": "view",
"type": "function"
},
- {
- "inputs": [],
- "name": "getL1BlockNumber",
- "outputs": [
- {
- "internalType": "uint256",
- "name": "l1BlockNumber",
- "type": "uint256"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
{
"inputs": [],
"name": "getLastBlockHash",
@@ -241,7 +339,7 @@
"type": "bytes"
}
],
- "internalType": "struct Multicall2.Call[]",
+ "internalType": "struct Multicall3.Call[]",
"name": "calls",
"type": "tuple[]"
}
@@ -261,12 +359,12 @@
"type": "bytes"
}
],
- "internalType": "struct Multicall2.Result[]",
+ "internalType": "struct Multicall3.Result[]",
"name": "returnData",
"type": "tuple[]"
}
],
- "stateMutability": "nonpayable",
+ "stateMutability": "payable",
"type": "function"
},
{
@@ -289,7 +387,7 @@
"type": "bytes"
}
],
- "internalType": "struct Multicall2.Call[]",
+ "internalType": "struct Multicall3.Call[]",
"name": "calls",
"type": "tuple[]"
}
@@ -319,15 +417,13 @@
"type": "bytes"
}
],
- "internalType": "struct Multicall2.Result[]",
+ "internalType": "struct Multicall3.Result[]",
"name": "returnData",
"type": "tuple[]"
}
],
- "stateMutability": "nonpayable",
+ "stateMutability": "payable",
"type": "function"
}
- ],
- "linkReferences": {},
- "deployedLinkReferences": {}
-}
+ ]
+}
\ No newline at end of file
diff --git a/sdk/src/abis/SyntheticsReader.json b/sdk/src/abis/SyntheticsReader.json
index b88272203d..5e059b7214 100644
--- a/sdk/src/abis/SyntheticsReader.json
+++ b/sdk/src/abis/SyntheticsReader.json
@@ -679,6 +679,21 @@
"internalType": "bool",
"name": "balanceWasImproved",
"type": "bool"
+ },
+ {
+ "internalType": "int256",
+ "name": "proportionalPendingImpactUsd",
+ "type": "int256"
+ },
+ {
+ "internalType": "int256",
+ "name": "totalImpactUsd",
+ "type": "int256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "priceImpactDiffUsd",
+ "type": "uint256"
}
],
"internalType": "struct ReaderPricingUtils.ExecutionPriceResult",
@@ -1313,6 +1328,21 @@
"internalType": "bool",
"name": "balanceWasImproved",
"type": "bool"
+ },
+ {
+ "internalType": "int256",
+ "name": "proportionalPendingImpactUsd",
+ "type": "int256"
+ },
+ {
+ "internalType": "int256",
+ "name": "totalImpactUsd",
+ "type": "int256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "priceImpactDiffUsd",
+ "type": "uint256"
}
],
"internalType": "struct ReaderPricingUtils.ExecutionPriceResult",
@@ -3431,6 +3461,21 @@
"internalType": "bool",
"name": "balanceWasImproved",
"type": "bool"
+ },
+ {
+ "internalType": "int256",
+ "name": "proportionalPendingImpactUsd",
+ "type": "int256"
+ },
+ {
+ "internalType": "int256",
+ "name": "totalImpactUsd",
+ "type": "int256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "priceImpactDiffUsd",
+ "type": "uint256"
}
],
"internalType": "struct ReaderPricingUtils.ExecutionPriceResult",
@@ -3931,6 +3976,21 @@
"internalType": "bool",
"name": "balanceWasImproved",
"type": "bool"
+ },
+ {
+ "internalType": "int256",
+ "name": "proportionalPendingImpactUsd",
+ "type": "int256"
+ },
+ {
+ "internalType": "int256",
+ "name": "totalImpactUsd",
+ "type": "int256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "priceImpactDiffUsd",
+ "type": "uint256"
}
],
"internalType": "struct ReaderPricingUtils.ExecutionPriceResult",
diff --git a/sdk/src/configs/chains.ts b/sdk/src/configs/chains.ts
index adee1e77ff..b4bb8ad050 100644
--- a/sdk/src/configs/chains.ts
+++ b/sdk/src/configs/chains.ts
@@ -10,7 +10,7 @@ import {
sepolia,
} from "viem/chains";
-import { GasLimitsConfig } from "types/fees";
+import type { GasLimitsConfig } from "types/fees";
export const AVALANCHE = 43114;
export const AVALANCHE_FUJI = 43113;
diff --git a/sdk/src/configs/contracts.ts b/sdk/src/configs/contracts.ts
index b17468b3d5..69e4f8d33a 100644
--- a/sdk/src/configs/contracts.ts
+++ b/sdk/src/configs/contracts.ts
@@ -4,7 +4,6 @@ import { ARBITRUM, ARBITRUM_SEPOLIA, AVALANCHE, AVALANCHE_FUJI, BOTANIX, Contrac
export const CONTRACTS = {
[ARBITRUM]: {
- // arbitrum mainnet
Vault: "0x489ee077994B6658eAfA855C308275EAd8097C4A",
Router: "0xaBBc5F99639c9B6bCb58544ddf04EFA6802F4064",
VaultReader: "0xfebB9f4CAC4cD523598fE1C5771181440143F24A",
@@ -50,33 +49,40 @@ export const CONTRACTS = {
// Synthetics
DataStore: "0xFD70de6b91282D8017aA4E741e9Ae325CAb992d8",
EventEmitter: "0xC8ee91A54287DB53897056e12D9819156D3822Fb",
- SubaccountRouter: "0xa329221a77BE08485f59310b873b14815c82E10D",
- ExchangeRouter: "0x602b805EedddBbD9ddff44A7dcBD46cb07849685",
+ SubaccountRouter: "0xfB0dd3878440817e1F12cDF023a88E74D4ae82e2",
+ ExchangeRouter: "0x96F257288f00a9aD8ba159294D373550fE2b6771",
DepositVault: "0xF89e77e8Dc11691C9e8757e84aaFbCD8A67d7A55",
WithdrawalVault: "0x0628D46b5D145f183AdB6Ef1f2c97eD1C4701C55",
OrderVault: "0x31eF83a530Fde1B38EE9A18093A333D8Bbbc40D5",
ShiftVault: "0xfe99609C4AA83ff6816b64563Bdffd7fa68753Ab",
- SyntheticsReader: "0xcF2845Ab3866842A6b51Fb6a551b92dF58333574",
+ SyntheticsReader: "0xd42986AFC0660dd1f1C8C76F248262Ffcb37db79",
SyntheticsRouter: "0x7452c558d45f8afC8c83dAe62C3f8A5BE19c71f6",
- GlvReader: "0x6a9505D0B44cFA863d9281EA5B0b34cB36243b45",
- GlvRouter: "0x994c598e3b0661bb805d53c6fa6b4504b23b68dd",
+ GlvReader: "0xF90192b6D68cAF5947114212755C67c64518CCE9",
+ GlvRouter: "0x36194Db64C1881E44E34e14dc3bb8AfA83B65608",
GlvVault: "0x393053B58f9678C9c28c2cE941fF6cac49C3F8f9",
- GelatoRelayRouter: "0x9EB239eDf4c6f4c4fC9d30ea2017F8716d049C8D",
- SubaccountGelatoRelayRouter: "0x5F345B765d5856bC0843cEE8bE234b575eC77DBC",
+ GelatoRelayRouter: "0xC0d483eD76ceCd52eB44Eb78d813Cf5Ace5138fD",
+ SubaccountGelatoRelayRouter: "0xeb1f997F95D970701B72F4f66DdD8E360c34C762",
+
+ MultichainClaimsRouter: "0xDa3e6AB64699f159C82acF9bA7216eD57806DFc6",
+ MultichainGlvRouter: "0x49a10eb59193ff2dC2C95C13979D0C045ccbCE42",
+ MultichainGmRouter: "0x6DFEa567810CfbF8B787a504D66C767a8A770eB7",
+ MultichainOrderRouter: "0xba4C3574553BB99bC7D0116CD49DCc757870b68E",
+ MultichainSubaccountRouter: "0xDF4fB0eb95f70C3E3EeAdBe5d1074F009d3F0193",
+ MultichainTransferRouter: "0x379b75be4cA9a25C72753f56ad9EA3850e206D35",
+ MultichainVault: "0xCeaadFAf6A8C489B250e407987877c5fDfcDBE6E",
ExternalHandler: "0x389CEf541397e872dC04421f166B5Bc2E0b374a5",
OpenOceanRouter: "0x6352a56caadC4F1E25CD6c75970Fa768A3304e64",
- ChainlinkPriceFeedProvider: "0x527FB0bCfF63C47761039bB386cFE181A92a4701",
+ ChainlinkPriceFeedProvider: "0x0913CA02B93A2AA381a420AEac38490ee6284A32",
- Multicall: "0x842ec2c7d803033edf55e478f461fc547bc54eb2",
+ Multicall: "0xe79118d6D92a4b23369ba356C90b9A7ABf1CB961",
ArbitrumNodeInterface: "0x00000000000000000000000000000000000000C8",
ClaimHandler: "0xCF2b097517EEBD6c36756A82844D2ec21Ee4C025",
},
[AVALANCHE]: {
- // avalanche
Vault: "0x9ab2De34A33fB459b538c43f251eB825645e8595",
Router: "0x5F719c2F1095F7B9fc68a68e35B51194f4b6abe8",
VaultReader: "0x66eC8fc33A26feAEAe156afA3Cb46923651F6f0D",
@@ -123,55 +129,63 @@ export const CONTRACTS = {
// Synthetics
DataStore: "0x2F0b22339414ADeD7D5F06f9D604c7fF5b2fe3f6",
EventEmitter: "0xDb17B211c34240B014ab6d61d4A31FA0C0e20c26",
- SubaccountRouter: "0x5aEb6AD978f59e220aA9099e09574e1c5E03AafD",
- ExchangeRouter: "0xFa843af557824Be5127eaCB3c4B5D86EADEB73A1",
+ SubaccountRouter: "0x5690C9955b0565eB0287F809eC3666D1aafc5faa",
+ ExchangeRouter: "0xCF2b097517EEBD6c36756A82844D2ec21Ee4C025",
DepositVault: "0x90c670825d0C62ede1c5ee9571d6d9a17A722DFF",
WithdrawalVault: "0xf5F30B10141E1F63FC11eD772931A8294a591996",
OrderVault: "0xD3D60D22d415aD43b7e64b510D86A30f19B1B12C",
ShiftVault: "0x7fC46CCb386e9bbBFB49A2639002734C3Ec52b39",
- SyntheticsReader: "0xc304F8e9872A9c00371A7406662dC10A10740AA8",
+ SyntheticsReader: "0x07F8Aba575B987a7165bDAcA727C74C1ccDEC258",
SyntheticsRouter: "0x820F5FfC5b525cD4d88Cd91aCf2c28F16530Cc68",
- GlvReader: "0xae9596a1C438675AcC75f69d32E21Ac9c8fF99bD",
- GlvRouter: "0x16500c1d8ffe2f695d8dcadf753f664993287ae4",
+ GlvReader: "0xCbC0F52d5bE4025574C60804fF3f031A01320F66",
+ GlvRouter: "0x7Eb4F2f7D4e7C919A698eC5e1C0De0c390126362",
GlvVault: "0x527FB0bCfF63C47761039bB386cFE181A92a4701",
- GelatoRelayRouter: "0x035A9A047d20a486e14A613B04d5a95d7A617c5D",
- SubaccountGelatoRelayRouter: "0x3B753c0D0aE55530f24532B8Bb9d0bAcD5B675C0",
+ GelatoRelayRouter: "0xc8b95239aE78ca9F39A3a7a2A19F0c2d537E2057",
+ SubaccountGelatoRelayRouter: "0x5306D63f114240C0825B3268635CaB1Df23fa6c3",
ExternalHandler: "0xD149573a098223a9185433290a5A5CDbFa54a8A9",
OpenOceanRouter: "0x6352a56caadC4F1E25CD6c75970Fa768A3304e64",
- ChainlinkPriceFeedProvider: "0x713c6a2479f6C079055A6AD3690D95dEDCEf9e1e",
+ ChainlinkPriceFeedProvider: "0x71AF5F44A295FEe7e7E902994eDc5B88E298BAA3",
- Multicall: "0xcA11bde05977b3631167028862bE2a173976CA11",
+ Multicall: "0x50474CAe810B316c294111807F94F9f48527e7F8",
ArbitrumNodeInterface: zeroAddress,
ClaimHandler: "0xF73CE08A22c67f19d75892457817e917cB3f9493",
},
[BOTANIX]: {
DataStore: "0xA23B81a89Ab9D7D89fF8fc1b5d8508fB75Cc094d",
EventEmitter: "0xAf2E131d483cedE068e21a9228aD91E623a989C2",
- SubaccountRouter: "0x31568A44593297788Cae4D0A70b0746c26886208",
- ExchangeRouter: "0xB11214E34796d6Df5F17172D82B5F3221E17253d",
+ SubaccountRouter: "0x07D7C9e1df9E92Dfee48947739d26e8E7a1AAB2c",
+ ExchangeRouter: "0x4F56B6e01b04595ab746a5AB60994d60f6721a43",
DepositVault: "0x4D12C3D3e750e051e87a2F3f7750fBd94767742c",
WithdrawalVault: "0x46BAeAEdbF90Ce46310173A04942e2B3B781Bf0e",
OrderVault: "0xe52B3700D17B45dE9de7205DEe4685B4B9EC612D",
ShiftVault: "0xa7EE2737249e0099906cB079BCEe85f0bbd837d4",
- SyntheticsReader: "0xcA3D8Ea2aCfd46D7D3732F4264bD62996A04Bb3F",
+ SyntheticsReader: "0x7d92ef68096318fbDA4a0ea79aF12B4ba17bE208",
SyntheticsRouter: "0x3d472afcd66F954Fe4909EEcDd5c940e9a99290c",
- GlvReader: "0x5AE7478d10C7298E06f38E90cf544dAE28fFE88B",
- GlvRouter: "0x8C142F1826a6679Abcc9bAa54ddbf11CC080C106",
+ GlvReader: "0x3D62872874971E04BF843E09EfDb6bB939F3BE4f",
+ GlvRouter: "0xfca7F9Dba7a062211b7472110c222B0D00c6E473",
GlvVault: "0xd336087512BeF8Df32AF605b492f452Fd6436CD8",
- GelatoRelayRouter: "0xfF95979396B138E7e014E91932A12D78d569f3B8",
- SubaccountGelatoRelayRouter: "0x0817645a12215EAb65379AEe23fD9f9b69BAa063",
+ GelatoRelayRouter: "0xbDD29dE1ebc45A6d145D2A17370C2A2D13342306",
+ SubaccountGelatoRelayRouter: "0x8302b92DD4Ed2A9C06C4CE1a93c0C3879C209189",
+
+ MultichainClaimsRouter: "0x99FeA262baC7bfE6DD7abE46731240b62c23dDcc",
+ MultichainGlvRouter: "0x00F6D4c797f56137649c833c952c5096960592Fe",
+ MultichainGmRouter: "0x65a481d0003624fAba1167923271F6DD6a7fc022",
+ MultichainOrderRouter: "0x5589294AB319817a02b908F9fdaC883bD8Bd464F",
+ MultichainSubaccountRouter: "0x96d565D73D3967Cbf55Ee3d2D66148dBa421F084",
+ MultichainTransferRouter: "0x15e6329F6bD25387F575916b0912D308338672D7",
+ MultichainVault: "0x9a535f9343434D96c4a39fF1d90cC685A4F6Fb20",
ExternalHandler: "0x36b906eA6AE7c74aeEE8cDE66D01B3f1f8843872",
OpenOceanRouter: zeroAddress,
- ChainlinkPriceFeedProvider: "0x8c0dF501394C0fee105f92F5CA59D7B876393B99",
+ ChainlinkPriceFeedProvider: "0x00994a923B27324EA33F1B91f57580f81714104F",
Multicall: "0x4BaA24f93a657f0c1b4A0Ffc72B91011E35cA46b",
@@ -259,7 +273,7 @@ export const CONTRACTS = {
PositionManager: zeroAddress,
TraderJoeGmxAvaxPool: zeroAddress,
- ReferralStorage: "0x58726dB901C9DF3654F45a37DD307a0C44b6420e",
+ ReferralStorage: "0x192e82A18a4ab446dD9968f055431b60640B155D",
ReferralReader: zeroAddress,
// Synthetics
@@ -279,16 +293,23 @@ export const CONTRACTS = {
GlvRouter: "0x2579A3aabF98aF7837AeA56150db7AcCd2D4D510",
GlvVault: "0x76f93b5240DF811a3fc32bEDd58daA5784e46C96",
- GelatoRelayRouter: zeroAddress,
- SubaccountGelatoRelayRouter: zeroAddress,
+ GelatoRelayRouter: "0x72031964Ea99B4Cc7B0Cd950dD47B38858245bA7",
+ SubaccountGelatoRelayRouter: "0xd09438351fa099E9399e87A7dE5d872b7C393D47",
- OpenOceanRouter: zeroAddress,
+ MultichainClaimsRouter: "0x09A83128662BecD90Ef05aE35b263d64bb607772",
+ MultichainGlvRouter: "0x6eEc92Dd5a053DB1b69f68973bD5af2cDd061396",
+ MultichainGmRouter: "0xBE5525CB5579DC17d939A6cC534d8ed82F850941",
+ MultichainOrderRouter: "0x2F5BDE1Ac9d2A214cDD8Fccd00eC91C3366cA86B",
+ MultichainSubaccountRouter: "0x04eB8e0908cB35dFcB27B5179E4ACadde77ab964",
+ MultichainTransferRouter: "0x0dFbd93FFEea4504d560de301f116B53b7CD89f7",
+ MultichainVault: "0xFd86A5d9D6dF6f0cB6B0e6A18Bea7CB07Ada4F79",
+ OpenOceanRouter: zeroAddress,
ExternalHandler: "0x0d9F90c66C392c4d0e70EE0d399c43729B942512",
- ChainlinkPriceFeedProvider: zeroAddress,
+ ChainlinkPriceFeedProvider: "0x2e149AbC99cDC98FB0207d6F184DC323CEBB955B",
- Multicall: "0x0f53e512b49202a37c81c6085417C9a9005F2196",
+ Multicall: "0x966D1F5c54a714C6443205F0Ec49eEF81F10fdfD",
ArbitrumNodeInterface: zeroAddress,
},
diff --git a/src/config/multichain.ts b/src/config/multichain.ts
index 2467d4979b..8191266865 100644
--- a/src/config/multichain.ts
+++ b/src/config/multichain.ts
@@ -194,10 +194,10 @@ export const SETTLEMENT_CHAINS: SettlementChainId[] = ensureExhaustive({
[SOURCE_OPTIMISM_SEPOLIA]: true,
[SOURCE_SEPOLIA]: true,
+ [SOURCE_BASE_MAINNET]: true,
});
if (IS_SOURCE_BASE_ALLOWED) {
@@ -205,7 +205,7 @@ if (IS_SOURCE_BASE_ALLOWED) {
}
if (isDevelopment() && DEBUG_MULTICHAIN_SAME_CHAIN_DEPOSIT) {
- SOURCE_CHAINS.push(ARBITRUM_SEPOLIA as SourceChainId);
+ SOURCE_CHAINS.push(ARBITRUM_SEPOLIA as SourceChainId, ARBITRUM as SourceChainId);
}
export function isContractsChain(chainId: number): chainId is ContractsChainId {
@@ -357,6 +357,7 @@ export const MULTICALLS_MAP: Record = {
if (isDevelopment() && DEBUG_MULTICHAIN_SAME_CHAIN_DEPOSIT) {
MULTICALLS_MAP[ARBITRUM_SEPOLIA as SourceChainId] = "0xca11bde05977b3631167028862be2a173976ca11";
+ MULTICALLS_MAP[ARBITRUM as SourceChainId] = "0xca11bde05977b3631167028862be2a173976ca11";
}
/**
From a0ab4e45d0dcdf6258101425d0695ee43bde2d18 Mon Sep 17 00:00:00 2001
From: midas-myth
Date: Tue, 5 Aug 2025 17:56:09 +0200
Subject: [PATCH 21/55] Multichain fixes
---
sdk/src/modules/orders/utils.ts | 41 ++++-
src/typechain-types/Multicall.ts | 132 +++++++++-----
src/typechain-types/SyntheticsReader.ts | 9 +
.../factories/CustomErrors__factory.ts | 98 +++++++++++
.../factories/Multicall__factory.ts | 165 ++++++++++++++----
.../factories/SyntheticsReader__factory.ts | 60 +++++++
6 files changed, 424 insertions(+), 81 deletions(-)
diff --git a/sdk/src/modules/orders/utils.ts b/sdk/src/modules/orders/utils.ts
index 4f1d4d52a5..d8939d295d 100644
--- a/sdk/src/modules/orders/utils.ts
+++ b/sdk/src/modules/orders/utils.ts
@@ -187,13 +187,42 @@ export function buildGetOrdersMulticall(chainId: ContractsChainId, account: stri
export function parseGetOrdersResponse(res: MulticallResult>) {
const count = Number(res.data.dataStore.count.returnValues[0]);
const orderKeys = res.data.dataStore.keys.returnValues;
- const orders = res.data.reader.orders.returnValues as any[];
+ const orders = res.data.reader.orders.returnValues as {
+ orderKey: string;
+ order: {
+ addresses: {
+ account: string;
+ receiver: string;
+ cancellationReceiver: string;
+ callbackContract: string;
+ uiFeeReceiver: string;
+ market: string;
+ initialCollateralToken: string;
+ swapPath: string[];
+ };
+ numbers: {
+ orderType: bigint;
+ decreasePositionSwapType: bigint;
+ sizeDeltaUsd: bigint;
+ initialCollateralDeltaAmount: bigint;
+ triggerPrice: bigint;
+ acceptablePrice: bigint;
+ executionFee: bigint;
+ callbackGasLimit: bigint;
+ minOutputAmount: bigint;
+ updatedAtTime: bigint;
+ validFromTime: bigint;
+ srcChainId: bigint;
+ };
+ flags: { isLong: boolean; shouldUnwrapNativeToken: boolean; isFrozen: boolean; autoCancel: boolean };
+ _dataList: string[];
+ };
+ }[];
return {
count,
- orders: orders.map((order, i) => {
+ orders: orders.map(({ order }, i) => {
const key = orderKeys[i];
- const { data } = order;
const orderData: Order = {
key,
@@ -214,12 +243,12 @@ export function parseGetOrdersResponse(res: MulticallResult(event?: TCEvent): Promise;
aggregate: TypedContractMethod<
- [calls: Multicall2.CallStruct[]],
+ [calls: Multicall3.CallStruct[]],
[[bigint, string[]] & { blockNumber: bigint; returnData: string[] }],
- "nonpayable"
+ "payable"
+ >;
+
+ aggregate3: TypedContractMethod<[calls: Multicall3.Call3Struct[]], [Multicall3.ResultStructOutput[]], "payable">;
+
+ aggregate3Value: TypedContractMethod<
+ [calls: Multicall3.Call3ValueStruct[]],
+ [Multicall3.ResultStructOutput[]],
+ "payable"
>;
blockAndAggregate: TypedContractMethod<
- [calls: Multicall2.CallStruct[]],
+ [calls: Multicall3.CallStruct[]],
[
- [bigint, string, Multicall2.ResultStructOutput[]] & {
+ [bigint, string, Multicall3.ResultStructOutput[]] & {
blockNumber: bigint;
blockHash: string;
- returnData: Multicall2.ResultStructOutput[];
+ returnData: Multicall3.ResultStructOutput[];
},
],
- "nonpayable"
+ "payable"
>;
+ getBasefee: TypedContractMethod<[], [bigint], "view">;
+
getBlockHash: TypedContractMethod<[blockNumber: BigNumberish], [string], "view">;
getBlockNumber: TypedContractMethod<[], [bigint], "view">;
- getCurrentBlockCoinbase: TypedContractMethod<[], [string], "view">;
+ getChainId: TypedContractMethod<[], [bigint], "view">;
- getCurrentBlockDifficulty: TypedContractMethod<[], [bigint], "view">;
+ getCurrentBlockCoinbase: TypedContractMethod<[], [string], "view">;
getCurrentBlockGasLimit: TypedContractMethod<[], [bigint], "view">;
@@ -149,26 +191,24 @@ export interface Multicall extends BaseContract {
getEthBalance: TypedContractMethod<[addr: AddressLike], [bigint], "view">;
- getL1BlockNumber: TypedContractMethod<[], [bigint], "view">;
-
getLastBlockHash: TypedContractMethod<[], [string], "view">;
tryAggregate: TypedContractMethod<
- [requireSuccess: boolean, calls: Multicall2.CallStruct[]],
- [Multicall2.ResultStructOutput[]],
- "nonpayable"
+ [requireSuccess: boolean, calls: Multicall3.CallStruct[]],
+ [Multicall3.ResultStructOutput[]],
+ "payable"
>;
tryBlockAndAggregate: TypedContractMethod<
- [requireSuccess: boolean, calls: Multicall2.CallStruct[]],
+ [requireSuccess: boolean, calls: Multicall3.CallStruct[]],
[
- [bigint, string, Multicall2.ResultStructOutput[]] & {
+ [bigint, string, Multicall3.ResultStructOutput[]] & {
blockNumber: bigint;
blockHash: string;
- returnData: Multicall2.ResultStructOutput[];
+ returnData: Multicall3.ResultStructOutput[];
},
],
- "nonpayable"
+ "payable"
>;
getFunction(key: string | FunctionFragment): T;
@@ -176,47 +216,53 @@ export interface Multicall extends BaseContract {
getFunction(
nameOrSignature: "aggregate"
): TypedContractMethod<
- [calls: Multicall2.CallStruct[]],
+ [calls: Multicall3.CallStruct[]],
[[bigint, string[]] & { blockNumber: bigint; returnData: string[] }],
- "nonpayable"
+ "payable"
>;
+ getFunction(
+ nameOrSignature: "aggregate3"
+ ): TypedContractMethod<[calls: Multicall3.Call3Struct[]], [Multicall3.ResultStructOutput[]], "payable">;
+ getFunction(
+ nameOrSignature: "aggregate3Value"
+ ): TypedContractMethod<[calls: Multicall3.Call3ValueStruct[]], [Multicall3.ResultStructOutput[]], "payable">;
getFunction(nameOrSignature: "blockAndAggregate"): TypedContractMethod<
- [calls: Multicall2.CallStruct[]],
+ [calls: Multicall3.CallStruct[]],
[
- [bigint, string, Multicall2.ResultStructOutput[]] & {
+ [bigint, string, Multicall3.ResultStructOutput[]] & {
blockNumber: bigint;
blockHash: string;
- returnData: Multicall2.ResultStructOutput[];
+ returnData: Multicall3.ResultStructOutput[];
},
],
- "nonpayable"
+ "payable"
>;
+ getFunction(nameOrSignature: "getBasefee"): TypedContractMethod<[], [bigint], "view">;
getFunction(nameOrSignature: "getBlockHash"): TypedContractMethod<[blockNumber: BigNumberish], [string], "view">;
getFunction(nameOrSignature: "getBlockNumber"): TypedContractMethod<[], [bigint], "view">;
+ getFunction(nameOrSignature: "getChainId"): TypedContractMethod<[], [bigint], "view">;
getFunction(nameOrSignature: "getCurrentBlockCoinbase"): TypedContractMethod<[], [string], "view">;
- getFunction(nameOrSignature: "getCurrentBlockDifficulty"): TypedContractMethod<[], [bigint], "view">;
getFunction(nameOrSignature: "getCurrentBlockGasLimit"): TypedContractMethod<[], [bigint], "view">;
getFunction(nameOrSignature: "getCurrentBlockTimestamp"): TypedContractMethod<[], [bigint], "view">;
getFunction(nameOrSignature: "getEthBalance"): TypedContractMethod<[addr: AddressLike], [bigint], "view">;
- getFunction(nameOrSignature: "getL1BlockNumber"): TypedContractMethod<[], [bigint], "view">;
getFunction(nameOrSignature: "getLastBlockHash"): TypedContractMethod<[], [string], "view">;
getFunction(
nameOrSignature: "tryAggregate"
): TypedContractMethod<
- [requireSuccess: boolean, calls: Multicall2.CallStruct[]],
- [Multicall2.ResultStructOutput[]],
- "nonpayable"
+ [requireSuccess: boolean, calls: Multicall3.CallStruct[]],
+ [Multicall3.ResultStructOutput[]],
+ "payable"
>;
getFunction(nameOrSignature: "tryBlockAndAggregate"): TypedContractMethod<
- [requireSuccess: boolean, calls: Multicall2.CallStruct[]],
+ [requireSuccess: boolean, calls: Multicall3.CallStruct[]],
[
- [bigint, string, Multicall2.ResultStructOutput[]] & {
+ [bigint, string, Multicall3.ResultStructOutput[]] & {
blockNumber: bigint;
blockHash: string;
- returnData: Multicall2.ResultStructOutput[];
+ returnData: Multicall3.ResultStructOutput[];
},
],
- "nonpayable"
+ "payable"
>;
filters: {};
diff --git a/src/typechain-types/SyntheticsReader.ts b/src/typechain-types/SyntheticsReader.ts
index 6c17d19007..27b3c52860 100644
--- a/src/typechain-types/SyntheticsReader.ts
+++ b/src/typechain-types/SyntheticsReader.ts
@@ -540,16 +540,25 @@ export declare namespace ReaderPricingUtils {
priceImpactUsd: BigNumberish;
executionPrice: BigNumberish;
balanceWasImproved: boolean;
+ proportionalPendingImpactUsd: BigNumberish;
+ totalImpactUsd: BigNumberish;
+ priceImpactDiffUsd: BigNumberish;
};
export type ExecutionPriceResultStructOutput = [
priceImpactUsd: bigint,
executionPrice: bigint,
balanceWasImproved: boolean,
+ proportionalPendingImpactUsd: bigint,
+ totalImpactUsd: bigint,
+ priceImpactDiffUsd: bigint,
] & {
priceImpactUsd: bigint;
executionPrice: bigint;
balanceWasImproved: boolean;
+ proportionalPendingImpactUsd: bigint;
+ totalImpactUsd: bigint;
+ priceImpactDiffUsd: bigint;
};
}
diff --git a/src/typechain-types/factories/CustomErrors__factory.ts b/src/typechain-types/factories/CustomErrors__factory.ts
index 63af74790a..844ef33765 100644
--- a/src/typechain-types/factories/CustomErrors__factory.ts
+++ b/src/typechain-types/factories/CustomErrors__factory.ts
@@ -281,6 +281,17 @@ const _abi = [
name: "DisabledMarket",
type: "error",
},
+ {
+ inputs: [
+ {
+ internalType: "uint256",
+ name: "existingDistributionId",
+ type: "uint256",
+ },
+ ],
+ name: "DuplicateClaimTerms",
+ type: "error",
+ },
{
inputs: [
{
@@ -340,6 +351,11 @@ const _abi = [
name: "EmptyAddressInMarketTokenBalanceValidation",
type: "error",
},
+ {
+ inputs: [],
+ name: "EmptyAmount",
+ type: "error",
+ },
{
inputs: [
{
@@ -367,6 +383,17 @@ const _abi = [
name: "EmptyClaimFeesMarket",
type: "error",
},
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "token",
+ type: "address",
+ },
+ ],
+ name: "EmptyClaimableAmount",
+ type: "error",
+ },
{
inputs: [
{
@@ -1232,6 +1259,17 @@ const _abi = [
name: "InsufficientFee",
type: "error",
},
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "token",
+ type: "address",
+ },
+ ],
+ name: "InsufficientFunds",
+ type: "error",
+ },
{
inputs: [
{
@@ -1653,6 +1691,33 @@ const _abi = [
name: "InvalidClaimFundingFeesInput",
type: "error",
},
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "recoveredSigner",
+ type: "address",
+ },
+ {
+ internalType: "address",
+ name: "expectedSigner",
+ type: "address",
+ },
+ ],
+ name: "InvalidClaimTermsSignature",
+ type: "error",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "expectedSigner",
+ type: "address",
+ },
+ ],
+ name: "InvalidClaimTermsSignatureForContract",
+ type: "error",
+ },
{
inputs: [
{
@@ -2470,6 +2535,17 @@ const _abi = [
name: "InvalidOutputToken",
type: "error",
},
+ {
+ inputs: [
+ {
+ internalType: "string",
+ name: "reason",
+ type: "string",
+ },
+ ],
+ name: "InvalidParams",
+ type: "error",
+ },
{
inputs: [
{
@@ -2722,6 +2798,17 @@ const _abi = [
name: "InvalidSrcChainId",
type: "error",
},
+ {
+ inputs: [
+ {
+ internalType: "uint256",
+ name: "desChainId",
+ type: "uint256",
+ },
+ ],
+ name: "InvalidSubaccountApprovalDesChainId",
+ type: "error",
+ },
{
inputs: [
{
@@ -2797,6 +2884,17 @@ const _abi = [
name: "InvalidTimelockDelay",
type: "error",
},
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "token",
+ type: "address",
+ },
+ ],
+ name: "InvalidToken",
+ type: "error",
+ },
{
inputs: [
{
diff --git a/src/typechain-types/factories/Multicall__factory.ts b/src/typechain-types/factories/Multicall__factory.ts
index 6e1d40130a..b14978276b 100644
--- a/src/typechain-types/factories/Multicall__factory.ts
+++ b/src/typechain-types/factories/Multicall__factory.ts
@@ -21,7 +21,7 @@ const _abi = [
type: "bytes",
},
],
- internalType: "struct Multicall2.Call[]",
+ internalType: "struct Multicall3.Call[]",
name: "calls",
type: "tuple[]",
},
@@ -39,7 +39,108 @@ const _abi = [
type: "bytes[]",
},
],
- stateMutability: "nonpayable",
+ stateMutability: "payable",
+ type: "function",
+ },
+ {
+ inputs: [
+ {
+ components: [
+ {
+ internalType: "address",
+ name: "target",
+ type: "address",
+ },
+ {
+ internalType: "bool",
+ name: "allowFailure",
+ type: "bool",
+ },
+ {
+ internalType: "bytes",
+ name: "callData",
+ type: "bytes",
+ },
+ ],
+ internalType: "struct Multicall3.Call3[]",
+ name: "calls",
+ type: "tuple[]",
+ },
+ ],
+ name: "aggregate3",
+ outputs: [
+ {
+ components: [
+ {
+ internalType: "bool",
+ name: "success",
+ type: "bool",
+ },
+ {
+ internalType: "bytes",
+ name: "returnData",
+ type: "bytes",
+ },
+ ],
+ internalType: "struct Multicall3.Result[]",
+ name: "returnData",
+ type: "tuple[]",
+ },
+ ],
+ stateMutability: "payable",
+ type: "function",
+ },
+ {
+ inputs: [
+ {
+ components: [
+ {
+ internalType: "address",
+ name: "target",
+ type: "address",
+ },
+ {
+ internalType: "bool",
+ name: "allowFailure",
+ type: "bool",
+ },
+ {
+ internalType: "uint256",
+ name: "value",
+ type: "uint256",
+ },
+ {
+ internalType: "bytes",
+ name: "callData",
+ type: "bytes",
+ },
+ ],
+ internalType: "struct Multicall3.Call3Value[]",
+ name: "calls",
+ type: "tuple[]",
+ },
+ ],
+ name: "aggregate3Value",
+ outputs: [
+ {
+ components: [
+ {
+ internalType: "bool",
+ name: "success",
+ type: "bool",
+ },
+ {
+ internalType: "bytes",
+ name: "returnData",
+ type: "bytes",
+ },
+ ],
+ internalType: "struct Multicall3.Result[]",
+ name: "returnData",
+ type: "tuple[]",
+ },
+ ],
+ stateMutability: "payable",
type: "function",
},
{
@@ -57,7 +158,7 @@ const _abi = [
type: "bytes",
},
],
- internalType: "struct Multicall2.Call[]",
+ internalType: "struct Multicall3.Call[]",
name: "calls",
type: "tuple[]",
},
@@ -87,12 +188,25 @@ const _abi = [
type: "bytes",
},
],
- internalType: "struct Multicall2.Result[]",
+ internalType: "struct Multicall3.Result[]",
name: "returnData",
type: "tuple[]",
},
],
- stateMutability: "nonpayable",
+ stateMutability: "payable",
+ type: "function",
+ },
+ {
+ inputs: [],
+ name: "getBasefee",
+ outputs: [
+ {
+ internalType: "uint256",
+ name: "basefee",
+ type: "uint256",
+ },
+ ],
+ stateMutability: "view",
type: "function",
},
{
@@ -129,12 +243,12 @@ const _abi = [
},
{
inputs: [],
- name: "getCurrentBlockCoinbase",
+ name: "getChainId",
outputs: [
{
- internalType: "address",
- name: "coinbase",
- type: "address",
+ internalType: "uint256",
+ name: "chainid",
+ type: "uint256",
},
],
stateMutability: "view",
@@ -142,12 +256,12 @@ const _abi = [
},
{
inputs: [],
- name: "getCurrentBlockDifficulty",
+ name: "getCurrentBlockCoinbase",
outputs: [
{
- internalType: "uint256",
- name: "difficulty",
- type: "uint256",
+ internalType: "address",
+ name: "coinbase",
+ type: "address",
},
],
stateMutability: "view",
@@ -198,19 +312,6 @@ const _abi = [
stateMutability: "view",
type: "function",
},
- {
- inputs: [],
- name: "getL1BlockNumber",
- outputs: [
- {
- internalType: "uint256",
- name: "l1BlockNumber",
- type: "uint256",
- },
- ],
- stateMutability: "view",
- type: "function",
- },
{
inputs: [],
name: "getLastBlockHash",
@@ -244,7 +345,7 @@ const _abi = [
type: "bytes",
},
],
- internalType: "struct Multicall2.Call[]",
+ internalType: "struct Multicall3.Call[]",
name: "calls",
type: "tuple[]",
},
@@ -264,12 +365,12 @@ const _abi = [
type: "bytes",
},
],
- internalType: "struct Multicall2.Result[]",
+ internalType: "struct Multicall3.Result[]",
name: "returnData",
type: "tuple[]",
},
],
- stateMutability: "nonpayable",
+ stateMutability: "payable",
type: "function",
},
{
@@ -292,7 +393,7 @@ const _abi = [
type: "bytes",
},
],
- internalType: "struct Multicall2.Call[]",
+ internalType: "struct Multicall3.Call[]",
name: "calls",
type: "tuple[]",
},
@@ -322,12 +423,12 @@ const _abi = [
type: "bytes",
},
],
- internalType: "struct Multicall2.Result[]",
+ internalType: "struct Multicall3.Result[]",
name: "returnData",
type: "tuple[]",
},
],
- stateMutability: "nonpayable",
+ stateMutability: "payable",
type: "function",
},
] as const;
diff --git a/src/typechain-types/factories/SyntheticsReader__factory.ts b/src/typechain-types/factories/SyntheticsReader__factory.ts
index d4ef21aed9..9a951f3257 100644
--- a/src/typechain-types/factories/SyntheticsReader__factory.ts
+++ b/src/typechain-types/factories/SyntheticsReader__factory.ts
@@ -686,6 +686,21 @@ const _abi = [
name: "balanceWasImproved",
type: "bool",
},
+ {
+ internalType: "int256",
+ name: "proportionalPendingImpactUsd",
+ type: "int256",
+ },
+ {
+ internalType: "int256",
+ name: "totalImpactUsd",
+ type: "int256",
+ },
+ {
+ internalType: "uint256",
+ name: "priceImpactDiffUsd",
+ type: "uint256",
+ },
],
internalType: "struct ReaderPricingUtils.ExecutionPriceResult",
name: "executionPriceResult",
@@ -1320,6 +1335,21 @@ const _abi = [
name: "balanceWasImproved",
type: "bool",
},
+ {
+ internalType: "int256",
+ name: "proportionalPendingImpactUsd",
+ type: "int256",
+ },
+ {
+ internalType: "int256",
+ name: "totalImpactUsd",
+ type: "int256",
+ },
+ {
+ internalType: "uint256",
+ name: "priceImpactDiffUsd",
+ type: "uint256",
+ },
],
internalType: "struct ReaderPricingUtils.ExecutionPriceResult",
name: "",
@@ -3438,6 +3468,21 @@ const _abi = [
name: "balanceWasImproved",
type: "bool",
},
+ {
+ internalType: "int256",
+ name: "proportionalPendingImpactUsd",
+ type: "int256",
+ },
+ {
+ internalType: "int256",
+ name: "totalImpactUsd",
+ type: "int256",
+ },
+ {
+ internalType: "uint256",
+ name: "priceImpactDiffUsd",
+ type: "uint256",
+ },
],
internalType: "struct ReaderPricingUtils.ExecutionPriceResult",
name: "executionPriceResult",
@@ -3938,6 +3983,21 @@ const _abi = [
name: "balanceWasImproved",
type: "bool",
},
+ {
+ internalType: "int256",
+ name: "proportionalPendingImpactUsd",
+ type: "int256",
+ },
+ {
+ internalType: "int256",
+ name: "totalImpactUsd",
+ type: "int256",
+ },
+ {
+ internalType: "uint256",
+ name: "priceImpactDiffUsd",
+ type: "uint256",
+ },
],
internalType: "struct ReaderPricingUtils.ExecutionPriceResult",
name: "executionPriceResult",
From 0defa31c511c047a117df1be640d3d1bdd23048c Mon Sep 17 00:00:00 2001
From: midas-myth
Date: Thu, 14 Aug 2025 16:30:38 +0200
Subject: [PATCH 22/55] Update contract addresses
---
sdk/src/configs/contracts.ts | 79 ++++++++++++++++++++----------------
1 file changed, 44 insertions(+), 35 deletions(-)
diff --git a/sdk/src/configs/contracts.ts b/sdk/src/configs/contracts.ts
index 69e4f8d33a..d6a5e754ca 100644
--- a/sdk/src/configs/contracts.ts
+++ b/sdk/src/configs/contracts.ts
@@ -49,8 +49,8 @@ export const CONTRACTS = {
// Synthetics
DataStore: "0xFD70de6b91282D8017aA4E741e9Ae325CAb992d8",
EventEmitter: "0xC8ee91A54287DB53897056e12D9819156D3822Fb",
- SubaccountRouter: "0xfB0dd3878440817e1F12cDF023a88E74D4ae82e2",
- ExchangeRouter: "0x96F257288f00a9aD8ba159294D373550fE2b6771",
+ SubaccountRouter: "0x5b9A353F18d543B9F8a57B2AE50a4FBc80033EC1",
+ ExchangeRouter: "0x87d66368cD08a7Ca42252f5ab44B2fb6d1Fb8d15",
DepositVault: "0xF89e77e8Dc11691C9e8757e84aaFbCD8A67d7A55",
WithdrawalVault: "0x0628D46b5D145f183AdB6Ef1f2c97eD1C4701C55",
OrderVault: "0x31eF83a530Fde1B38EE9A18093A333D8Bbbc40D5",
@@ -58,26 +58,27 @@ export const CONTRACTS = {
SyntheticsReader: "0xd42986AFC0660dd1f1C8C76F248262Ffcb37db79",
SyntheticsRouter: "0x7452c558d45f8afC8c83dAe62C3f8A5BE19c71f6",
- GlvReader: "0xF90192b6D68cAF5947114212755C67c64518CCE9",
- GlvRouter: "0x36194Db64C1881E44E34e14dc3bb8AfA83B65608",
+ GlvReader: "0xb51e34dc3A7c80E4ABbC3800aD0e487b7b878339",
+ GlvRouter: "0x10Fa5Bd343373101654E896B43Ca38Fd8f3789F9",
GlvVault: "0x393053B58f9678C9c28c2cE941fF6cac49C3F8f9",
- GelatoRelayRouter: "0xC0d483eD76ceCd52eB44Eb78d813Cf5Ace5138fD",
- SubaccountGelatoRelayRouter: "0xeb1f997F95D970701B72F4f66DdD8E360c34C762",
+ GelatoRelayRouter: "0x0C08518C41755C6907135266dCCf09d51aE53CC4",
+ SubaccountGelatoRelayRouter: "0xA1D94802EcD642051B677dBF37c8E78ce6dd3784",
- MultichainClaimsRouter: "0xDa3e6AB64699f159C82acF9bA7216eD57806DFc6",
- MultichainGlvRouter: "0x49a10eb59193ff2dC2C95C13979D0C045ccbCE42",
- MultichainGmRouter: "0x6DFEa567810CfbF8B787a504D66C767a8A770eB7",
- MultichainOrderRouter: "0xba4C3574553BB99bC7D0116CD49DCc757870b68E",
- MultichainSubaccountRouter: "0xDF4fB0eb95f70C3E3EeAdBe5d1074F009d3F0193",
- MultichainTransferRouter: "0x379b75be4cA9a25C72753f56ad9EA3850e206D35",
+ MultichainClaimsRouter: "0x2A7244EE5373D2F161cE99F0D144c12860D651Af",
+ MultichainGlvRouter: "0xFdaFa6fbd4B480017FD37205Cb3A24AE93823956",
+ MultichainGmRouter: "0xF53e30CE07f148fdE6e531Be7dC0b6ad670E8C6e",
+ MultichainOrderRouter: "0x3c796504d47013Ea0552CCa57373B59DF03D34a0",
+ MultichainSubaccountRouter: "0x99CD306B777C5aAb842bA65e4f7FF0554ECDe808",
+ MultichainTransferRouter: "0xC1D1354A948bf717d6d873e5c0bE614359AF954D",
MultichainVault: "0xCeaadFAf6A8C489B250e407987877c5fDfcDBE6E",
+ ChainlinkPriceFeedProvider: "0x38B8dB61b724b51e42A88Cb8eC564CD685a0f53B",
+ ClaimHandler: "0x28f1F4AA95F49FAB62464536A269437B13d48976",
+
ExternalHandler: "0x389CEf541397e872dC04421f166B5Bc2E0b374a5",
OpenOceanRouter: "0x6352a56caadC4F1E25CD6c75970Fa768A3304e64",
- ChainlinkPriceFeedProvider: "0x0913CA02B93A2AA381a420AEac38490ee6284A32",
-
Multicall: "0xe79118d6D92a4b23369ba356C90b9A7ABf1CB961",
ArbitrumNodeInterface: "0x00000000000000000000000000000000000000C8",
ClaimHandler: "0xCF2b097517EEBD6c36756A82844D2ec21Ee4C025",
@@ -129,8 +130,8 @@ export const CONTRACTS = {
// Synthetics
DataStore: "0x2F0b22339414ADeD7D5F06f9D604c7fF5b2fe3f6",
EventEmitter: "0xDb17B211c34240B014ab6d61d4A31FA0C0e20c26",
- SubaccountRouter: "0x5690C9955b0565eB0287F809eC3666D1aafc5faa",
- ExchangeRouter: "0xCF2b097517EEBD6c36756A82844D2ec21Ee4C025",
+ SubaccountRouter: "0x88a5c6D94634Abd7745f5348e5D8C42868ed4AC3",
+ ExchangeRouter: "0xF0864BE1C39C0AB28a8f1918BC8321beF8F7C317",
DepositVault: "0x90c670825d0C62ede1c5ee9571d6d9a17A722DFF",
WithdrawalVault: "0xf5F30B10141E1F63FC11eD772931A8294a591996",
OrderVault: "0xD3D60D22d415aD43b7e64b510D86A30f19B1B12C",
@@ -138,18 +139,26 @@ export const CONTRACTS = {
SyntheticsReader: "0x07F8Aba575B987a7165bDAcA727C74C1ccDEC258",
SyntheticsRouter: "0x820F5FfC5b525cD4d88Cd91aCf2c28F16530Cc68",
- GlvReader: "0xCbC0F52d5bE4025574C60804fF3f031A01320F66",
- GlvRouter: "0x7Eb4F2f7D4e7C919A698eC5e1C0De0c390126362",
+ GlvReader: "0x12Ac77003B3D11b0853d1FD12E5AF22a9060eC4b",
+ GlvRouter: "0x4729D9f61c0159F5e02D2C2e5937B3225e55442C",
GlvVault: "0x527FB0bCfF63C47761039bB386cFE181A92a4701",
- GelatoRelayRouter: "0xc8b95239aE78ca9F39A3a7a2A19F0c2d537E2057",
- SubaccountGelatoRelayRouter: "0x5306D63f114240C0825B3268635CaB1Df23fa6c3",
+ GelatoRelayRouter: "0xa61f92ab63cc5C3d60574d40A6e73861c37aaC95",
+ SubaccountGelatoRelayRouter: "0x58b09FD12863218F2ca156808C2Ae48aaCD0c072",
+
+ MultichainClaimsRouter: "0x9080f8A35Da53F4200a68533FB1dC1cA05357bDB",
+ MultichainGlvRouter: "0x2A7244EE5373D2F161cE99F0D144c12860D651Af",
+ MultichainGmRouter: "0x10Fa5Bd343373101654E896B43Ca38Fd8f3789F9",
+ MultichainOrderRouter: "0x99CD306B777C5aAb842bA65e4f7FF0554ECDe808",
+ MultichainSubaccountRouter: "0xB36a4c6cDeDea3f31b3d16F33553F93b96b178F4",
+ MultichainTransferRouter: "0x8c6e20A2211D1b70cD7c0789EcE44fDB19567621",
+ MultichainVault: "0x6D5F3c723002847B009D07Fe8e17d6958F153E4e",
+
+ ChainlinkPriceFeedProvider: "0x05d97cee050bfb81FB3EaD4A9368584F8e72C88e",
ExternalHandler: "0xD149573a098223a9185433290a5A5CDbFa54a8A9",
OpenOceanRouter: "0x6352a56caadC4F1E25CD6c75970Fa768A3304e64",
- ChainlinkPriceFeedProvider: "0x71AF5F44A295FEe7e7E902994eDc5B88E298BAA3",
-
Multicall: "0x50474CAe810B316c294111807F94F9f48527e7F8",
ArbitrumNodeInterface: zeroAddress,
ClaimHandler: "0xF73CE08A22c67f19d75892457817e917cB3f9493",
@@ -157,8 +166,8 @@ export const CONTRACTS = {
[BOTANIX]: {
DataStore: "0xA23B81a89Ab9D7D89fF8fc1b5d8508fB75Cc094d",
EventEmitter: "0xAf2E131d483cedE068e21a9228aD91E623a989C2",
- SubaccountRouter: "0x07D7C9e1df9E92Dfee48947739d26e8E7a1AAB2c",
- ExchangeRouter: "0x4F56B6e01b04595ab746a5AB60994d60f6721a43",
+ SubaccountRouter: "0x11E590f6092D557bF71BaDEd50D81521674F8275",
+ ExchangeRouter: "0x72fa3978E2E330C7B2debc23CB676A3ae63333F6",
DepositVault: "0x4D12C3D3e750e051e87a2F3f7750fBd94767742c",
WithdrawalVault: "0x46BAeAEdbF90Ce46310173A04942e2B3B781Bf0e",
OrderVault: "0xe52B3700D17B45dE9de7205DEe4685B4B9EC612D",
@@ -167,25 +176,25 @@ export const CONTRACTS = {
SyntheticsReader: "0x7d92ef68096318fbDA4a0ea79aF12B4ba17bE208",
SyntheticsRouter: "0x3d472afcd66F954Fe4909EEcDd5c940e9a99290c",
- GlvReader: "0x3D62872874971E04BF843E09EfDb6bB939F3BE4f",
- GlvRouter: "0xfca7F9Dba7a062211b7472110c222B0D00c6E473",
+ GlvReader: "0x490d660A21fB75701b7781E191cB888D1FE38315",
+ GlvRouter: "0x348Eca94e7c6F35430aF1cAccE27C29E9Bef9ae3",
GlvVault: "0xd336087512BeF8Df32AF605b492f452Fd6436CD8",
- GelatoRelayRouter: "0xbDD29dE1ebc45A6d145D2A17370C2A2D13342306",
- SubaccountGelatoRelayRouter: "0x8302b92DD4Ed2A9C06C4CE1a93c0C3879C209189",
+ GelatoRelayRouter: "0x7f8eF83C92B48a4B5B954A24D98a6cD0Ed4D160a",
+ SubaccountGelatoRelayRouter: "0xfbb9C41046E27405224a911f44602C3667f9D8f6",
- MultichainClaimsRouter: "0x99FeA262baC7bfE6DD7abE46731240b62c23dDcc",
- MultichainGlvRouter: "0x00F6D4c797f56137649c833c952c5096960592Fe",
- MultichainGmRouter: "0x65a481d0003624fAba1167923271F6DD6a7fc022",
- MultichainOrderRouter: "0x5589294AB319817a02b908F9fdaC883bD8Bd464F",
- MultichainSubaccountRouter: "0x96d565D73D3967Cbf55Ee3d2D66148dBa421F084",
- MultichainTransferRouter: "0x15e6329F6bD25387F575916b0912D308338672D7",
+ MultichainClaimsRouter: "0x790Ee987b9B253374d700b07F16347a7d4C4ff2e",
+ MultichainGlvRouter: "0xEE027373517a6D96Fe62f70E9A0A395cB5a39Eee",
+ MultichainGmRouter: "0x4ef8394CD5DD7E3EE6D30824689eF461783a3360",
+ MultichainOrderRouter: "0x5c5DBbcDf420B5d81d4FfDBa5b26Eb24E6E60d52",
+ MultichainSubaccountRouter: "0xd3B6E962f135634C43415d57A28E688Fb4f15A58",
+ MultichainTransferRouter: "0x901f26a57edCe65Ef3FBcCD260433De9B2279852",
MultichainVault: "0x9a535f9343434D96c4a39fF1d90cC685A4F6Fb20",
ExternalHandler: "0x36b906eA6AE7c74aeEE8cDE66D01B3f1f8843872",
OpenOceanRouter: zeroAddress,
- ChainlinkPriceFeedProvider: "0x00994a923B27324EA33F1B91f57580f81714104F",
+ ChainlinkPriceFeedProvider: "0xDc613305e9267f0770072dEaB8c03162e0554b2d",
Multicall: "0x4BaA24f93a657f0c1b4A0Ffc72B91011E35cA46b",
From cf651479e58baf77bc96f2a515ed0c5c4de6a9ad Mon Sep 17 00:00:00 2001
From: midas-myth
Date: Thu, 14 Aug 2025 16:46:30 +0200
Subject: [PATCH 23/55] some v2.2 abis
---
sdk/src/abis/ClaimHandler.json | 21 +++----------------
sdk/src/abis/SyntheticsReader.json | 5 +++++
src/typechain-types/SyntheticsReader.ts | 3 +++
.../factories/SyntheticsReader__factory.ts | 5 +++++
4 files changed, 16 insertions(+), 18 deletions(-)
diff --git a/sdk/src/abis/ClaimHandler.json b/sdk/src/abis/ClaimHandler.json
index ce09bca5cc..b38721ec29 100644
--- a/sdk/src/abis/ClaimHandler.json
+++ b/sdk/src/abis/ClaimHandler.json
@@ -1,5 +1,5 @@
{
- "abi": [
+ "abi": [
{
"inputs": [
{
@@ -420,20 +420,5 @@
"stateMutability": "nonpayable",
"type": "function"
}
- ],
- "libraries": {},
- "devdoc": {
- "kind": "dev",
- "methods": {},
- "version": 1
- },
- "userdoc": {
- "kind": "user",
- "methods": {},
- "version": 1
- },
- "storageLayout": {
- "storage": [],
- "types": null
- }
- }
+ ]
+}
diff --git a/sdk/src/abis/SyntheticsReader.json b/sdk/src/abis/SyntheticsReader.json
index 5e059b7214..762bafb2cc 100644
--- a/sdk/src/abis/SyntheticsReader.json
+++ b/sdk/src/abis/SyntheticsReader.json
@@ -1304,6 +1304,11 @@
"name": "sizeDeltaUsd",
"type": "int256"
},
+ {
+ "internalType": "int256",
+ "name": "pendingImpactAmount",
+ "type": "int256"
+ },
{
"internalType": "bool",
"name": "isLong",
diff --git a/src/typechain-types/SyntheticsReader.ts b/src/typechain-types/SyntheticsReader.ts
index 27b3c52860..31b0016df8 100644
--- a/src/typechain-types/SyntheticsReader.ts
+++ b/src/typechain-types/SyntheticsReader.ts
@@ -1020,6 +1020,7 @@ export interface SyntheticsReaderInterface extends Interface {
BigNumberish,
BigNumberish,
BigNumberish,
+ BigNumberish,
boolean,
]
): string;
@@ -1221,6 +1222,7 @@ export interface SyntheticsReader extends BaseContract {
positionSizeInUsd: BigNumberish,
positionSizeInTokens: BigNumberish,
sizeDeltaUsd: BigNumberish,
+ pendingImpactAmount: BigNumberish,
isLong: boolean,
],
[ReaderPricingUtils.ExecutionPriceResultStructOutput],
@@ -1488,6 +1490,7 @@ export interface SyntheticsReader extends BaseContract {
positionSizeInUsd: BigNumberish,
positionSizeInTokens: BigNumberish,
sizeDeltaUsd: BigNumberish,
+ pendingImpactAmount: BigNumberish,
isLong: boolean,
],
[ReaderPricingUtils.ExecutionPriceResultStructOutput],
diff --git a/src/typechain-types/factories/SyntheticsReader__factory.ts b/src/typechain-types/factories/SyntheticsReader__factory.ts
index 9a951f3257..a4383064c9 100644
--- a/src/typechain-types/factories/SyntheticsReader__factory.ts
+++ b/src/typechain-types/factories/SyntheticsReader__factory.ts
@@ -1310,6 +1310,11 @@ const _abi = [
name: "sizeDeltaUsd",
type: "int256",
},
+ {
+ internalType: "int256",
+ name: "pendingImpactAmount",
+ type: "int256",
+ },
{
internalType: "bool",
name: "isLong",
From e3f3d0a6419de62b4156d93e3d07955106c9ec7a Mon Sep 17 00:00:00 2001
From: midas-myth
Date: Fri, 15 Aug 2025 15:30:48 +0200
Subject: [PATCH 24/55] Multichain add prod LayerZeroProvider contracts
---
sdk/src/configs/contracts.ts | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sdk/src/configs/contracts.ts b/sdk/src/configs/contracts.ts
index d6a5e754ca..9387bb474d 100644
--- a/sdk/src/configs/contracts.ts
+++ b/sdk/src/configs/contracts.ts
@@ -72,6 +72,7 @@ export const CONTRACTS = {
MultichainSubaccountRouter: "0x99CD306B777C5aAb842bA65e4f7FF0554ECDe808",
MultichainTransferRouter: "0xC1D1354A948bf717d6d873e5c0bE614359AF954D",
MultichainVault: "0xCeaadFAf6A8C489B250e407987877c5fDfcDBE6E",
+ LayerZeroProvider: "0x7129Ea01F0826c705d6F7ab01Cf3C06bb83E9397",
ChainlinkPriceFeedProvider: "0x38B8dB61b724b51e42A88Cb8eC564CD685a0f53B",
ClaimHandler: "0x28f1F4AA95F49FAB62464536A269437B13d48976",
@@ -153,6 +154,7 @@ export const CONTRACTS = {
MultichainSubaccountRouter: "0xB36a4c6cDeDea3f31b3d16F33553F93b96b178F4",
MultichainTransferRouter: "0x8c6e20A2211D1b70cD7c0789EcE44fDB19567621",
MultichainVault: "0x6D5F3c723002847B009D07Fe8e17d6958F153E4e",
+ LayerZeroProvider: "0xA1D94802EcD642051B677dBF37c8E78ce6dd3784",
ChainlinkPriceFeedProvider: "0x05d97cee050bfb81FB3EaD4A9368584F8e72C88e",
From 8d312a525c89d0ad39d92e3c2cb56d0b64143dca Mon Sep 17 00:00:00 2001
From: midas-myth
Date: Wed, 20 Aug 2025 16:46:58 +0200
Subject: [PATCH 25/55] Multichain new contracts
---
sdk/src/configs/contracts.ts | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/sdk/src/configs/contracts.ts b/sdk/src/configs/contracts.ts
index 9387bb474d..d273c51ae3 100644
--- a/sdk/src/configs/contracts.ts
+++ b/sdk/src/configs/contracts.ts
@@ -55,7 +55,7 @@ export const CONTRACTS = {
WithdrawalVault: "0x0628D46b5D145f183AdB6Ef1f2c97eD1C4701C55",
OrderVault: "0x31eF83a530Fde1B38EE9A18093A333D8Bbbc40D5",
ShiftVault: "0xfe99609C4AA83ff6816b64563Bdffd7fa68753Ab",
- SyntheticsReader: "0xd42986AFC0660dd1f1C8C76F248262Ffcb37db79",
+ SyntheticsReader: "0x65A6CC451BAfF7e7B4FDAb4157763aB4b6b44D0E",
SyntheticsRouter: "0x7452c558d45f8afC8c83dAe62C3f8A5BE19c71f6",
GlvReader: "0xb51e34dc3A7c80E4ABbC3800aD0e487b7b878339",
@@ -82,7 +82,7 @@ export const CONTRACTS = {
Multicall: "0xe79118d6D92a4b23369ba356C90b9A7ABf1CB961",
ArbitrumNodeInterface: "0x00000000000000000000000000000000000000C8",
- ClaimHandler: "0xCF2b097517EEBD6c36756A82844D2ec21Ee4C025",
+ LayerZeroEndpoint: "0x1a44076050125825900e736c501f859c50fE728c",
},
[AVALANCHE]: {
Vault: "0x9ab2De34A33fB459b538c43f251eB825645e8595",
@@ -137,7 +137,7 @@ export const CONTRACTS = {
WithdrawalVault: "0xf5F30B10141E1F63FC11eD772931A8294a591996",
OrderVault: "0xD3D60D22d415aD43b7e64b510D86A30f19B1B12C",
ShiftVault: "0x7fC46CCb386e9bbBFB49A2639002734C3Ec52b39",
- SyntheticsReader: "0x07F8Aba575B987a7165bDAcA727C74C1ccDEC258",
+ SyntheticsReader: "0x1EC018d2b6ACCA20a0bEDb86450b7E27D1D8355B",
SyntheticsRouter: "0x820F5FfC5b525cD4d88Cd91aCf2c28F16530Cc68",
GlvReader: "0x12Ac77003B3D11b0853d1FD12E5AF22a9060eC4b",
@@ -157,13 +157,14 @@ export const CONTRACTS = {
LayerZeroProvider: "0xA1D94802EcD642051B677dBF37c8E78ce6dd3784",
ChainlinkPriceFeedProvider: "0x05d97cee050bfb81FB3EaD4A9368584F8e72C88e",
+ ClaimHandler: "0x7FfedCAC2eCb2C29dDc027B60D6F8107295Ff2eA",
ExternalHandler: "0xD149573a098223a9185433290a5A5CDbFa54a8A9",
OpenOceanRouter: "0x6352a56caadC4F1E25CD6c75970Fa768A3304e64",
Multicall: "0x50474CAe810B316c294111807F94F9f48527e7F8",
ArbitrumNodeInterface: zeroAddress,
- ClaimHandler: "0xF73CE08A22c67f19d75892457817e917cB3f9493",
+ LayerZeroEndpoint: "0x1a44076050125825900e736c501f859c50fE728c",
},
[BOTANIX]: {
DataStore: "0xA23B81a89Ab9D7D89fF8fc1b5d8508fB75Cc094d",
@@ -175,7 +176,7 @@ export const CONTRACTS = {
OrderVault: "0xe52B3700D17B45dE9de7205DEe4685B4B9EC612D",
ShiftVault: "0xa7EE2737249e0099906cB079BCEe85f0bbd837d4",
- SyntheticsReader: "0x7d92ef68096318fbDA4a0ea79aF12B4ba17bE208",
+ SyntheticsReader: "0xa254B60cbB85a92F6151B10E1233639F601f2F0F",
SyntheticsRouter: "0x3d472afcd66F954Fe4909EEcDd5c940e9a99290c",
GlvReader: "0x490d660A21fB75701b7781E191cB888D1FE38315",
@@ -199,6 +200,7 @@ export const CONTRACTS = {
ChainlinkPriceFeedProvider: "0xDc613305e9267f0770072dEaB8c03162e0554b2d",
Multicall: "0x4BaA24f93a657f0c1b4A0Ffc72B91011E35cA46b",
+ LayerZeroEndpoint: "0x6F475642a6e85809B1c36Fa62763669b1b48DD5B",
Timelock: "0xca3e30b51A7c3bd40bFc52a61AB0cE57B3Ab3ad8",
@@ -322,6 +324,7 @@ export const CONTRACTS = {
Multicall: "0x966D1F5c54a714C6443205F0Ec49eEF81F10fdfD",
ArbitrumNodeInterface: zeroAddress,
+ LayerZeroEndpoint: "0x6EDCE65403992e310A62460808c4b910D972f10f",
},
[ARBITRUM_SEPOLIA]: {
From 462979f860a756230479456b00bd5b4d28ce2657 Mon Sep 17 00:00:00 2001
From: Divhead <110596516+divhead@users.noreply.github.com>
Date: Wed, 20 Aug 2025 07:47:29 -0700
Subject: [PATCH 26/55] minor ui fixes
---
sdk/src/configs/factors.ts | 2 +-
.../TradeBoxRows/AdvancedDisplayRows.tsx | 32 -----------------
.../TradeBoxRows/PriceImpactFeesRow.tsx | 19 +----------
.../Synthetics/TradeFeesRow/TradeFeesRow.tsx | 34 +++++++++++++++++--
src/locales/de/messages.po | 19 ++++++++---
src/locales/en/messages.po | 19 ++++++++---
src/locales/es/messages.po | 19 ++++++++---
src/locales/fr/messages.po | 19 ++++++++---
src/locales/ja/messages.po | 19 ++++++++---
src/locales/ko/messages.po | 19 ++++++++---
src/locales/pseudo/messages.po | 19 ++++++++---
src/locales/ru/messages.po | 19 ++++++++---
src/locales/zh/messages.po | 19 ++++++++---
13 files changed, 160 insertions(+), 98 deletions(-)
diff --git a/sdk/src/configs/factors.ts b/sdk/src/configs/factors.ts
index f88f117917..350d5662bd 100644
--- a/sdk/src/configs/factors.ts
+++ b/sdk/src/configs/factors.ts
@@ -3,7 +3,7 @@ export { USD_DECIMALS, BASIS_POINTS_DIVISOR, BASIS_POINTS_DIVISOR_BIGINT, BASIS_
// V2
export const HIGH_PRICE_IMPACT_BPS = 80; // 0.8%
export const HIGH_POSITION_IMPACT_BPS = 50; // 0.5%
-export const HIGH_COLLATERAL_IMPACT_BPS = 500; // 5%
+export const HIGH_COLLATERAL_IMPACT_BPS = 2000; // 20%
export const HIGH_SWAP_IMPACT_BPS = 50; // 0.5%
export const DEFAULT_ACCEPTABLE_PRICE_IMPACT_BUFFER = 30; // 0.3%
export const HIGH_ALLOWED_SWAP_SLIPPAGE_BPS = 20; // 0.2%
diff --git a/src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx b/src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx
index eb6d4d882a..f0e13724fd 100644
--- a/src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx
+++ b/src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx
@@ -3,11 +3,9 @@ import { ReactNode, useCallback, useMemo } from "react";
import {
selectTradeboxAdvancedOptions,
- selectTradeboxAllowedSlippage,
selectTradeboxDecreasePositionAmounts,
selectTradeboxDefaultAllowedSwapSlippageBps,
selectTradeboxDefaultTriggerAcceptablePriceImpactBps,
- selectTradeboxExecutionPrice,
selectTradeboxFees,
selectTradeboxIncreasePositionAmounts,
selectTradeboxNextPositionValues,
@@ -18,7 +16,6 @@ import {
selectTradeboxSetSelectedAcceptablePriceImpactBps,
selectTradeboxSetSelectedAllowedSwapSlippageBps,
selectTradeboxTotalSwapImpactBps,
- selectTradeboxToToken,
selectTradeboxTradeFeesType,
selectTradeboxTradeFlags,
selectTradeboxTriggerPrice,
@@ -33,11 +30,9 @@ import { formatLeverage } from "domain/synthetics/positions";
import { formatUsd } from "lib/numbers";
import { ExecutionFee } from "sdk/types/fees";
import { isStopIncreaseOrderType } from "sdk/utils/orders";
-import { applySlippageToPrice } from "sdk/utils/trade";
import { AcceptablePriceImpactInputRow } from "components/Synthetics/AcceptablePriceImpactInputRow/AcceptablePriceImpactInputRow";
import { AllowedSwapSlippageInputRow } from "components/Synthetics/AllowedSwapSlippageInputRowImpl/AllowedSwapSlippageInputRowImpl";
-import { ExecutionPriceRow } from "components/Synthetics/ExecutionPriceRow";
import { ExpandableRow } from "components/Synthetics/ExpandableRow";
import { NetworkFeeRow } from "components/Synthetics/NetworkFeeRow/NetworkFeeRow";
import { SyntheticsInfoRow } from "components/Synthetics/SyntheticsInfoRow";
@@ -135,32 +130,6 @@ function ExistingPositionInfoRows() {
);
}
-function DecreaseOrderRow() {
- const tradeFlags = useSelector(selectTradeboxTradeFlags);
- const { isMarket, isLong } = tradeFlags;
- const decreaseAmounts = useSelector(selectTradeboxDecreasePositionAmounts);
- const allowedSlippage = useSelector(selectTradeboxAllowedSlippage);
- const fees = useSelector(selectTradeboxFees);
- const executionPrice = useSelector(selectTradeboxExecutionPrice);
- const toToken = useSelector(selectTradeboxToToken);
-
- const acceptablePrice =
- isMarket && decreaseAmounts?.acceptablePrice
- ? applySlippageToPrice(allowedSlippage, decreaseAmounts.acceptablePrice, true, isLong)
- : decreaseAmounts?.acceptablePrice;
-
- return (
-
- );
-}
-
export function TradeBoxAdvancedGroups({
slippageInputId,
gasPaymentParams,
@@ -262,7 +231,6 @@ export function TradeBoxAdvancedGroups({
>
)}
- {isTrigger && }
diff --git a/src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx b/src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
index 6f6dea0588..ad30e97ba6 100644
--- a/src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
+++ b/src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
@@ -29,15 +29,6 @@ export function PriceImpactFeesRow() {
const isPriceImpactPositive = priceImpactPercentage !== undefined && priceImpactPercentage > 0;
- const formattedPriceImpactPercentage =
- priceImpactPercentage === undefined
- ? "..."
- : formatPercentage(priceImpactPercentage, {
- bps: false,
- signed: true,
- displayDecimals: 3,
- });
-
const rebateIsApplicable =
fees?.positionFee?.deltaUsd !== undefined && fees.positionFee.deltaUsd <= 0 && feesType !== "swap";
@@ -86,17 +77,9 @@ export function PriceImpactFeesRow() {
return (
-
- {formattedPriceImpactPercentage}
- {" "}
- /{" "}
{
+ if (p.positionPriceImpact?.deltaUsd === undefined || p.positionPriceImpact.deltaUsd === 0n) {
+ return null;
+ }
+
+ return (
+
+ Net price impact is the sum of the stored impact at increase and the impact at decrease action, which is only
+ settled on position decrease.
+
+ Read more
+
+
+ );
+ }, [p.positionPriceImpact?.deltaUsd]);
+
const priceImpactRebatesInfo = useMemo(() => {
if (p.priceImpactDiff?.deltaUsd === undefined || p.priceImpactDiff.deltaUsd === 0n) {
return null;
@@ -496,7 +512,7 @@ export function TradeFeesRow(p: Props) {
return (
- Price impact rebates for closing trades are claimable inder this claims tab.{" "}
+ Price impact rebates for closing trades are claimable under the claims tab.{" "}
Read more
@@ -558,6 +574,12 @@ export function TradeFeesRow(p: Props) {
{incentivesBottomText}
)}
+ {netPriceImpactInfo && (
+
+
+ {netPriceImpactInfo}
+
+ )}
{priceImpactRebatesInfo && (
@@ -575,7 +597,15 @@ export function TradeFeesRow(p: Props) {
/>
);
}
- }, [totalFeeUsd, feeRows, incentivesBottomText, shouldShowWarning, priceImpactRebatesInfo, swapRouteMsg]);
+ }, [
+ totalFeeUsd,
+ feeRows,
+ incentivesBottomText,
+ shouldShowWarning,
+ netPriceImpactInfo,
+ priceImpactRebatesInfo,
+ swapRouteMsg,
+ ]);
return
;
}
diff --git a/src/locales/de/messages.po b/src/locales/de/messages.po
index f52bbc6e0e..05776d266b 100644
--- a/src/locales/de/messages.po
+++ b/src/locales/de/messages.po
@@ -304,6 +304,8 @@ msgstr ""
#: src/components/Glp/GlpSwap.jsx
#: src/components/Glp/GlpSwap.jsx
#: src/components/Synthetics/OrderEditor/OrderEditor.tsx
+#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
+#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
#: src/pages/Dashboard/StatsCard.tsx
msgid "Fees"
@@ -2276,8 +2278,8 @@ msgid "Winner:"
msgstr ""
#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
-msgid "Price impact rebates for closing trades are claimable inder this claims tab. <0>Read more0>"
-msgstr ""
+#~ msgid "Price impact rebates for closing trades are claimable inder this claims tab. <0>Read more0>"
+#~ msgstr ""
#: src/pages/Home/Home.tsx
msgid "Total Trading Volume"
@@ -6525,7 +6527,6 @@ msgid "Claim"
msgstr "Beanspruchen"
#: src/components/Synthetics/GmSwap/GmFees/GmFees.tsx
-#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
msgid "Price Impact / Fees"
msgstr ""
@@ -7766,6 +7767,10 @@ msgstr ""
msgid "Avalanche LP incentives"
msgstr ""
+#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+msgid "Net price impact is the sum of the stored impact at increase and the impact at decrease action, which is only settled on position decrease.<0>Read more0>"
+msgstr ""
+
#: src/components/Stake/GMXAprTooltip.tsx
msgid "{nativeTokenSymbol} APR"
msgstr ""
@@ -8358,8 +8363,8 @@ msgid "Failed to update settings"
msgstr ""
#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
-msgid "Positive Price Impact / Fees"
-msgstr ""
+#~ msgid "Positive Price Impact / Fees"
+#~ msgstr ""
#: src/components/Exchange/PositionShare.tsx
msgid "Tweet"
@@ -9155,3 +9160,7 @@ msgstr ""
#: src/pages/Stake/VesterDepositModal.tsx
msgid "Deposit failed!"
msgstr ""
+
+#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+msgid "Price impact rebates for closing trades are claimable under the claims tab. <0>Read more0>"
+msgstr ""
diff --git a/src/locales/en/messages.po b/src/locales/en/messages.po
index 2154dbdb01..0c9278754d 100644
--- a/src/locales/en/messages.po
+++ b/src/locales/en/messages.po
@@ -304,6 +304,8 @@ msgstr "No incentives distribution history yet."
#: src/components/Glp/GlpSwap.jsx
#: src/components/Glp/GlpSwap.jsx
#: src/components/Synthetics/OrderEditor/OrderEditor.tsx
+#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
+#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
#: src/pages/Dashboard/StatsCard.tsx
msgid "Fees"
@@ -2276,8 +2278,8 @@ msgid "Winner:"
msgstr "Winner:"
#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
-msgid "Price impact rebates for closing trades are claimable inder this claims tab. <0>Read more0>"
-msgstr "Price impact rebates for closing trades are claimable inder this claims tab. <0>Read more0>"
+#~ msgid "Price impact rebates for closing trades are claimable inder this claims tab. <0>Read more0>"
+#~ msgstr "Price impact rebates for closing trades are claimable inder this claims tab. <0>Read more0>"
#: src/pages/Home/Home.tsx
msgid "Total Trading Volume"
@@ -6528,7 +6530,6 @@ msgid "Claim"
msgstr "Claim"
#: src/components/Synthetics/GmSwap/GmFees/GmFees.tsx
-#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
msgid "Price Impact / Fees"
msgstr "Price Impact / Fees"
@@ -7772,6 +7773,10 @@ msgstr "No liquidity is available for increasing shorts for<0/>this size. Max sh
msgid "Avalanche LP incentives"
msgstr "Avalanche LP incentives"
+#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+msgid "Net price impact is the sum of the stored impact at increase and the impact at decrease action, which is only settled on position decrease.<0>Read more0>"
+msgstr "Net price impact is the sum of the stored impact at increase and the impact at decrease action, which is only settled on position decrease.<0>Read more0>"
+
#: src/components/Stake/GMXAprTooltip.tsx
msgid "{nativeTokenSymbol} APR"
msgstr "{nativeTokenSymbol} APR"
@@ -8364,8 +8369,8 @@ msgid "Failed to update settings"
msgstr "Failed to update settings"
#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
-msgid "Positive Price Impact / Fees"
-msgstr "Positive Price Impact / Fees"
+#~ msgid "Positive Price Impact / Fees"
+#~ msgstr "Positive Price Impact / Fees"
#: src/components/Exchange/PositionShare.tsx
msgid "Tweet"
@@ -9161,3 +9166,7 @@ msgstr "Unstake GMX"
#: src/pages/Stake/VesterDepositModal.tsx
msgid "Deposit failed!"
msgstr "Deposit failed!"
+
+#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+msgid "Price impact rebates for closing trades are claimable under the claims tab. <0>Read more0>"
+msgstr "Price impact rebates for closing trades are claimable under the claims tab. <0>Read more0>"
diff --git a/src/locales/es/messages.po b/src/locales/es/messages.po
index fb98886566..d67d837a34 100644
--- a/src/locales/es/messages.po
+++ b/src/locales/es/messages.po
@@ -304,6 +304,8 @@ msgstr ""
#: src/components/Glp/GlpSwap.jsx
#: src/components/Glp/GlpSwap.jsx
#: src/components/Synthetics/OrderEditor/OrderEditor.tsx
+#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
+#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
#: src/pages/Dashboard/StatsCard.tsx
msgid "Fees"
@@ -2276,8 +2278,8 @@ msgid "Winner:"
msgstr ""
#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
-msgid "Price impact rebates for closing trades are claimable inder this claims tab. <0>Read more0>"
-msgstr ""
+#~ msgid "Price impact rebates for closing trades are claimable inder this claims tab. <0>Read more0>"
+#~ msgstr ""
#: src/pages/Home/Home.tsx
msgid "Total Trading Volume"
@@ -6525,7 +6527,6 @@ msgid "Claim"
msgstr "Reclamar"
#: src/components/Synthetics/GmSwap/GmFees/GmFees.tsx
-#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
msgid "Price Impact / Fees"
msgstr ""
@@ -7766,6 +7767,10 @@ msgstr ""
msgid "Avalanche LP incentives"
msgstr ""
+#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+msgid "Net price impact is the sum of the stored impact at increase and the impact at decrease action, which is only settled on position decrease.<0>Read more0>"
+msgstr ""
+
#: src/components/Stake/GMXAprTooltip.tsx
msgid "{nativeTokenSymbol} APR"
msgstr ""
@@ -8358,8 +8363,8 @@ msgid "Failed to update settings"
msgstr ""
#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
-msgid "Positive Price Impact / Fees"
-msgstr ""
+#~ msgid "Positive Price Impact / Fees"
+#~ msgstr ""
#: src/components/Exchange/PositionShare.tsx
msgid "Tweet"
@@ -9155,3 +9160,7 @@ msgstr ""
#: src/pages/Stake/VesterDepositModal.tsx
msgid "Deposit failed!"
msgstr ""
+
+#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+msgid "Price impact rebates for closing trades are claimable under the claims tab. <0>Read more0>"
+msgstr ""
diff --git a/src/locales/fr/messages.po b/src/locales/fr/messages.po
index ae7b17621b..b1cb16f855 100644
--- a/src/locales/fr/messages.po
+++ b/src/locales/fr/messages.po
@@ -304,6 +304,8 @@ msgstr ""
#: src/components/Glp/GlpSwap.jsx
#: src/components/Glp/GlpSwap.jsx
#: src/components/Synthetics/OrderEditor/OrderEditor.tsx
+#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
+#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
#: src/pages/Dashboard/StatsCard.tsx
msgid "Fees"
@@ -2276,8 +2278,8 @@ msgid "Winner:"
msgstr ""
#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
-msgid "Price impact rebates for closing trades are claimable inder this claims tab. <0>Read more0>"
-msgstr ""
+#~ msgid "Price impact rebates for closing trades are claimable inder this claims tab. <0>Read more0>"
+#~ msgstr ""
#: src/pages/Home/Home.tsx
msgid "Total Trading Volume"
@@ -6525,7 +6527,6 @@ msgid "Claim"
msgstr "Réclamer"
#: src/components/Synthetics/GmSwap/GmFees/GmFees.tsx
-#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
msgid "Price Impact / Fees"
msgstr ""
@@ -7766,6 +7767,10 @@ msgstr ""
msgid "Avalanche LP incentives"
msgstr ""
+#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+msgid "Net price impact is the sum of the stored impact at increase and the impact at decrease action, which is only settled on position decrease.<0>Read more0>"
+msgstr ""
+
#: src/components/Stake/GMXAprTooltip.tsx
msgid "{nativeTokenSymbol} APR"
msgstr ""
@@ -8358,8 +8363,8 @@ msgid "Failed to update settings"
msgstr ""
#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
-msgid "Positive Price Impact / Fees"
-msgstr ""
+#~ msgid "Positive Price Impact / Fees"
+#~ msgstr ""
#: src/components/Exchange/PositionShare.tsx
msgid "Tweet"
@@ -9155,3 +9160,7 @@ msgstr ""
#: src/pages/Stake/VesterDepositModal.tsx
msgid "Deposit failed!"
msgstr ""
+
+#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+msgid "Price impact rebates for closing trades are claimable under the claims tab. <0>Read more0>"
+msgstr ""
diff --git a/src/locales/ja/messages.po b/src/locales/ja/messages.po
index a9818f6335..12cfbabbf6 100644
--- a/src/locales/ja/messages.po
+++ b/src/locales/ja/messages.po
@@ -304,6 +304,8 @@ msgstr ""
#: src/components/Glp/GlpSwap.jsx
#: src/components/Glp/GlpSwap.jsx
#: src/components/Synthetics/OrderEditor/OrderEditor.tsx
+#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
+#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
#: src/pages/Dashboard/StatsCard.tsx
msgid "Fees"
@@ -2276,8 +2278,8 @@ msgid "Winner:"
msgstr ""
#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
-msgid "Price impact rebates for closing trades are claimable inder this claims tab. <0>Read more0>"
-msgstr ""
+#~ msgid "Price impact rebates for closing trades are claimable inder this claims tab. <0>Read more0>"
+#~ msgstr ""
#: src/pages/Home/Home.tsx
msgid "Total Trading Volume"
@@ -6525,7 +6527,6 @@ msgid "Claim"
msgstr "請求"
#: src/components/Synthetics/GmSwap/GmFees/GmFees.tsx
-#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
msgid "Price Impact / Fees"
msgstr ""
@@ -7766,6 +7767,10 @@ msgstr ""
msgid "Avalanche LP incentives"
msgstr ""
+#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+msgid "Net price impact is the sum of the stored impact at increase and the impact at decrease action, which is only settled on position decrease.<0>Read more0>"
+msgstr ""
+
#: src/components/Stake/GMXAprTooltip.tsx
msgid "{nativeTokenSymbol} APR"
msgstr ""
@@ -8358,8 +8363,8 @@ msgid "Failed to update settings"
msgstr ""
#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
-msgid "Positive Price Impact / Fees"
-msgstr ""
+#~ msgid "Positive Price Impact / Fees"
+#~ msgstr ""
#: src/components/Exchange/PositionShare.tsx
msgid "Tweet"
@@ -9155,3 +9160,7 @@ msgstr ""
#: src/pages/Stake/VesterDepositModal.tsx
msgid "Deposit failed!"
msgstr ""
+
+#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+msgid "Price impact rebates for closing trades are claimable under the claims tab. <0>Read more0>"
+msgstr ""
diff --git a/src/locales/ko/messages.po b/src/locales/ko/messages.po
index e5c5485f51..b61b5cd457 100644
--- a/src/locales/ko/messages.po
+++ b/src/locales/ko/messages.po
@@ -304,6 +304,8 @@ msgstr ""
#: src/components/Glp/GlpSwap.jsx
#: src/components/Glp/GlpSwap.jsx
#: src/components/Synthetics/OrderEditor/OrderEditor.tsx
+#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
+#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
#: src/pages/Dashboard/StatsCard.tsx
msgid "Fees"
@@ -2276,8 +2278,8 @@ msgid "Winner:"
msgstr ""
#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
-msgid "Price impact rebates for closing trades are claimable inder this claims tab. <0>Read more0>"
-msgstr ""
+#~ msgid "Price impact rebates for closing trades are claimable inder this claims tab. <0>Read more0>"
+#~ msgstr ""
#: src/pages/Home/Home.tsx
msgid "Total Trading Volume"
@@ -6525,7 +6527,6 @@ msgid "Claim"
msgstr "수령하기"
#: src/components/Synthetics/GmSwap/GmFees/GmFees.tsx
-#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
msgid "Price Impact / Fees"
msgstr ""
@@ -7766,6 +7767,10 @@ msgstr ""
msgid "Avalanche LP incentives"
msgstr ""
+#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+msgid "Net price impact is the sum of the stored impact at increase and the impact at decrease action, which is only settled on position decrease.<0>Read more0>"
+msgstr ""
+
#: src/components/Stake/GMXAprTooltip.tsx
msgid "{nativeTokenSymbol} APR"
msgstr ""
@@ -8358,8 +8363,8 @@ msgid "Failed to update settings"
msgstr ""
#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
-msgid "Positive Price Impact / Fees"
-msgstr ""
+#~ msgid "Positive Price Impact / Fees"
+#~ msgstr ""
#: src/components/Exchange/PositionShare.tsx
msgid "Tweet"
@@ -9155,3 +9160,7 @@ msgstr ""
#: src/pages/Stake/VesterDepositModal.tsx
msgid "Deposit failed!"
msgstr ""
+
+#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+msgid "Price impact rebates for closing trades are claimable under the claims tab. <0>Read more0>"
+msgstr ""
diff --git a/src/locales/pseudo/messages.po b/src/locales/pseudo/messages.po
index 58f23c3228..7ddad0b17d 100644
--- a/src/locales/pseudo/messages.po
+++ b/src/locales/pseudo/messages.po
@@ -304,6 +304,8 @@ msgstr ""
#: src/components/Glp/GlpSwap.jsx
#: src/components/Glp/GlpSwap.jsx
#: src/components/Synthetics/OrderEditor/OrderEditor.tsx
+#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
+#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
#: src/pages/Dashboard/StatsCard.tsx
msgid "Fees"
@@ -2276,8 +2278,8 @@ msgid "Winner:"
msgstr ""
#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
-msgid "Price impact rebates for closing trades are claimable inder this claims tab. <0>Read more0>"
-msgstr ""
+#~ msgid "Price impact rebates for closing trades are claimable inder this claims tab. <0>Read more0>"
+#~ msgstr ""
#: src/pages/Home/Home.tsx
msgid "Total Trading Volume"
@@ -6525,7 +6527,6 @@ msgid "Claim"
msgstr ""
#: src/components/Synthetics/GmSwap/GmFees/GmFees.tsx
-#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
msgid "Price Impact / Fees"
msgstr ""
@@ -7766,6 +7767,10 @@ msgstr ""
msgid "Avalanche LP incentives"
msgstr ""
+#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+msgid "Net price impact is the sum of the stored impact at increase and the impact at decrease action, which is only settled on position decrease.<0>Read more0>"
+msgstr ""
+
#: src/components/Stake/GMXAprTooltip.tsx
msgid "{nativeTokenSymbol} APR"
msgstr ""
@@ -8358,8 +8363,8 @@ msgid "Failed to update settings"
msgstr ""
#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
-msgid "Positive Price Impact / Fees"
-msgstr ""
+#~ msgid "Positive Price Impact / Fees"
+#~ msgstr ""
#: src/components/Exchange/PositionShare.tsx
msgid "Tweet"
@@ -9155,3 +9160,7 @@ msgstr ""
#: src/pages/Stake/VesterDepositModal.tsx
msgid "Deposit failed!"
msgstr ""
+
+#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+msgid "Price impact rebates for closing trades are claimable under the claims tab. <0>Read more0>"
+msgstr ""
diff --git a/src/locales/ru/messages.po b/src/locales/ru/messages.po
index cfd6446a22..5002aecaa7 100644
--- a/src/locales/ru/messages.po
+++ b/src/locales/ru/messages.po
@@ -304,6 +304,8 @@ msgstr ""
#: src/components/Glp/GlpSwap.jsx
#: src/components/Glp/GlpSwap.jsx
#: src/components/Synthetics/OrderEditor/OrderEditor.tsx
+#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
+#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
#: src/pages/Dashboard/StatsCard.tsx
msgid "Fees"
@@ -2276,8 +2278,8 @@ msgid "Winner:"
msgstr ""
#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
-msgid "Price impact rebates for closing trades are claimable inder this claims tab. <0>Read more0>"
-msgstr ""
+#~ msgid "Price impact rebates for closing trades are claimable inder this claims tab. <0>Read more0>"
+#~ msgstr ""
#: src/pages/Home/Home.tsx
msgid "Total Trading Volume"
@@ -6525,7 +6527,6 @@ msgid "Claim"
msgstr "Запрос"
#: src/components/Synthetics/GmSwap/GmFees/GmFees.tsx
-#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
msgid "Price Impact / Fees"
msgstr ""
@@ -7766,6 +7767,10 @@ msgstr ""
msgid "Avalanche LP incentives"
msgstr ""
+#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+msgid "Net price impact is the sum of the stored impact at increase and the impact at decrease action, which is only settled on position decrease.<0>Read more0>"
+msgstr ""
+
#: src/components/Stake/GMXAprTooltip.tsx
msgid "{nativeTokenSymbol} APR"
msgstr ""
@@ -8358,8 +8363,8 @@ msgid "Failed to update settings"
msgstr ""
#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
-msgid "Positive Price Impact / Fees"
-msgstr ""
+#~ msgid "Positive Price Impact / Fees"
+#~ msgstr ""
#: src/components/Exchange/PositionShare.tsx
msgid "Tweet"
@@ -9155,3 +9160,7 @@ msgstr ""
#: src/pages/Stake/VesterDepositModal.tsx
msgid "Deposit failed!"
msgstr ""
+
+#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+msgid "Price impact rebates for closing trades are claimable under the claims tab. <0>Read more0>"
+msgstr ""
diff --git a/src/locales/zh/messages.po b/src/locales/zh/messages.po
index f5f42fa9ec..46ea36fb07 100644
--- a/src/locales/zh/messages.po
+++ b/src/locales/zh/messages.po
@@ -304,6 +304,8 @@ msgstr ""
#: src/components/Glp/GlpSwap.jsx
#: src/components/Glp/GlpSwap.jsx
#: src/components/Synthetics/OrderEditor/OrderEditor.tsx
+#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
+#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
#: src/pages/Dashboard/StatsCard.tsx
msgid "Fees"
@@ -2276,8 +2278,8 @@ msgid "Winner:"
msgstr ""
#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
-msgid "Price impact rebates for closing trades are claimable inder this claims tab. <0>Read more0>"
-msgstr ""
+#~ msgid "Price impact rebates for closing trades are claimable inder this claims tab. <0>Read more0>"
+#~ msgstr ""
#: src/pages/Home/Home.tsx
msgid "Total Trading Volume"
@@ -6525,7 +6527,6 @@ msgid "Claim"
msgstr "领取"
#: src/components/Synthetics/GmSwap/GmFees/GmFees.tsx
-#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
msgid "Price Impact / Fees"
msgstr ""
@@ -7766,6 +7767,10 @@ msgstr ""
msgid "Avalanche LP incentives"
msgstr ""
+#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+msgid "Net price impact is the sum of the stored impact at increase and the impact at decrease action, which is only settled on position decrease.<0>Read more0>"
+msgstr ""
+
#: src/components/Stake/GMXAprTooltip.tsx
msgid "{nativeTokenSymbol} APR"
msgstr ""
@@ -8358,8 +8363,8 @@ msgid "Failed to update settings"
msgstr ""
#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
-msgid "Positive Price Impact / Fees"
-msgstr ""
+#~ msgid "Positive Price Impact / Fees"
+#~ msgstr ""
#: src/components/Exchange/PositionShare.tsx
msgid "Tweet"
@@ -9155,3 +9160,7 @@ msgstr ""
#: src/pages/Stake/VesterDepositModal.tsx
msgid "Deposit failed!"
msgstr ""
+
+#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+msgid "Price impact rebates for closing trades are claimable under the claims tab. <0>Read more0>"
+msgstr ""
From 873fadc8c90ab7c840522e8099bbe2967e3254c0 Mon Sep 17 00:00:00 2001
From: Divhead <110596516+divhead@users.noreply.github.com>
Date: Wed, 20 Aug 2025 07:48:44 -0700
Subject: [PATCH 27/55] add space
---
src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx b/src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
index f08f635661..fc9c2ef1a0 100644
--- a/src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+++ b/src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
@@ -497,7 +497,7 @@ export function TradeFeesRow(p: Props) {
return (
Net price impact is the sum of the stored impact at increase and the impact at decrease action, which is only
- settled on position decrease.
+ settled on position decrease.{" "}
Read more
From 3691a9fadf9cb8ee2363744a24b38003d65942d7 Mon Sep 17 00:00:00 2001
From: Divhead <110596516+divhead@users.noreply.github.com>
Date: Wed, 20 Aug 2025 08:56:26 -0700
Subject: [PATCH 28/55] fix zero sizeDeltaUsd crash
---
sdk/src/utils/fees/priceImpact.ts | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sdk/src/utils/fees/priceImpact.ts b/sdk/src/utils/fees/priceImpact.ts
index ad7911f987..7dcd17bfd3 100644
--- a/sdk/src/utils/fees/priceImpact.ts
+++ b/sdk/src/utils/fees/priceImpact.ts
@@ -215,7 +215,8 @@ export function getProportionalPendingImpactValues({
indexToken: TokenData;
}) {
// TODO: round up magnitude division
- const proportionalPendingImpactDeltaAmount = bigMath.mulDiv(pendingImpactAmount, sizeDeltaUsd, sizeInUsd);
+ const proportionalPendingImpactDeltaAmount =
+ sizeDeltaUsd !== 0n ? bigMath.mulDiv(pendingImpactAmount, sizeDeltaUsd, sizeInUsd) : 0n;
const proportionalPendingImpactDeltaUsd = convertToUsd(
proportionalPendingImpactDeltaAmount,
From ba82337fa5f5baac471c84efbe6754b3cf77b34d Mon Sep 17 00:00:00 2001
From: midas-myth
Date: Wed, 20 Aug 2025 19:18:04 +0200
Subject: [PATCH 29/55] Multichain prod enhancements
---
sdk/src/configs/chains.ts | 2 +-
sdk/src/configs/contracts.ts | 2 +
src/config/multichain.ts | 76 +++++++++----------
src/config/subgraph.ts | 2 +-
src/domain/multichain/types.ts | 2 +-
.../useGmxAccountFundingHistory.tsx | 2 +-
6 files changed, 42 insertions(+), 44 deletions(-)
diff --git a/sdk/src/configs/chains.ts b/sdk/src/configs/chains.ts
index b4bb8ad050..d032da5ec3 100644
--- a/sdk/src/configs/chains.ts
+++ b/sdk/src/configs/chains.ts
@@ -35,7 +35,7 @@ export type ContractsChainId =
| typeof BOTANIX
| typeof ARBITRUM_SEPOLIA;
-export type SettlementChainId = typeof ARBITRUM_SEPOLIA | typeof ARBITRUM;
+export type SettlementChainId = typeof ARBITRUM_SEPOLIA | typeof ARBITRUM | typeof AVALANCHE;
export type SourceChainId = typeof SOURCE_OPTIMISM_SEPOLIA | typeof SOURCE_SEPOLIA | typeof SOURCE_BASE_MAINNET;
export type AnyChainId = ContractsChainId | SettlementChainId | SourceChainId;
diff --git a/sdk/src/configs/contracts.ts b/sdk/src/configs/contracts.ts
index d273c51ae3..f1474e5994 100644
--- a/sdk/src/configs/contracts.ts
+++ b/sdk/src/configs/contracts.ts
@@ -83,6 +83,7 @@ export const CONTRACTS = {
Multicall: "0xe79118d6D92a4b23369ba356C90b9A7ABf1CB961",
ArbitrumNodeInterface: "0x00000000000000000000000000000000000000C8",
LayerZeroEndpoint: "0x1a44076050125825900e736c501f859c50fE728c",
+ GelatoRelayAddress: "0xaBcC9b596420A9E9172FD5938620E265a0f9Df92",
},
[AVALANCHE]: {
Vault: "0x9ab2De34A33fB459b538c43f251eB825645e8595",
@@ -461,6 +462,7 @@ export const CONTRACTS = {
NATIVE_TOKEN: "0x980B62Da83eFf3D4576C647993b0c1D7faf17c73",
LayerZeroEndpoint: "0x6EDCE65403992e310A62460808c4b910D972f10f",
ArbitrumNodeInterface: "0x00000000000000000000000000000000000000C8",
+ // TODO: it seems its also 0xaBcC9b596420A9E9172FD5938620E265a0f9Df92
GelatoRelayAddress: "0xcd565435e0d2109feFde337a66491541Df0D1420",
GLP: zeroAddress,
diff --git a/src/config/multichain.ts b/src/config/multichain.ts
index 8191266865..90bc41c6e1 100644
--- a/src/config/multichain.ts
+++ b/src/config/multichain.ts
@@ -1,11 +1,11 @@
import { errors as _StargateErrorsAbi } from "@stargatefinance/stg-evm-sdk-v2";
import { abi as IStargateAbi } from "@stargatefinance/stg-evm-sdk-v2/artifacts/src/interfaces/IStargate.sol/IStargate.json";
import { address as ethPoolArbitrum } from "@stargatefinance/stg-evm-sdk-v2/deployments/arbitrum-mainnet/StargatePoolNative.json";
-import { address as usdcSgPoolArbitrum } from "@stargatefinance/stg-evm-sdk-v2/deployments/arbitrum-mainnet/StargatePoolUSDC.json";
+import { address as usdcPoolArbitrum } from "@stargatefinance/stg-evm-sdk-v2/deployments/arbitrum-mainnet/StargatePoolUSDC.json";
import { address as ethPoolArbitrumSepolia } from "@stargatefinance/stg-evm-sdk-v2/deployments/arbsep-testnet/StargatePoolNative.json";
import { address as usdcSgPoolArbitrumSepolia } from "@stargatefinance/stg-evm-sdk-v2/deployments/arbsep-testnet/StargatePoolUSDC.json";
import { address as ethPoolBase } from "@stargatefinance/stg-evm-sdk-v2/deployments/base-mainnet/StargatePoolNative.json";
-import { address as usdcSgPoolBase } from "@stargatefinance/stg-evm-sdk-v2/deployments/base-mainnet/StargatePoolUSDC.json";
+import { address as usdcPoolBase } from "@stargatefinance/stg-evm-sdk-v2/deployments/base-mainnet/StargatePoolUSDC.json";
import { address as ethPoolOptimismSepolia } from "@stargatefinance/stg-evm-sdk-v2/deployments/optsep-testnet/StargatePoolNative.json";
import { address as usdcSgPoolOptimismSepolia } from "@stargatefinance/stg-evm-sdk-v2/deployments/optsep-testnet/StargatePoolUSDC.json";
import { address as ethPoolSepolia } from "@stargatefinance/stg-evm-sdk-v2/deployments/sepolia-testnet/StargatePoolNative.json";
@@ -36,8 +36,6 @@ import { LayerZeroEndpointId } from "domain/multichain/types";
import { numberToBigint } from "lib/numbers";
import { convertTokenAddress, getTokenBySymbol } from "sdk/configs/tokens";
-import { IS_SOURCE_BASE_ALLOWED_KEY } from "./localStorage";
-
export {
ethPoolArbitrumSepolia,
ethPoolOptimismSepolia,
@@ -82,24 +80,23 @@ export type MultichainTokenId = {
decimals: number;
stargate: string;
symbol: string;
+ isTestnet?: boolean;
};
-export const TOKEN_GROUPS: Partial<
- Record>>
-> = {
+const TOKEN_GROUPS: Partial>>> = {
["USDC"]: {
[ARBITRUM]: {
address: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
decimals: 6,
chainId: ARBITRUM,
- stargate: usdcSgPoolArbitrum,
+ stargate: usdcPoolArbitrum,
symbol: "USDC",
},
[SOURCE_BASE_MAINNET]: {
address: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
decimals: 6,
chainId: SOURCE_BASE_MAINNET,
- stargate: usdcSgPoolBase,
+ stargate: usdcPoolBase,
symbol: "USDC",
},
},
@@ -130,6 +127,7 @@ if (isDevelopment()) {
chainId: ARBITRUM_SEPOLIA,
stargate: usdcSgPoolArbitrumSepolia,
symbol: "USDC.SG",
+ isTestnet: true,
},
[SOURCE_OPTIMISM_SEPOLIA]: {
address: "0x488327236B65C61A6c083e8d811a4E0D3d1D4268",
@@ -137,6 +135,7 @@ if (isDevelopment()) {
chainId: SOURCE_OPTIMISM_SEPOLIA,
stargate: usdcSgPoolOptimismSepolia,
symbol: "USDC.SG",
+ isTestnet: true,
},
[SOURCE_SEPOLIA]: {
address: "0x2F6F07CDcf3588944Bf4C42aC74ff24bF56e7590",
@@ -144,6 +143,7 @@ if (isDevelopment()) {
chainId: SOURCE_SEPOLIA,
stargate: usdcSgPoolSepolia,
symbol: "USDC.SG",
+ isTestnet: true,
},
};
@@ -155,6 +155,7 @@ if (isDevelopment()) {
chainId: ARBITRUM_SEPOLIA,
stargate: ethPoolArbitrumSepolia,
symbol: "ETH",
+ isTestnet: true,
},
[SOURCE_OPTIMISM_SEPOLIA]: {
address: zeroAddress,
@@ -162,6 +163,7 @@ if (isDevelopment()) {
chainId: SOURCE_OPTIMISM_SEPOLIA,
stargate: ethPoolOptimismSepolia,
symbol: "ETH",
+ isTestnet: true,
},
[SOURCE_SEPOLIA]: {
address: zeroAddress,
@@ -169,12 +171,13 @@ if (isDevelopment()) {
chainId: SOURCE_SEPOLIA,
stargate: ethPoolSepolia,
symbol: "ETH",
+ isTestnet: true,
},
};
}
export const DEBUG_MULTICHAIN_SAME_CHAIN_DEPOSIT = false;
-export const IS_SOURCE_BASE_ALLOWED = localStorage.getItem(IS_SOURCE_BASE_ALLOWED_KEY) === "1";
+export const IS_SOURCE_BASE_ALLOWED = true; // localStorage.getItem(IS_SOURCE_BASE_ALLOWED_KEY) === "1";
function ensureExhaustive(value: Record): T[] {
return Object.keys(value).map(Number) as T[];
@@ -191,13 +194,15 @@ export const CONTRACTS_CHAINS: ContractsChainId[] = ensureExhaustive({
[ARBITRUM_SEPOLIA]: true,
[ARBITRUM]: true,
+ [AVALANCHE]: true,
});
// TODO MLTCH remove this
+// @ts-ignore
export const SOURCE_CHAINS: SourceChainId[] = ensureExhaustive({
[SOURCE_OPTIMISM_SEPOLIA]: true,
[SOURCE_SEPOLIA]: true,
- [SOURCE_BASE_MAINNET]: true,
+ // [SOURCE_BASE_MAINNET]: true,
});
if (IS_SOURCE_BASE_ALLOWED) {
@@ -205,7 +210,7 @@ if (IS_SOURCE_BASE_ALLOWED) {
}
if (isDevelopment() && DEBUG_MULTICHAIN_SAME_CHAIN_DEPOSIT) {
- SOURCE_CHAINS.push(ARBITRUM_SEPOLIA as SourceChainId, ARBITRUM as SourceChainId);
+ SOURCE_CHAINS.push(ARBITRUM_SEPOLIA as SourceChainId, ARBITRUM as SourceChainId, AVALANCHE as SourceChainId);
}
export function isContractsChain(chainId: number): chainId is ContractsChainId {
@@ -233,19 +238,19 @@ export const MULTI_CHAIN_SOURCE_TO_SETTLEMENTS_MAPPING: MultichainSourceToSettle
for (const tokenSymbol in TOKEN_GROUPS) {
for (const chainIdString in TOKEN_GROUPS[tokenSymbol]) {
- const chainId = parseInt(chainIdString) as SettlementChainId | SourceChainId;
+ const firstChainId = parseInt(chainIdString) as SettlementChainId | SourceChainId;
- const tokenId = TOKEN_GROUPS[tokenSymbol]?.[chainId];
+ const tokenId = TOKEN_GROUPS[tokenSymbol]![firstChainId]!;
if (tokenId) {
- CHAIN_ID_TO_TOKEN_ID_MAP[chainId] = CHAIN_ID_TO_TOKEN_ID_MAP[chainId] || {};
- CHAIN_ID_TO_TOKEN_ID_MAP[chainId][tokenId.address] = tokenId;
+ CHAIN_ID_TO_TOKEN_ID_MAP[firstChainId] = CHAIN_ID_TO_TOKEN_ID_MAP[firstChainId] || {};
+ CHAIN_ID_TO_TOKEN_ID_MAP[firstChainId][tokenId.address] = tokenId;
}
- if (!isSettlementChain(chainId)) {
+ if (!isSettlementChain(firstChainId)) {
continue;
}
- const settlementChainId = chainId;
+ const settlementChainId = firstChainId;
let empty = true;
for (const sourceChainIdString in TOKEN_GROUPS[tokenSymbol]) {
@@ -257,6 +262,13 @@ for (const tokenSymbol in TOKEN_GROUPS) {
if (!isDevelopment() && (settlementChainId as number) === (sourceChainId as number)) {
continue;
}
+
+ const sourceChainToken = TOKEN_GROUPS[tokenSymbol]![sourceChainId]!;
+
+ if (Boolean(tokenId?.isTestnet) !== Boolean(sourceChainToken?.isTestnet)) {
+ continue;
+ }
+
empty = false;
MULTI_CHAIN_SOURCE_TO_SETTLEMENTS_MAPPING[sourceChainId] =
@@ -269,36 +281,18 @@ for (const tokenSymbol in TOKEN_GROUPS) {
MULTI_CHAIN_TOKEN_MAPPING[settlementChainId][sourceChainIdString] =
MULTI_CHAIN_TOKEN_MAPPING[settlementChainId][sourceChainIdString] || {};
- const settlementToken = TOKEN_GROUPS[tokenSymbol]?.[settlementChainId];
-
- if (!settlementToken) {
- continue;
- }
-
- const sourceChainToken = TOKEN_GROUPS[tokenSymbol]?.[sourceChainId];
-
- if (!sourceChainToken) {
- continue;
- }
-
MULTI_CHAIN_TOKEN_MAPPING[settlementChainId][sourceChainIdString][sourceChainToken.address] = {
- settlementChainTokenAddress: settlementToken.address,
+ settlementChainTokenAddress: tokenId.address,
sourceChainTokenAddress: sourceChainToken.address,
sourceChainTokenDecimals: sourceChainToken.decimals,
};
}
if (!empty) {
- const settlementToken = TOKEN_GROUPS[tokenSymbol]?.[settlementChainId];
-
- if (!settlementToken) {
- continue;
- }
-
MULTI_CHAIN_TRANSFER_SUPPORTED_TOKENS[settlementChainId] =
MULTI_CHAIN_TRANSFER_SUPPORTED_TOKENS[settlementChainId] || [];
MULTI_CHAIN_TRANSFER_SUPPORTED_TOKENS[settlementChainId].push(
- convertTokenAddress(settlementChainId, settlementToken.address, "wrapped")
+ convertTokenAddress(settlementChainId, tokenId.address, "wrapped")
);
}
}
@@ -368,8 +362,9 @@ export const OVERRIDE_ERC20_BYTECODE: Hex =
"0x608060405234801561001057600080fd5b50600436106100835760003560e01c806306fdde0314610088578063095ea7b3146100ca57806318160ddd146100ed57806323b872dd14610103578063313ce5671461011657806370a082311461012557806395d89b4114610138578063a9059cbb14610157578063dd62ed3e1461016a575b600080fd5b60408051808201909152601481527326b7b1b5902ab73634b6b4ba32b2102a37b5b2b760611b60208201525b6040516100c191906103ae565b60405180910390f35b6100dd6100d8366004610418565b61017d565b60405190151581526020016100c1565b6100f56101ea565b6040519081526020016100c1565b6100dd610111366004610442565b6101fe565b604051601281526020016100c1565b6100f561013336600461047e565b6102c6565b60408051808201909152600381526213555560ea1b60208201526100b4565b6100dd610165366004610418565b6102fa565b6100f5610178366004610499565b610374565b3360008181526001602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906101d89086815260200190565b60405180910390a35060015b92915050565b60006101f960026000196104e2565b905090565b60008161020b8533610374565b6102159190610504565b6001600160a01b038516600090815260016020908152604080832033845290915290205581610243856102c6565b61024d9190610504565b6001600160a01b03851660009081526020819052604090205581610270846102c6565b61027a9190610517565b6001600160a01b0384811660008181526020818152604091829020949094555185815290929187169160008051602061052b833981519152910160405180910390a35060019392505050565b6001600160a01b0381166000908152602081905260408120548082036101e4576102f360026000196104e2565b9392505050565b600081610306336102c6565b6103109190610504565b33600081815260208190526040902091909155829061032e906102c6565b6103389190610517565b6001600160a01b0384166000818152602081815260409182902093909355518481529091339160008051602061052b83398151915291016101d8565b6001600160a01b0380831660009081526001602090815260408083209385168352929052908120548082036102f3576000199150506101e4565b600060208083528351808285015260005b818110156103db578581018301518582016040015282016103bf565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461041357600080fd5b919050565b6000806040838503121561042b57600080fd5b610434836103fc565b946020939093013593505050565b60008060006060848603121561045757600080fd5b610460846103fc565b925061046e602085016103fc565b9150604084013590509250925092565b60006020828403121561049057600080fd5b6102f3826103fc565b600080604083850312156104ac57600080fd5b6104b5836103fc565b91506104c3602084016103fc565b90509250929050565b634e487b7160e01b600052601160045260246000fd5b6000826104ff57634e487b7160e01b600052601260045260246000fd5b500490565b818103818111156101e4576101e46104cc565b808201808211156101e4576101e46104cc56feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa26469706673582212207e80951b693900018ccbef67c898d93845d4dd2e0d8bee24a96e72ecb4b5a8bd64736f6c63430008140033";
export const CHAIN_ID_PREFERRED_DEPOSIT_TOKEN: Record = {
- [ARBITRUM_SEPOLIA]: "0x3253a335E7bFfB4790Aa4C25C4250d206E9b9773",
- [ARBITRUM]: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
+ [ARBITRUM_SEPOLIA]: "0x3253a335E7bFfB4790Aa4C25C4250d206E9b9773", // USDC.SG
+ [ARBITRUM]: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", // USDC
+ [AVALANCHE]: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", // USDC
};
export const MULTICHAIN_FUNDING_SLIPPAGE_BPS = 50;
@@ -382,6 +377,7 @@ export const CHAIN_ID_TO_ENDPOINT_ID: Record> =
diff --git a/src/config/subgraph.ts b/src/config/subgraph.ts
index 9de283515d..7f2b19d8ab 100644
--- a/src/config/subgraph.ts
+++ b/src/config/subgraph.ts
@@ -8,7 +8,7 @@ const SUBGRAPH_URLS = {
referrals: "https://subgraph.satsuma-prod.com/3b2ced13c8d9/gmx/gmx-arbitrum-referrals/api",
nissohVault: "https://api.thegraph.com/subgraphs/name/nissoh/gmx-vault",
syntheticsStats: "https://subgraph.satsuma-prod.com/3b2ced13c8d9/gmx/synthetics-arbitrum-stats/api",
- subsquid: "https://gmx.squids.live/gmx-synthetics-arbitrum:prod/api/graphql",
+ subsquid: "https://gmx-test.squids.live/multichain-arbitrum@33e7e9/api/graphql",
},
[AVALANCHE]: {
diff --git a/src/domain/multichain/types.ts b/src/domain/multichain/types.ts
index eab368aa9f..97c9855e53 100644
--- a/src/domain/multichain/types.ts
+++ b/src/domain/multichain/types.ts
@@ -41,7 +41,7 @@ export type StrippedGeneratedType = Omit;
export type BridgeOutParams = StrippedGeneratedType;
-export type LayerZeroEndpointId = 40161 | 40231 | 40232 | 30184 | 30110;
+export type LayerZeroEndpointId = 40161 | 40231 | 40232 | 30184 | 30110 | 30106;
export type QuoteOft = {
limit: OFTLimitStruct;
diff --git a/src/domain/multichain/useGmxAccountFundingHistory.tsx b/src/domain/multichain/useGmxAccountFundingHistory.tsx
index cb0efe7811..af9c6fd7a3 100644
--- a/src/domain/multichain/useGmxAccountFundingHistory.tsx
+++ b/src/domain/multichain/useGmxAccountFundingHistory.tsx
@@ -94,7 +94,7 @@ export function useGmxAccountFundingHistory(opts?: { enabled?: boolean }): {
const { pendingMultichainFunding, updatePendingMultichainFunding } = useSyntheticsEvents();
const { data, isLoading } = useSWR(
- account && opts?.enabled !== false ? ["gmx-account-funding-history", account] : null,
+ account && opts?.enabled !== false ? [chainId, "gmx-account-funding-history", account] : null,
{
fetcher: () => fetchGmxAccountFundingHistory(chainId, { account }),
refreshInterval: FREQUENT_UPDATE_INTERVAL,
From 9b3e51b4829950cf33707039b4046243c832aa6a Mon Sep 17 00:00:00 2001
From: midas-myth
Date: Wed, 20 Aug 2025 19:29:53 +0200
Subject: [PATCH 30/55] Multichain prod new squid
---
src/config/subgraph.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/config/subgraph.ts b/src/config/subgraph.ts
index 7f2b19d8ab..143de25979 100644
--- a/src/config/subgraph.ts
+++ b/src/config/subgraph.ts
@@ -8,7 +8,7 @@ const SUBGRAPH_URLS = {
referrals: "https://subgraph.satsuma-prod.com/3b2ced13c8d9/gmx/gmx-arbitrum-referrals/api",
nissohVault: "https://api.thegraph.com/subgraphs/name/nissoh/gmx-vault",
syntheticsStats: "https://subgraph.satsuma-prod.com/3b2ced13c8d9/gmx/synthetics-arbitrum-stats/api",
- subsquid: "https://gmx-test.squids.live/multichain-arbitrum@33e7e9/api/graphql",
+ subsquid: "https://gmx-test.squids.live/multichain-arbitrum@7c1315/api/graphql",
},
[AVALANCHE]: {
From 1aa8ca184070e3ad5be19b4390cfca143ac4fbb8 Mon Sep 17 00:00:00 2001
From: midas-myth
Date: Thu, 21 Aug 2025 15:43:45 +0200
Subject: [PATCH 31/55] Multichain new testnet contracts
---
sdk/src/configs/chains.ts | 3 -
sdk/src/configs/contracts.ts | 178 ++++++++---------------------------
2 files changed, 40 insertions(+), 141 deletions(-)
diff --git a/sdk/src/configs/chains.ts b/sdk/src/configs/chains.ts
index d032da5ec3..0ca2951d28 100644
--- a/sdk/src/configs/chains.ts
+++ b/sdk/src/configs/chains.ts
@@ -18,9 +18,6 @@ export const ARBITRUM = 42161;
export const ETH_MAINNET = 1;
export const BOTANIX = 3637;
export const SOURCE_BASE_MAINNET = 8453;
-// export const BASE_SEPOLIA = 84532;
-export const SOURCE_SONIC_MAINNET = 146;
-// export const SONIC_BLAZE = 57054;
export const ARBITRUM_SEPOLIA = 421614;
export const SOURCE_OPTIMISM_SEPOLIA = 11155420;
export const SOURCE_SEPOLIA = 11155111;
diff --git a/sdk/src/configs/contracts.ts b/sdk/src/configs/contracts.ts
index f1474e5994..284150116b 100644
--- a/sdk/src/configs/contracts.ts
+++ b/sdk/src/configs/contracts.ts
@@ -293,170 +293,70 @@ export const CONTRACTS = {
// Synthetics
DataStore: "0xEA1BFb4Ea9A412dCCd63454AbC127431eBB0F0d4",
EventEmitter: "0xc67D98AC5803aFD776958622CeEE332A0B2CabB9",
- ExchangeRouter: "0x8B1E5eE30cBd0CB18C3136A720eA3ebfc785836c",
- SubaccountRouter: "0x8Cb799151C3303aAce26b84c4596ffbad8Bcb920",
+ ExchangeRouter: "0x0a458C96Ac0B2a130DA4BdF1aAdD4cb7Be036d11",
+ SubaccountRouter: "0xD5EE3ECAF5754CE5Ff74847d0caf094EBB12ed5e",
DepositVault: "0x2964d242233036C8BDC1ADC795bB4DeA6fb929f2",
WithdrawalVault: "0x74d49B6A630Bf519bDb6E4efc4354C420418A6A2",
OrderVault: "0x25D23e8E655727F2687CC808BB9589525A6F599B",
ShiftVault: "0x257D0EA0B040E2Cd1D456fB4C66d7814102aD346",
- SyntheticsReader: "0xE08e8f2eDb07c867550138844DaC95f8D7a05Dba",
+ SyntheticsReader: "0xf82Cc6EB57F8FF86bc5c5e90B8BA83DbBFB517eE",
SyntheticsRouter: "0x5e7d61e4C52123ADF651961e4833aCc349b61491",
Timelock: zeroAddress,
- GlvReader: "0x2BC9A8B1cBaa1Daafe0961a720F7eC5604395dA5",
- GlvRouter: "0x2579A3aabF98aF7837AeA56150db7AcCd2D4D510",
+ GlvReader: "0xdeaC9ea3c72C102f2a9654b8E1A14Ef86Cdd3146",
+ GlvRouter: "0x6B6595389A0196F882C0f66CB1F401f1D24afEdC",
GlvVault: "0x76f93b5240DF811a3fc32bEDd58daA5784e46C96",
- GelatoRelayRouter: "0x72031964Ea99B4Cc7B0Cd950dD47B38858245bA7",
- SubaccountGelatoRelayRouter: "0xd09438351fa099E9399e87A7dE5d872b7C393D47",
+ GelatoRelayRouter: "0xC2917611f422b1624D7316375690B532c149F54b",
+ SubaccountGelatoRelayRouter: "0x9022ADce7c964852475aB0de801932BaDEB0C765",
- MultichainClaimsRouter: "0x09A83128662BecD90Ef05aE35b263d64bb607772",
- MultichainGlvRouter: "0x6eEc92Dd5a053DB1b69f68973bD5af2cDd061396",
- MultichainGmRouter: "0xBE5525CB5579DC17d939A6cC534d8ed82F850941",
- MultichainOrderRouter: "0x2F5BDE1Ac9d2A214cDD8Fccd00eC91C3366cA86B",
- MultichainSubaccountRouter: "0x04eB8e0908cB35dFcB27B5179E4ACadde77ab964",
- MultichainTransferRouter: "0x0dFbd93FFEea4504d560de301f116B53b7CD89f7",
+ MultichainClaimsRouter: "0xa080c3E026467E1fa6E76D29A057Bf1261a4ec86",
+ MultichainGlvRouter: "0x5060A75868ca21A54C650a70E96fa92405831b15",
+ MultichainGmRouter: "0xe32632F65198eF3080ccDe22A6d23819203dBc42",
+ MultichainOrderRouter: "0x6169DD9Bc75B1d4B7138109Abe58f5645BA6B8fE",
+ MultichainSubaccountRouter: "0xa51181CC37D23d3a4b4B263D2B54e1F34B834432",
+ MultichainTransferRouter: "0x0bD6966B894D9704Ce540babcd425C93d2BD549C",
MultichainVault: "0xFd86A5d9D6dF6f0cB6B0e6A18Bea7CB07Ada4F79",
+ ChainlinkPriceFeedProvider: "0x2e149AbC99cDC98FB0207d6F184DC323CEBB955B",
+
OpenOceanRouter: zeroAddress,
ExternalHandler: "0x0d9F90c66C392c4d0e70EE0d399c43729B942512",
- ChainlinkPriceFeedProvider: "0x2e149AbC99cDC98FB0207d6F184DC323CEBB955B",
-
Multicall: "0x966D1F5c54a714C6443205F0Ec49eEF81F10fdfD",
ArbitrumNodeInterface: zeroAddress,
LayerZeroEndpoint: "0x6EDCE65403992e310A62460808c4b910D972f10f",
},
[ARBITRUM_SEPOLIA]: {
- AdlHandler: "0x3A54eC9488Ca1E928771d4E1AE4D06329f1fC41b",
- AdlUtils: "0x10b85eF02d377820CC48fA575A90032509681302",
- AutoCancelSyncer: "0x6F331c14c75e612fe7c1548Be29C35C950dD56Ca",
- BaseOrderUtils: "0x0C16D58832a5033EB70c48604221Bfc6945d8d60",
- BridgeOutFromControllerUtils: "0xe8da43Ea356ee5ae2F90CcdAF220616825d9cACc",
- CallbackUtils: "0x432182832beac1E0040b0B64A75Dae94754F8C52",
- ChainReader: "0xc0a69Bfd86756B9e197c5fD85b8A9567584680Ee",
- ChainlinkDataStreamProvider: "0x13d6133F9ceE27B6C9A4559849553F10A45Bd9a4",
- ChainlinkPriceFeedProvider: "0xa76BF7f977E80ac0bff49BDC98a27b7b070a937d",
- Config: "0x14f3dB54517Ce001889103Ec851A31cd2b09dFB5",
- ConfigSyncer: "0xffA7Ec1e9538d2dEEe6cb04809A3503584EAfBCC",
- ConfigTimelockController: "0xFA2C1E93A43f7a0EaB106113F5453495bc9F59fE",
- ConfigUtils: "0xFAb7323ef0c081F8ae7e3674c81de96B1468B70d",
DataStore: "0xCF4c2C4c53157BcC01A596e3788fFF69cBBCD201",
- DecreaseOrderExecutor: "0x6A9451772065D54796ed99E9A0A7654d218D54E9",
- DecreaseOrderUtils: "0x8a583fd4368bE50097d06dC5bBb2D22eD701F0e4",
- DecreasePositionCollateralUtils: "0x61e975C8CAaa56FBA0913622F6036F3387A20bc5",
- DecreasePositionSwapUtils: "0xc9e4dbA9c480ec3d497d96BcdeA57f2886247E50",
- DecreasePositionUtils: "0x040025a1E2BBc7cb5da83471c2557f4Cf377dC44",
- DepositEventUtils: "0x4362b48dFB055075BC280664C0457763E4Bd8F0F",
- DepositHandler: "0xdBd68C59F3846F412aA84349Ab10199ef3A8Ee52",
- DepositStoreUtils: "0xF5D226E9ba5BE8df23B469F5cAfb027B0e264b46",
- DepositUtils: "0x6Cb4a5012645738b7480a57fc88e62f2d9A34af5",
- DepositVault: "0x809Ea82C394beB993c2b6B0d73b8FD07ab92DE5A",
- EdgeDataStreamProvider: "0x3737fAe5723417C45F30E94A16579c8A06e940AF",
- EdgeDataStreamVerifier: "0x14e56F01ceD87DD9B2A713779F0675Bf74B1b7f6",
EventEmitter: "0xa973c2692C1556E1a3d478e745e9a75624AEDc73",
- ExchangeRouter: "0xc69DfBCB63e89D0E89131882a93f86D963162814",
- ExecuteDepositUtils: "0xBc96A5E70B34eD7A621e9C507115d755B9DA82AF",
- ExecuteGlvDepositUtils: "0x5d929CD890f7Eb430d86DF423e29a7A23d6fBdB3",
- ExecuteOrderUtils: "0x761552369017948e84695874060fff63599763DB",
- ExecuteWithdrawalUtils: "0x1087AA9B729AB3810Bb9AC6e22aF666DA7b431D5",
- ExternalHandler: "0x2303b33c2895871ae45AD8fEBCB52275657c9F9d",
- FeeUtils: "0x653E068F4252c7c44fd53bf8c1d23B53e5D263DC",
- GasUtils: "0x9f06c801F2F04916a5B53B86ad9F37b405b22352",
- GelatoRelayRouter: "0x6036B0B58cb4683f09078861FC0dE31f063E967a",
- GlvDepositCalc: "0x196dD5e96631D9d3e5dcd3A34D80a5747f942515",
- GlvDepositEventUtils: "0x1a0F5661B3dd84e13C308a6B7D481b966c64C332",
- GlvDepositHandler: "0xCF8C0D553970960B538A9802581d25388469377C",
- GlvDepositStoreUtils: "0x8e24d6D709266b043Ea33df296a824c41Fe7F49C",
- GlvDepositUtils: "0x43E3301BeA8102b26272E04Eb7375536ff0AC833",
- GlvFactory: "0x69b3F09A3161e2FB9bf351e4F58575b512099994",
- GlvReader: "0x0B3D1c036eb6F4a70b62Dea5F2f88F19Cc0C94Ce",
- GlvRouter: "0xA8323570D06E345B34642262cC0148E92739AF3B",
- GlvShiftEventUtils: "0x6d1153db00897126D773b14fda07cE697d726839",
- GlvShiftHandler: "0x573d5323850D06163832b485f5029df909ca6896",
- GlvShiftStoreUtils: "0xa4DDd7300d79C593a8A82A3376A8040218b11eaA",
- GlvShiftUtils: "0x7B0B12328e04c5Fd668C4bC95e5fa3f7a494D677",
- GlvStoreUtils: "0xbC2C1132105C84661E5f39735941f02Eff2046C0",
- GlvUtils: "0x6E48D4E7baA8ad4B279904D0cE035BAB0f077CBD",
+ ExchangeRouter: "0x657F9215FA1e839FbA15cF44B1C00D95cF71ed10",
+ SubaccountRouter: "0x7d4dD31B32F6Ae51893B6cffCAb15E75eA30D69b",
+ DepositVault: "0x809Ea82C394beB993c2b6B0d73b8FD07ab92DE5A",
+ WithdrawalVault: "0x7601c9dBbDCf1f5ED1E7Adba4EFd9f2cADa037A5",
+ OrderVault: "0x1b8AC606de71686fd2a1AEDEcb6E0EFba28909a2",
+ ShiftVault: "0x6b6F9B7B9a6b69942DAE74FB95E694ec277117af",
+ SyntheticsReader: "0x37a0A165389B2f959a04685aC8fc126739e86926",
+ SyntheticsRouter: "0x72F13a44C8ba16a678CAD549F17bc9e06d2B8bD2",
+
+ GlvReader: "0x4843D570c726cFb44574c1769f721a49c7e9c350",
+ GlvRouter: "0x7F8af0741e8925C132E84147762902EBBc485d11",
GlvVault: "0x40bD50de0977c68ecB958ED4A065E14E1091ce64",
- GlvWithdrawalEventUtils: "0x58f80A8477a7c4020D2D3A5f9c3b0DdC03221494",
- GlvWithdrawalHandler: "0xE088Df8B5e9202E0Df31B5704FE7256C06ecA9D3",
- GlvWithdrawalStoreUtils: "0x9f682f441814A47e8C92dE8bDD51c51CdF3C7d94",
- GlvWithdrawalUtils: "0xA680897BC3A0EF5558A677019cAE1847c0334006",
- GmOracleProvider: "0xFcE6f3D7a312C16ddA64dB049610f3fa4a477627",
- GovTimelockController: "0xb1854C5CfB3D25be6198972d5c3AEa0592e933a4",
- GovToken: "0x709ffF9f1d8D890521D48D3FfC86E6a88244edF8",
- IncreaseOrderExecutor: "0x76e9Db737D39aDc23E3d8D24961ad1dA4d1652Df",
- IncreaseOrderUtils: "0x9ccc0FCf0077690eD15aB90D911f96c924F22FF2",
- IncreasePositionUtils: "0xc214e5f16079A8b2de1EE2976728A184E1a0cFBd",
- LayerZeroProvider: "0xa7eCDc6Ba5CB88fce2B7E331c1bB55b3D77d2926",
- LiquidationHandler: "0xDa7cB6CFd67DFe3EBDeEEFC4BDc63598C9601CcA",
- LiquidationUtils: "0xd7895B038d96E76EDCE71C774F105b9e0c12762B",
- MarketEventUtils: "0xEf579d03fB3581Fe7C639AE6153C056F527a6881",
- MarketFactory: "0x1934838E3d85416A6cF5bF7A5E619f12BE01C4b2",
- MarketPositionImpactPoolUtils: "0x6145aC381129cB6AF66D59AA431dF232820057cC",
- MarketStoreUtils: "0xE2BD964b66c3Cf61B91b041e37AE8A3bD552cB38",
- MarketUtils: "0x7891Da707479c63C6b8Ffde19A4b70Eeac7B0314",
- MockPriceFeed: "0x1Cb9B3Ec42e99Ec28A3f2DCEbDf7BF17D2b12970",
- Multicall3: "0xD84793ae65842fFac5C20Ab8eaBD699ea1FC79F3",
- MultichainClaimsRouter: "0x9812aD52308D141e579C55BE4B16456077d14097",
- MultichainGlvRouter: "0xde457D5A291737F62c86ac7190c3CD91B7030939",
- MultichainGmRouter: "0x801927af2d2F692582fb6f737B31d8508D337658",
- MultichainOrderRouter: "0x7727E80A396Bc999a26439DbbE9F762A0b2a2421",
- MultichainSubaccountRouter: "0xCA029324581F9E0d3740b0Be828E309A3571f391",
- MultichainTransferRouter: "0x65E5dBa8d9c7a9000BfC4FBE979cd822B29e99e5",
- MultichainUtils: "0x48361663c5691c977dd37F13c3155580D2ca258D",
+
+ GelatoRelayRouter: "0x44904137A4d8734a5AB13B32083FFd6B93664491",
+ SubaccountGelatoRelayRouter: "0x209E4408D68EE049957dBba7Ac62177f10ee00ab",
+
+ MultichainClaimsRouter: "0xe06534c26c90AE8c3241BC90dDB69d4Af438f17f",
+ MultichainGlvRouter: "0x29b9a624a29327b1c76317bfF08373281c582B79",
+ MultichainGmRouter: "0x9868Ab73D1cB4DcEEd74e5eB9f86346C935488F3",
+ MultichainOrderRouter: "0x2B977188b3Bf8fbCa2Ca5D6e00DC8542b7690C9E",
+ MultichainSubaccountRouter: "0xf8fbE9411f90618B3c68A8826555Ab54dE090ED7",
+ MultichainTransferRouter: "0xeCfcA6af46B9d20793f82b28bc749dfFC6DEE535",
MultichainVault: "0xCd46EF5ed7d08B345c47b5a193A719861Aa2CD91",
- Oracle: "0x0dC4e24C63C24fE898Dda574C962Ba7Fbb146964",
- OracleStore: "0x322F621C9fDb9faa4993Ba1fECBE4666138B1435",
- OrderEventUtils: "0xEc8B70bEa27f41E44e6aFFBf184457fb18c5defe",
- OrderHandler: "0x8b26CB1aCb45CdB9724fFE05502175401Ac3848a",
- OrderStoreUtils: "0x18eaB02Eb176746201F059b9F7DE4391a476a9A6",
- OrderUtils: "0xF34AAD64F3B5Cd1FDA9d3265159dAD253e85A76F",
- OrderVault: "0x1b8AC606de71686fd2a1AEDEcb6E0EFba28909a2",
- PositionEventUtils: "0x8Ef394A9875B9eC54650B47da61B068EaFc85e29",
- PositionImpactPoolUtils: "0x162565eA13325b0f4Ea4463036719F2a3A1fBA0E",
- PositionPricingUtils: "0xBf754661D25e225083f47a52751375B7736F4182",
- PositionStoreUtils: "0x46aE3c4Df0F88D0e711E2C3a56994A53d2776cCb",
- PositionUtils: "0x5D15A730dCA65Cb03C2B900d3840Fa08CB1CF4f0",
- Printer: "0xF8FE4F61EdC4A60dE6E664c4C65ADdA76ca66c2e",
- ProtocolGovernor: "0xB3ACb426F4b586d7E4cAAa4882d97f65AB55E96a",
- // Technically it is just Reader
- SyntheticsReader: "0x082B73c1850A89B2F14358B91Bb471d9985F0791",
- ReaderDepositUtils: "0x0cea152851869E592517e606323932AF10C4A6f7",
- ReaderPositionUtils: "0xEf86F05E8600558ba298d90dd14C882aa10b9Ff9",
- ReaderPricingUtils: "0x442Fd6bf54e936F160836f5FFCE77a43101fB750",
- ReaderUtils: "0xaad49ef58c4D0AD5CE64Df37202084df323741A2",
- ReaderWithdrawalUtils: "0x8cE0be74D614CF1aC9e552F83C4966fb56DBA55d",
- ReferralEventUtils: "0xC4764942713Eb823C155a092258eA7dFF6657DD3",
+
+ ChainlinkPriceFeedProvider: "0xa76BF7f977E80ac0bff49BDC98a27b7b070a937d",
ReferralStorage: "0xBbCdA58c228Bb29B5769778181c81Ac8aC546c11",
- ReferralUtils: "0xfBdcB30FBDA8Cb461900010df87D7b962dCBCDBa",
- RelayUtils: "0xfb4b584a21dD2b41643a47648Ea80614F935B8F0",
- RoleStore: "0x433E3C47885b929aEcE4149E3c835E565a20D95c",
- // Technically it is just Router
- SyntheticsRouter: "0x72F13a44C8ba16a678CAD549F17bc9e06d2B8bD2",
- ShiftEventUtils: "0x2E1dFbc1f67D45064C5230E27B3FE0688889cE7B",
- ShiftHandler: "0x170aC7124887C7aC82e77642eC17DD3D40898d01",
- ShiftStoreUtils: "0x713573fC378f2deD82E01Da1Dcc489F3182a5622",
- ShiftUtils: "0x9C3a7D5d45845c63A9E860a37a26dfE66421d594",
- ShiftVault: "0x6b6F9B7B9a6b69942DAE74FB95E694ec277117af",
- SubaccountGelatoRelayRouter: "0x27791fB15285193219dA2Bb3871FDB6AE0a0771B",
- SubaccountRouter: "0x390eBD20373dBB861b386B68A7cf3C81f2541325",
- SubaccountRouterUtils: "0x83DdD05aBA0D0FD145F7b8A9Bf5f0d55019040D6",
- SubaccountUtils: "0x69DBeF1c571d41694d1726a6dE20CaaFfC714a0B",
- SwapHandler: "0xA97ccb56C87956837CFc87040903f7eF72361A02",
- SwapOrderExecutor: "0xD8Dfe3A15a3c206C1B8Ad54a5db0c5F5768209ef",
- SwapOrderUtils: "0xf1c2413dEbDa1eCaD61921D3c5B6544AA84063Ad",
- SwapPricingUtils: "0xc71cE4D0F1F5b9f167E5Ef2391C8F65Ef264273d",
- SwapUtils: "0xB403422F281A9011F5C212Ac358c7E70FE2bCE97",
- TimelockConfig: "0x4b5ec4f6110ef22B8f8b82C25B51c5F7176bA889",
- TimestampInitializer: "0xAB6A1e0619cA635Ce467c3517907D8b8F4F027Df",
- WithdrawalEventUtils: "0x9Ae28d833F3a5bCEa669A0Bb0b672B9964773D96",
- WithdrawalHandler: "0x45e7340745E6B47De01e57b3bf19e2DBc773Fdb0",
- WithdrawalStoreUtils: "0x69A4773f61fAA51174cCfED5b98795224a55059f",
- WithdrawalUtils: "0xAe15bb721734D0DC4E79DcD31d9F9B558d8f5649",
- WithdrawalVault: "0x7601c9dBbDCf1f5ED1E7Adba4EFd9f2cADa037A5",
Multicall: "0xD84793ae65842fFac5C20Ab8eaBD699ea1FC79F3",
NATIVE_TOKEN: "0x980B62Da83eFf3D4576C647993b0c1D7faf17c73",
@@ -464,6 +364,7 @@ export const CONTRACTS = {
ArbitrumNodeInterface: "0x00000000000000000000000000000000000000C8",
// TODO: it seems its also 0xaBcC9b596420A9E9172FD5938620E265a0f9Df92
GelatoRelayAddress: "0xcd565435e0d2109feFde337a66491541Df0D1420",
+ ExternalHandler: zeroAddress,
GLP: zeroAddress,
GMX: zeroAddress,
@@ -492,6 +393,7 @@ export const CONTRACTS = {
GlpManager: zeroAddress,
RewardReader: zeroAddress,
GlpRewardRouter: zeroAddress,
+ Timelock: zeroAddress,
},
};
From 3e23b733c44db9b53db2500edeecd2bf7a00d408 Mon Sep 17 00:00:00 2001
From: midas-myth
Date: Thu, 21 Aug 2025 16:04:21 +0200
Subject: [PATCH 32/55] Multichain new testnet contracts
---
sdk/src/configs/contracts.ts | 34 ++++++++++++++++++++++------------
1 file changed, 22 insertions(+), 12 deletions(-)
diff --git a/sdk/src/configs/contracts.ts b/sdk/src/configs/contracts.ts
index 284150116b..a2d49b81a3 100644
--- a/sdk/src/configs/contracts.ts
+++ b/sdk/src/configs/contracts.ts
@@ -4,6 +4,7 @@ import { ARBITRUM, ARBITRUM_SEPOLIA, AVALANCHE, AVALANCHE_FUJI, BOTANIX, Contrac
export const CONTRACTS = {
[ARBITRUM]: {
+ // V1
Vault: "0x489ee077994B6658eAfA855C308275EAd8097C4A",
Router: "0xaBBc5F99639c9B6bCb58544ddf04EFA6802F4064",
VaultReader: "0xfebB9f4CAC4cD523598fE1C5771181440143F24A",
@@ -77,15 +78,16 @@ export const CONTRACTS = {
ChainlinkPriceFeedProvider: "0x38B8dB61b724b51e42A88Cb8eC564CD685a0f53B",
ClaimHandler: "0x28f1F4AA95F49FAB62464536A269437B13d48976",
+ // External
ExternalHandler: "0x389CEf541397e872dC04421f166B5Bc2E0b374a5",
OpenOceanRouter: "0x6352a56caadC4F1E25CD6c75970Fa768A3304e64",
-
Multicall: "0xe79118d6D92a4b23369ba356C90b9A7ABf1CB961",
ArbitrumNodeInterface: "0x00000000000000000000000000000000000000C8",
LayerZeroEndpoint: "0x1a44076050125825900e736c501f859c50fE728c",
GelatoRelayAddress: "0xaBcC9b596420A9E9172FD5938620E265a0f9Df92",
},
[AVALANCHE]: {
+ // V1
Vault: "0x9ab2De34A33fB459b538c43f251eB825645e8595",
Router: "0x5F719c2F1095F7B9fc68a68e35B51194f4b6abe8",
VaultReader: "0x66eC8fc33A26feAEAe156afA3Cb46923651F6f0D",
@@ -158,16 +160,18 @@ export const CONTRACTS = {
LayerZeroProvider: "0xA1D94802EcD642051B677dBF37c8E78ce6dd3784",
ChainlinkPriceFeedProvider: "0x05d97cee050bfb81FB3EaD4A9368584F8e72C88e",
- ClaimHandler: "0x7FfedCAC2eCb2C29dDc027B60D6F8107295Ff2eA",
+ ClaimHandler: zeroAddress,
+ // External
ExternalHandler: "0xD149573a098223a9185433290a5A5CDbFa54a8A9",
OpenOceanRouter: "0x6352a56caadC4F1E25CD6c75970Fa768A3304e64",
-
Multicall: "0x50474CAe810B316c294111807F94F9f48527e7F8",
ArbitrumNodeInterface: zeroAddress,
LayerZeroEndpoint: "0x1a44076050125825900e736c501f859c50fE728c",
+ GelatoRelayAddress: "0xaBcC9b596420A9E9172FD5938620E265a0f9Df92",
},
[BOTANIX]: {
+ // Synthetics
DataStore: "0xA23B81a89Ab9D7D89fF8fc1b5d8508fB75Cc094d",
EventEmitter: "0xAf2E131d483cedE068e21a9228aD91E623a989C2",
SubaccountRouter: "0x11E590f6092D557bF71BaDEd50D81521674F8275",
@@ -194,18 +198,18 @@ export const CONTRACTS = {
MultichainSubaccountRouter: "0xd3B6E962f135634C43415d57A28E688Fb4f15A58",
MultichainTransferRouter: "0x901f26a57edCe65Ef3FBcCD260433De9B2279852",
MultichainVault: "0x9a535f9343434D96c4a39fF1d90cC685A4F6Fb20",
-
- ExternalHandler: "0x36b906eA6AE7c74aeEE8cDE66D01B3f1f8843872",
- OpenOceanRouter: zeroAddress,
+ LayerZeroProvider: "0x61af99b07995cb7Ee8c2FACF6D8fb6042FeAA0d9",
ChainlinkPriceFeedProvider: "0xDc613305e9267f0770072dEaB8c03162e0554b2d",
+ ClaimHandler: "0x3ca0f3ad78a9d0b2a0c060fe86d1141118a285c4",
+ // External
+ ExternalHandler: "0x36b906eA6AE7c74aeEE8cDE66D01B3f1f8843872",
+ OpenOceanRouter: zeroAddress,
Multicall: "0x4BaA24f93a657f0c1b4A0Ffc72B91011E35cA46b",
LayerZeroEndpoint: "0x6F475642a6e85809B1c36Fa62763669b1b48DD5B",
-
- Timelock: "0xca3e30b51A7c3bd40bFc52a61AB0cE57B3Ab3ad8",
-
ArbitrumNodeInterface: zeroAddress,
+ GelatoRelayAddress: "0x61aCe8fBA7B80AEf8ED67f37CB60bE00180872aD",
Vault: zeroAddress,
Reader: zeroAddress,
@@ -249,6 +253,7 @@ export const CONTRACTS = {
},
[AVALANCHE_FUJI]: {
+ // V1
Vault: zeroAddress,
Router: zeroAddress,
VaultReader: zeroAddress,
@@ -317,18 +322,21 @@ export const CONTRACTS = {
MultichainSubaccountRouter: "0xa51181CC37D23d3a4b4B263D2B54e1F34B834432",
MultichainTransferRouter: "0x0bD6966B894D9704Ce540babcd425C93d2BD549C",
MultichainVault: "0xFd86A5d9D6dF6f0cB6B0e6A18Bea7CB07Ada4F79",
+ LayerZeroProvider: "0xdaa9194bFD143Af71A8d2cFc8F2c0643094a77C5",
ChainlinkPriceFeedProvider: "0x2e149AbC99cDC98FB0207d6F184DC323CEBB955B",
+ ClaimHandler: "0x01D68cf13B8f67b041b8D565931e1370774cCeBd",
+ // External
OpenOceanRouter: zeroAddress,
ExternalHandler: "0x0d9F90c66C392c4d0e70EE0d399c43729B942512",
-
Multicall: "0x966D1F5c54a714C6443205F0Ec49eEF81F10fdfD",
ArbitrumNodeInterface: zeroAddress,
LayerZeroEndpoint: "0x6EDCE65403992e310A62460808c4b910D972f10f",
},
[ARBITRUM_SEPOLIA]: {
+ // Synthetics
DataStore: "0xCF4c2C4c53157BcC01A596e3788fFF69cBBCD201",
EventEmitter: "0xa973c2692C1556E1a3d478e745e9a75624AEDc73",
ExchangeRouter: "0x657F9215FA1e839FbA15cF44B1C00D95cF71ed10",
@@ -354,16 +362,18 @@ export const CONTRACTS = {
MultichainSubaccountRouter: "0xf8fbE9411f90618B3c68A8826555Ab54dE090ED7",
MultichainTransferRouter: "0xeCfcA6af46B9d20793f82b28bc749dfFC6DEE535",
MultichainVault: "0xCd46EF5ed7d08B345c47b5a193A719861Aa2CD91",
+ LayerZeroProvider: "0x3f85e237E950A7FB7cfb6DD4C262353A82588d51",
ChainlinkPriceFeedProvider: "0xa76BF7f977E80ac0bff49BDC98a27b7b070a937d",
ReferralStorage: "0xBbCdA58c228Bb29B5769778181c81Ac8aC546c11",
+ ClaimHandler: "0x96FE82b9C6FE46af537cE465B3befBD7b076C982",
+ // External
Multicall: "0xD84793ae65842fFac5C20Ab8eaBD699ea1FC79F3",
NATIVE_TOKEN: "0x980B62Da83eFf3D4576C647993b0c1D7faf17c73",
LayerZeroEndpoint: "0x6EDCE65403992e310A62460808c4b910D972f10f",
ArbitrumNodeInterface: "0x00000000000000000000000000000000000000C8",
- // TODO: it seems its also 0xaBcC9b596420A9E9172FD5938620E265a0f9Df92
- GelatoRelayAddress: "0xcd565435e0d2109feFde337a66491541Df0D1420",
+ GelatoRelayAddress: "0xaBcC9b596420A9E9172FD5938620E265a0f9Df92",
ExternalHandler: zeroAddress,
GLP: zeroAddress,
From 4062bb71e54024f6a98421d443a1981a28b3a356 Mon Sep 17 00:00:00 2001
From: midas-myth
Date: Thu, 21 Aug 2025 16:28:39 +0200
Subject: [PATCH 33/55] Multichain new squid url
---
src/config/subgraph.ts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/config/subgraph.ts b/src/config/subgraph.ts
index 143de25979..2132e05004 100644
--- a/src/config/subgraph.ts
+++ b/src/config/subgraph.ts
@@ -8,7 +8,7 @@ const SUBGRAPH_URLS = {
referrals: "https://subgraph.satsuma-prod.com/3b2ced13c8d9/gmx/gmx-arbitrum-referrals/api",
nissohVault: "https://api.thegraph.com/subgraphs/name/nissoh/gmx-vault",
syntheticsStats: "https://subgraph.satsuma-prod.com/3b2ced13c8d9/gmx/synthetics-arbitrum-stats/api",
- subsquid: "https://gmx-test.squids.live/multichain-arbitrum@7c1315/api/graphql",
+ subsquid: "https://gmx-test.squids.live/arbitrum-multichain@dda06b/api/graphql",
},
[AVALANCHE]: {
@@ -26,7 +26,7 @@ const SUBGRAPH_URLS = {
},
[ARBITRUM_SEPOLIA]: {
- subsquid: "https://gmx-test.squids.live/multichain-arbitrum-sepolia@59df14/api/graphql",
+ subsquid: "https://gmx-test.squids.live/arbitrum-sepolia-multichain@dda06b/api/graphql",
},
[BOTANIX]: {
From c7454658f5122059db51472f95d5ee2840b6b90f Mon Sep 17 00:00:00 2001
From: midas-myth
Date: Fri, 22 Aug 2025 14:12:02 +0200
Subject: [PATCH 34/55] Multichain arbitrum new squid url
---
src/config/subgraph.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/config/subgraph.ts b/src/config/subgraph.ts
index 2132e05004..d1d097b763 100644
--- a/src/config/subgraph.ts
+++ b/src/config/subgraph.ts
@@ -8,7 +8,7 @@ const SUBGRAPH_URLS = {
referrals: "https://subgraph.satsuma-prod.com/3b2ced13c8d9/gmx/gmx-arbitrum-referrals/api",
nissohVault: "https://api.thegraph.com/subgraphs/name/nissoh/gmx-vault",
syntheticsStats: "https://subgraph.satsuma-prod.com/3b2ced13c8d9/gmx/synthetics-arbitrum-stats/api",
- subsquid: "https://gmx-test.squids.live/arbitrum-multichain@dda06b/api/graphql",
+ subsquid: "https://gmx-test.squids.live/arbitrum-multichain@536193/api/graphql",
},
[AVALANCHE]: {
From e8dd9397eafe0d8d74c2cf8af6881b9d475b4710 Mon Sep 17 00:00:00 2001
From: midas-myth
Date: Fri, 22 Aug 2025 15:25:05 +0200
Subject: [PATCH 35/55] Multichain subaccount approval invalidation
---
.../hooks/useShowOneClickTradingInfo.tsx | 19 ++++++++-----------
.../selectors/globalSelectors.ts | 2 +-
2 files changed, 9 insertions(+), 12 deletions(-)
diff --git a/src/components/Synthetics/TradeBox/hooks/useShowOneClickTradingInfo.tsx b/src/components/Synthetics/TradeBox/hooks/useShowOneClickTradingInfo.tsx
index aa10b13636..de6d00f807 100644
--- a/src/components/Synthetics/TradeBox/hooks/useShowOneClickTradingInfo.tsx
+++ b/src/components/Synthetics/TradeBox/hooks/useShowOneClickTradingInfo.tsx
@@ -5,9 +5,8 @@ import {
import { selectIsExpressTransactionAvailable } from "context/SyntheticsStateContext/selectors/expressSelectors";
import {
selectChainId,
+ selectRawSubaccount,
selectSrcChainId,
- selectSubaccountForMultichainAction,
- selectSubaccountForSettlementChainAction,
} from "context/SyntheticsStateContext/selectors/globalSelectors";
import {
selectTradeboxIsFromTokenGmxAccount,
@@ -39,9 +38,7 @@ export function useExpressTradingWarnings({
const tradeFlags = useSelector(selectTradeboxTradeFlags);
const isGmxAccount = useSelector(selectTradeboxIsFromTokenGmxAccount);
const isExpressTransactionAvailable = useSelector(selectIsExpressTransactionAvailable);
- const subaccount = useSelector(
- isGmxAccount ? selectSubaccountForMultichainAction : selectSubaccountForSettlementChainAction
- );
+ const rawSubaccount = useSelector(selectRawSubaccount);
const isNativePayment = payTokenAddress === NATIVE_TOKEN_ADDRESS;
@@ -56,20 +53,20 @@ export function useExpressTradingWarnings({
shouldShowNativeTokenWarning:
!tradeFlags?.isTrigger && isExpressTransactionAvailable && isNativePayment && !nativeTokenWarningHidden,
shouldShowExpiredSubaccountWarning:
- isExpressTransactionAvailable && subaccount && getIsSubaccountExpired(subaccount),
+ isExpressTransactionAvailable && rawSubaccount && getIsSubaccountExpired(rawSubaccount),
shouldShowNonceExpiredWarning:
- isExpressTransactionAvailable && subaccount && getIsSubaccountNonceExpired(subaccount),
+ isExpressTransactionAvailable && rawSubaccount && getIsSubaccountNonceExpired(rawSubaccount),
shouldShowAllowedActionsWarning:
- isExpressTransactionAvailable && subaccount && getIsSubaccountActionsExceeded(subaccount, 1),
+ isExpressTransactionAvailable && rawSubaccount && getIsSubaccountActionsExceeded(rawSubaccount, 1),
shouldShowOutOfGasPaymentBalanceWarning: expressParams?.gasPaymentValidations.isOutGasTokenBalance,
shouldShowSubaccountApprovalInvalidWarning:
isExpressTransactionAvailable &&
- subaccount &&
+ rawSubaccount &&
getIsSubaccountApprovalInvalid({
chainId,
- signedApproval: subaccount.signedApproval,
+ signedApproval: rawSubaccount.signedApproval,
subaccountRouterAddress: getOrderRelayRouterAddress(chainId, true, isGmxAccount),
- onchainData: subaccount.onchainData,
+ onchainData: rawSubaccount.onchainData,
signerChainId: srcChainId ?? chainId,
}),
};
diff --git a/src/context/SyntheticsStateContext/selectors/globalSelectors.ts b/src/context/SyntheticsStateContext/selectors/globalSelectors.ts
index 0b068242de..ede574b182 100644
--- a/src/context/SyntheticsStateContext/selectors/globalSelectors.ts
+++ b/src/context/SyntheticsStateContext/selectors/globalSelectors.ts
@@ -109,7 +109,7 @@ export const selectPositiveFeePositionsSortedByUsd = createSelector((q) => {
/**
* This selector might return subaccount with approval signed for other chain and lead to errors
*/
-const selectRawSubaccount = (s: SyntheticsState) => s.subaccountState.subaccount;
+export const selectRawSubaccount = (s: SyntheticsState) => s.subaccountState.subaccount;
export const selectSubaccountForSettlementChainAction = createSelector((q) => {
const chainId = q(selectChainId);
From ebffdcddea06b688003ee38e3b2440c1e8e4ce60 Mon Sep 17 00:00:00 2001
From: midas-myth
Date: Fri, 22 Aug 2025 19:20:29 +0200
Subject: [PATCH 36/55] Multichain chain detect fix
---
.../GmxAccountContext/GmxAccountContext.tsx | 50 ++++++++++++++++---
src/lib/chains/useChainIdImpl.ts | 24 ++++-----
2 files changed, 55 insertions(+), 19 deletions(-)
diff --git a/src/context/GmxAccountContext/GmxAccountContext.tsx b/src/context/GmxAccountContext/GmxAccountContext.tsx
index 20050b64c0..b870d327af 100644
--- a/src/context/GmxAccountContext/GmxAccountContext.tsx
+++ b/src/context/GmxAccountContext/GmxAccountContext.tsx
@@ -5,11 +5,16 @@ import { createContext } from "use-context-selector";
import { useAccount } from "wagmi";
import { isDevelopment } from "config/env";
-import { IS_SOURCE_BASE_ALLOWED_KEY, IS_SOURCE_BASE_ALLOWED_NOTIFICATION_SHOWN_KEY } from "config/localStorage";
+import {
+ IS_SOURCE_BASE_ALLOWED_KEY,
+ IS_SOURCE_BASE_ALLOWED_NOTIFICATION_SHOWN_KEY,
+ SELECTED_NETWORK_LOCAL_STORAGE_KEY,
+} from "config/localStorage";
import {
DEFAULT_SETTLEMENT_CHAIN_ID_MAP,
IS_SOURCE_BASE_ALLOWED,
MULTI_CHAIN_TOKEN_MAPPING,
+ isSettlementChain,
isSourceChain,
} from "config/multichain";
import { helperToast } from "lib/helperToast";
@@ -63,14 +68,31 @@ export const context = createContext(null);
const DEFAULT_SETTLEMENT_CHAIN_ID: SettlementChainId = isDevelopment() ? ARBITRUM_SEPOLIA : ARBITRUM;
+const getSettlementChainIdFromLocalStorage = () => {
+ const unsanitizedChainId = localStorage.getItem(SELECTED_NETWORK_LOCAL_STORAGE_KEY);
+
+ if (!unsanitizedChainId) {
+ return DEFAULT_SETTLEMENT_CHAIN_ID;
+ }
+
+ const chainIdFromLocalStorage = parseInt(unsanitizedChainId);
+
+ if (!isSettlementChain(chainIdFromLocalStorage)) {
+ return DEFAULT_SETTLEMENT_CHAIN_ID;
+ }
+
+ return chainIdFromLocalStorage;
+};
+
export function GmxAccountContextProvider({ children }: PropsWithChildren) {
const { chainId: walletChainId } = useAccount();
useMultichainUrlEnabled();
const [modalOpen, setModalOpen] = useState(false);
- const [settlementChainId, setSettlementChainId] =
- useState(DEFAULT_SETTLEMENT_CHAIN_ID);
+ const [settlementChainId, setSettlementChainId] = useState(
+ getSettlementChainIdFromLocalStorage()
+ );
const [depositViewChain, setDepositViewChain] = useState(undefined);
const [depositViewTokenAddress, setDepositViewTokenAddress] =
@@ -103,15 +125,31 @@ export function GmxAccountContextProvider({ children }: PropsWithChildren) {
}, []);
useEffect(() => {
+ let probableSourceChain: SourceChainId | undefined = walletChainId as SourceChainId | undefined;
if (walletChainId === undefined) {
+ const unsanitizedChainId = localStorage.getItem(SELECTED_NETWORK_LOCAL_STORAGE_KEY);
+ if (!unsanitizedChainId) {
+ return;
+ }
+
+ const chainIdFromLocalStorage = parseInt(unsanitizedChainId);
+
+ if (!isSourceChain(chainIdFromLocalStorage)) {
+ return;
+ }
+
+ probableSourceChain = chainIdFromLocalStorage;
+ }
+
+ if (!isSourceChain(probableSourceChain)) {
return;
}
const areChainsRelated =
- Object.keys(MULTI_CHAIN_TOKEN_MAPPING[settlementChainId]?.[walletChainId] || {}).length > 0;
+ Object.keys(MULTI_CHAIN_TOKEN_MAPPING[settlementChainId]?.[probableSourceChain] || {}).length > 0;
- if ((settlementChainId === undefined || !areChainsRelated) && isSourceChain(walletChainId)) {
- setSettlementChainId(DEFAULT_SETTLEMENT_CHAIN_ID_MAP[walletChainId] ?? ARBITRUM_SEPOLIA);
+ if (settlementChainId === undefined || !areChainsRelated) {
+ setSettlementChainId(DEFAULT_SETTLEMENT_CHAIN_ID_MAP[probableSourceChain] ?? DEFAULT_SETTLEMENT_CHAIN_ID);
}
}, [settlementChainId, walletChainId]);
diff --git a/src/lib/chains/useChainIdImpl.ts b/src/lib/chains/useChainIdImpl.ts
index 34b59dac72..2cb895b22e 100644
--- a/src/lib/chains/useChainIdImpl.ts
+++ b/src/lib/chains/useChainIdImpl.ts
@@ -1,6 +1,6 @@
import { watchAccount } from "@wagmi/core";
import { useEffect, useRef, useState } from "react";
-import { useAccount, useChainId as useWagmiChainId } from "wagmi";
+import { useAccount } from "wagmi";
import {
type ContractsChainId,
@@ -33,27 +33,25 @@ export function useChainIdImpl(settlementChainId: SettlementChainId): {
srcChainId?: SourceChainId;
} {
let { chainId: connectedChainId } = useAccount();
- const unsanitizedChainId = useWagmiChainId();
-
- const [displayedChainId, setDisplayedChainId] = useState(connectedChainId ?? unsanitizedChainId ?? INITIAL_CHAIN_ID);
+ const [displayedChainId, setDisplayedChainId] = useState(connectedChainId ?? INITIAL_CHAIN_ID);
const rawChainIdFromLocalStorage = localStorage.getItem(SELECTED_NETWORK_LOCAL_STORAGE_KEY);
const chainIdFromLocalStorage = rawChainIdFromLocalStorage ? parseInt(rawChainIdFromLocalStorage) : undefined;
- const possibleSrcChainId = connectedChainId ?? chainIdFromLocalStorage ?? unsanitizedChainId;
+ const possibleSrcChainId = connectedChainId ?? chainIdFromLocalStorage;
let srcChainId: SourceChainId | undefined = undefined;
if (possibleSrcChainId && isSourceChain(possibleSrcChainId) && !isSettlementChain(possibleSrcChainId)) {
srcChainId = possibleSrcChainId;
}
- const isCurrentChainSupported = unsanitizedChainId && isSupportedChain(unsanitizedChainId, IS_DEVELOPMENT);
- const isCurrentChainSource = unsanitizedChainId && isSourceChain(unsanitizedChainId);
+ const isCurrentChainSupported = connectedChainId && isSupportedChain(connectedChainId, IS_DEVELOPMENT);
+ const isCurrentChainSource = connectedChainId && isSourceChain(connectedChainId);
const isLocalStorageChainSupported =
chainIdFromLocalStorage && isSupportedChain(chainIdFromLocalStorage, IS_DEVELOPMENT);
const isLocalStorageChainSource = chainIdFromLocalStorage && isSourceChain(chainIdFromLocalStorage);
- const mustChangeChainId = !unsanitizedChainId || (!isCurrentChainSource && !isCurrentChainSupported);
+ const mustChangeChainId = !connectedChainId || (!isCurrentChainSource && !isCurrentChainSupported);
const connectedRef = useRef(false);
useEffect(() => {
@@ -79,7 +77,7 @@ export function useChainIdImpl(settlementChainId: SettlementChainId): {
useEffect(() => {
if (isCurrentChainSupported) {
- setDisplayedChainId(unsanitizedChainId);
+ setDisplayedChainId(connectedChainId);
return;
}
@@ -106,7 +104,7 @@ export function useChainIdImpl(settlementChainId: SettlementChainId): {
isLocalStorageChainSource,
isLocalStorageChainSupported,
settlementChainId,
- unsanitizedChainId,
+ connectedChainId,
]);
useEffect(() => {
@@ -169,8 +167,8 @@ export function useChainIdImpl(settlementChainId: SettlementChainId): {
if (isCurrentChainSupported) {
return {
- chainId: unsanitizedChainId as ContractsChainId,
- isConnectedToChainId: displayedChainId === unsanitizedChainId && unsanitizedChainId === connectedChainId,
+ chainId: connectedChainId as ContractsChainId,
+ isConnectedToChainId: displayedChainId === connectedChainId,
srcChainId,
};
}
@@ -178,7 +176,7 @@ export function useChainIdImpl(settlementChainId: SettlementChainId): {
if (isCurrentChainSource) {
return {
chainId: settlementChainId as SettlementChainId,
- isConnectedToChainId: unsanitizedChainId === connectedChainId,
+ isConnectedToChainId: true,
srcChainId,
};
}
From 8bb81f205de19f90b02eb31cca3883f576054678 Mon Sep 17 00:00:00 2001
From: Divhead <110596516+divhead@users.noreply.github.com>
Date: Sun, 24 Aug 2025 20:17:20 -0700
Subject: [PATCH 37/55] fixes
---
sdk/src/configs/dataStore.ts | 2 +
sdk/src/modules/markets/index.ts | 1 +
sdk/src/modules/markets/query-builders.ts | 4 +
sdk/src/modules/markets/types.ts | 2 +
sdk/src/modules/positions/positions.ts | 1 +
sdk/src/prebuilt/hashedMarketConfigKeys.json | 138 ++++++++++++++++++
sdk/src/test/mock.ts | 1 +
sdk/src/types/markets.ts | 1 +
sdk/src/types/subsquid.ts | 2 +
sdk/src/types/tradeHistory.ts | 3 +
sdk/src/utils/fees/priceImpact.ts | 2 +-
sdk/src/utils/marketKeysAndConfigs.ts | 5 +
sdk/src/utils/prices.ts | 5 +-
sdk/src/utils/trade/decrease.ts | 12 +-
sdk/src/utils/trade/increase.ts | 2 +
sdk/src/utils/tradeHistory.ts | 3 +
.../Synthetics/TradeHistory/TradeHistory.tsx | 5 +-
.../TradeHistoryRow/utils/position.ts | 111 ++++++++------
src/config/subgraph.ts | 5 +-
.../SyntheticsStateContextProvider.tsx | 8 +-
.../selectors/globalSelectors.ts | 6 +-
.../selectors/orderEditorSelectors.ts | 1 +
.../__tests__/trade/decrease.spec.ts | 1 +
src/domain/synthetics/fees/useRebatesInfo.ts | 57 ++++++--
.../buildMarketsConfigsRequest.ts | 4 +
.../markets/useMarketsInfoRequest/index.ts | 1 +
.../useFastMarketsInfoRequest.ts | 14 +-
src/domain/synthetics/orders/utils.tsx | 2 +
.../positions/usePositionsConstants.ts | 26 +++-
.../synthetics/positions/usePositionsInfo.ts | 7 +-
.../synthetics/trade/utils/decrease.spec.ts | 1 +
.../tradeHistory/useTradeHistory.ts | 3 +
src/locales/de/messages.po | 19 +--
src/locales/en/messages.po | 19 +--
src/locales/es/messages.po | 19 +--
src/locales/fr/messages.po | 19 +--
src/locales/ja/messages.po | 19 +--
src/locales/ko/messages.po | 19 +--
src/locales/pseudo/messages.po | 19 +--
src/locales/ru/messages.po | 19 +--
src/locales/zh/messages.po | 19 +--
src/pages/SyntheticsStats/SyntheticsStats.tsx | 16 +-
42 files changed, 418 insertions(+), 205 deletions(-)
diff --git a/sdk/src/configs/dataStore.ts b/sdk/src/configs/dataStore.ts
index 9bd877c0c5..b9ef676c17 100644
--- a/sdk/src/configs/dataStore.ts
+++ b/sdk/src/configs/dataStore.ts
@@ -43,9 +43,11 @@ export const MAX_POSITION_IMPACT_FACTOR_FOR_LIQUIDATIONS_KEY = hashString(
);
export const CLAIMABLE_COLLATERAL_DELAY_KEY = hashString("CLAIMABLE_COLLATERAL_DELAY");
export const CLAIMABLE_COLLATERAL_REDUCTION_FACTOR_KEY = hashString("CLAIMABLE_COLLATERAL_REDUCTION_FACTOR");
+export const CLAIMABLE_COLLATERAL_TIME_DIVISOR_KEY = hashString("CLAIMABLE_COLLATERAL_TIME_DIVISOR");
export const MAX_LENDABLE_IMPACT_FACTOR_KEY = hashString("MAX_LENDABLE_IMPACT_FACTOR");
export const MAX_LENDABLE_IMPACT_USD_KEY = hashString("MAX_LENDABLE_IMPACT_USD");
export const MAX_LENDABLE_IMPACT_FACTOR_FOR_WITHDRAWALS_KEY = hashString("MAX_LENDABLE_IMPACT_FACTOR_FOR_WITHDRAWALS");
+export const LENT_POSITION_IMPACT_POOL_AMOUNT_KEY = hashString("LENT_POSITION_IMPACT_POOL_AMOUNT");
export const POSITION_IMPACT_POOL_AMOUNT_KEY = hashString("POSITION_IMPACT_POOL_AMOUNT");
export const MIN_POSITION_IMPACT_POOL_AMOUNT_KEY = hashString("MIN_POSITION_IMPACT_POOL_AMOUNT");
diff --git a/sdk/src/modules/markets/index.ts b/sdk/src/modules/markets/index.ts
index df8a121430..f8eaffb6c4 100644
--- a/sdk/src/modules/markets/index.ts
+++ b/sdk/src/modules/markets/index.ts
@@ -264,6 +264,7 @@ export class Markets extends Module {
maxLendableImpactFactorForWithdrawals:
dataStoreValues.maxLendableImpactFactorForWithdrawals.returnValues[0],
maxLendableImpactUsd: dataStoreValues.maxLendableImpactUsd.returnValues[0],
+ lentPositionImpactPoolAmount: dataStoreValues.lentPositionImpactPoolAmount.returnValues[0],
positionImpactExponentFactor: dataStoreValues.positionImpactExponentFactor.returnValues[0],
swapFeeFactorForBalanceWasImproved: dataStoreValues.swapFeeFactorForBalanceWasImproved.returnValues[0],
swapFeeFactorForBalanceWasNotImproved:
diff --git a/sdk/src/modules/markets/query-builders.ts b/sdk/src/modules/markets/query-builders.ts
index 43c02c8a10..eaca1adca0 100644
--- a/sdk/src/modules/markets/query-builders.ts
+++ b/sdk/src/modules/markets/query-builders.ts
@@ -415,6 +415,10 @@ export async function buildMarketsConfigsRequest(
methodName: "getUint",
params: [prebuiltHashedKeys.maxLendableImpactUsd],
},
+ lentPositionImpactPoolAmount: {
+ methodName: "getUint",
+ params: [prebuiltHashedKeys.lentPositionImpactPoolAmount],
+ },
minCollateralFactor: {
methodName: "getUint",
params: [prebuiltHashedKeys.minCollateralFactor],
diff --git a/sdk/src/modules/markets/types.ts b/sdk/src/modules/markets/types.ts
index 3279cb0d8f..d14d7744fe 100644
--- a/sdk/src/modules/markets/types.ts
+++ b/sdk/src/modules/markets/types.ts
@@ -88,6 +88,7 @@ export type MarketConfig = Pick<
| "maxLendableImpactFactor"
| "maxLendableImpactFactorForWithdrawals"
| "maxLendableImpactUsd"
+ | "lentPositionImpactPoolAmount"
| "positionImpactExponentFactor"
| "swapFeeFactorForBalanceWasImproved"
| "swapFeeFactorForBalanceWasNotImproved"
@@ -175,6 +176,7 @@ export type MarketConfigMulticallRequestConfig = MulticallRequestConfig<{
| "maxLendableImpactFactor"
| "maxLendableImpactFactorForWithdrawals"
| "maxLendableImpactUsd"
+ | "lentPositionImpactPoolAmount"
| "minCollateralFactor"
| "minCollateralFactorForLiquidation"
| "minCollateralFactorForOpenInterestLong"
diff --git a/sdk/src/modules/positions/positions.ts b/sdk/src/modules/positions/positions.ts
index fdd06ae284..142e9e23da 100644
--- a/sdk/src/modules/positions/positions.ts
+++ b/sdk/src/modules/positions/positions.ts
@@ -560,6 +560,7 @@ export class Positions extends Module {
? getAcceptablePriceInfo({
marketInfo,
isIncrease: false,
+ isLimit: false,
isLong: position.isLong,
indexPrice: getMarkPrice({ prices: indexToken.prices, isLong: position.isLong, isIncrease: false }),
sizeDeltaUsd: position.sizeInUsd,
diff --git a/sdk/src/prebuilt/hashedMarketConfigKeys.json b/sdk/src/prebuilt/hashedMarketConfigKeys.json
index b8512ecd09..526885ba31 100644
--- a/sdk/src/prebuilt/hashedMarketConfigKeys.json
+++ b/sdk/src/prebuilt/hashedMarketConfigKeys.json
@@ -40,6 +40,7 @@
"maxLendableImpactFactor": "0xb3b4d74b781ec6f82e806ecd6ce4cb612a17981e3f5a33ebba331f9b374305d3",
"maxLendableImpactFactorForWithdrawals": "0x70a96897ef7c782fa079c3c699e0db2961876bda507b913949cda60d449094ba",
"maxLendableImpactUsd": "0xf5cfdf88e82055ee2d11fe3022611436d86010b01c8535d97fa35e312d9b17a4",
+ "lentPositionImpactPoolAmount": "0xa9a8e06c724cdb1ec3731dd2bb477864ab9cd6b77a38087e2bedae1678a9354e",
"minCollateralFactor": "0x7ed8bbc84a504f7593aeb499af806615332528c198809a44c6e5dba3e0d72e88",
"minCollateralFactorForLiquidation": "0x4ad6ed9b76315a721ed0263f8e550ae6e6dc5ed2bc623569492a2d94a64b0083",
"minCollateralFactorForOpenInterestLong": "0xf6af02901769f5d0431c90ada09d6c367624e1076786532fd2ce8e6d717667a2",
@@ -95,6 +96,7 @@
"maxLendableImpactFactor": "0x658bbfa2b1b2de1d796e9f42065f3fa4f04f40c1c13f9dd7ba9b31fd45f77409",
"maxLendableImpactFactorForWithdrawals": "0xa54e8211f80772d6b427270405b6196679ec52fddffd0b5bc94e3b91a7e8b0ae",
"maxLendableImpactUsd": "0xcd2081c201e37d58d61de758812d8b5c9bb64461b216e162c2dc412c128f6a73",
+ "lentPositionImpactPoolAmount": "0x09e59e71260c00a444e1d9c964c22fb3ac89e8181d66b479468b235b3a12408f",
"minCollateralFactor": "0xbd15bc48a477042fe084c278c9596a903cb537c13f134405e2e59ca977784a0d",
"minCollateralFactorForLiquidation": "0x41a57a040d3da82057a2affe225c24c19c04b76c3e7fe0fe5043304ce5ceab11",
"minCollateralFactorForOpenInterestLong": "0x9d952e960da486bb07fd5da270a9f38c80dd0c394d4fb940d08357e82f052e73",
@@ -152,6 +154,7 @@
"maxLendableImpactFactor": "0x0585fc9618ad8521b5d612e41c802de36cb4bbf6e8313771e290c791ad3fe68a",
"maxLendableImpactFactorForWithdrawals": "0xe44a4f4906ef59a042e098c6578cde4b0d1b58c73f98ec0779b71d31fbf6d9e5",
"maxLendableImpactUsd": "0x728ec84ffba417f5cd111b992612c69bee78f19ac678b1584aae070e63f455a7",
+ "lentPositionImpactPoolAmount": "0x0d4630d7cd67859e7c9d3f814f184368775b4f00da40372c8e9dc1217cda0e41",
"minCollateralFactor": "0x0edf8a0fa860b71e689cfeb511c6b83c96d23eaf71c6f757184d23954fcb3169",
"minCollateralFactorForLiquidation": "0x9c713920b491455ee33d87a6d12394a42e83d5f426958697dc08a318be13ed91",
"minCollateralFactorForOpenInterestLong": "0x18ab1bf4fdef11804a1212c94ba4ed35498ef5942b3d385fc9c33f933f17f60d",
@@ -207,6 +210,7 @@
"maxLendableImpactFactor": "0x4112eb8d7aed1bb72e882220f586aaac2019f97fbf59808eaf687468dc13737c",
"maxLendableImpactFactorForWithdrawals": "0xeed571225e3a9bdef852f7b8b0ffaea55a32d3ca54cfdac61584c70c4d4cc016",
"maxLendableImpactUsd": "0xb8f98bea93a1cea67ff9bd16f527fa76903a2cc5898a48a5e98cd3d6194f5cad",
+ "lentPositionImpactPoolAmount": "0x94f7c35748bbd731455c2f94c52f99bffd762f5d4169361b85d14e2ec6cb95b5",
"minCollateralFactor": "0xcf1cefe1a11576531900922002113a6cf623823d2c813a4534c5d181976450ae",
"minCollateralFactorForLiquidation": "0xefc3fc73b918e0aa9a9a9f306393b25a2919aad551cbd5c5535834b6ea9d9934",
"minCollateralFactorForOpenInterestLong": "0xbcf38cdb77fa9cb02787c89b5b616dc4d91337a400795d617a2580ae49a6e209",
@@ -262,6 +266,7 @@
"maxLendableImpactFactor": "0x93de0069d2725e09bf4c058941d76e098ccc24e408c20d09e981af35375bf806",
"maxLendableImpactFactorForWithdrawals": "0xaf9aa8b02ddbf97ce8464ba2de02f40ad91ee33358d46ec67f08f2aadf3377dd",
"maxLendableImpactUsd": "0x80be7e0fa9db2f39a0b71c58828c1c43984f5794d61afab943e2f3882d718cee",
+ "lentPositionImpactPoolAmount": "0x1f0483a8730089f19663b082cb3b071d32c7ae51972a1c164107d45956ba4e1d",
"minCollateralFactor": "0x832e125ad1a59ec76a096a906db0abca415fae50215a04713ba7d26b806170d7",
"minCollateralFactorForLiquidation": "0xb5942ec068620932b817a6dfdc8481a8d8f06dc0563a60f643926b6a103c672f",
"minCollateralFactorForOpenInterestLong": "0x47ece80b5a8441270dc51b704ac241ee205157d6e79a17ec9a7a78d5a1c405cc",
@@ -317,6 +322,7 @@
"maxLendableImpactFactor": "0xf1cddf409a74490b6b9b71da45699a2664842cb2095addd15856e5ca4488e749",
"maxLendableImpactFactorForWithdrawals": "0x996605603a143fcffe8d5a8a49d57f3b166610dbc943f4e4504b16c5af6e6da8",
"maxLendableImpactUsd": "0x98840a7c390a3d473387dba2f260538403d20a4302fb5208143594a82858305c",
+ "lentPositionImpactPoolAmount": "0xc65ef81ed98cb824f6d29e22e0d433409224dbeb6a8fd2da59ceae6496c906a8",
"minCollateralFactor": "0x25ca6ce85c0568d84138f6b3264fedf1668f1ddfc320f7ba409d3d6019411833",
"minCollateralFactorForLiquidation": "0xa7a3d6ff9c0a71648dc0e6cf384fa77bd83e4b2ff8395f57d3c34f2b36367977",
"minCollateralFactorForOpenInterestLong": "0x3c2241385fd888324a03ea03eb3606df19e300ae2c3cf2dcafbe2d235a04b676",
@@ -372,6 +378,7 @@
"maxLendableImpactFactor": "0xd98beda89a305501d34136119ca30e1ca2b5b2f434e35296cdb5561208c5b4bf",
"maxLendableImpactFactorForWithdrawals": "0x76da0d9c850d2920a310f5aa18b371ca8d2a90b38815cfe6ba6456cdb5c85d50",
"maxLendableImpactUsd": "0x8237ec27bdb004d4107c6c6b79c9041a2c4a937dd1252e13d5477a27d2e29eda",
+ "lentPositionImpactPoolAmount": "0x29633419e1322cedab43c68d3d50aa905f37ab8ff6adf3af34e2543c38129de9",
"minCollateralFactor": "0x2bcb8363ff421d07360a2a95773d3f7b64319b6bc58f328c6c734e090562cdc1",
"minCollateralFactorForLiquidation": "0xf28436ee632c09e66f86fd35aaa5d18095399b9108d4ba85c8525a3072af2568",
"minCollateralFactorForOpenInterestLong": "0x7f97bdae1ee1c0424ccd6dc21526e5ef1e0cb581856d3c0b3279c518b2b140f6",
@@ -427,6 +434,7 @@
"maxLendableImpactFactor": "0xab56d4d760405991ddef068434a5d406ba016e6d8146fc4902e4e0d598b4880f",
"maxLendableImpactFactorForWithdrawals": "0x4ee32ae87de6b8212db46ab2f997b72a42a3c045b784611792cb3b3abcc09ef5",
"maxLendableImpactUsd": "0xf795ef00b0e40b4c87bb36bc3cb5d3bba6e56a2579c1d175c4b5cf66b0ccf2ed",
+ "lentPositionImpactPoolAmount": "0x1e85f0f543912b7ecf686ead9f1409fb5756f6a5a58d68e96c143a932a4cbb7b",
"minCollateralFactor": "0x47e6ae06f279a68f0ca067d5a30ed3650bb14114110b8ee80883b47804ef6a3b",
"minCollateralFactorForLiquidation": "0xc256c83913d960d9206dcc2892b610d70f1215a7c0dca18cbf2a253a86a4e27b",
"minCollateralFactorForOpenInterestLong": "0x2baf62173b9765c40d17461b94ede9de9288eaceb9bea879a93916d6fbc22a19",
@@ -482,6 +490,7 @@
"maxLendableImpactFactor": "0xb3c4274beae095399cacdb1878d1c016eed094b245bbc1fa72b69721f8a4e7d7",
"maxLendableImpactFactorForWithdrawals": "0x37e67266b53cbe2d3941590fc1b3d26a20850d5c2236ea80b98ccf17bd696c64",
"maxLendableImpactUsd": "0x84ace13dc5d67763acb52f7555c4393f595076dc9ea38d5d1a5457fabe6a7ca6",
+ "lentPositionImpactPoolAmount": "0x5a5ad8ffd0624583964edb52b4ca5302dd7852a311d0d00268aa3812e0347830",
"minCollateralFactor": "0x96dbb6d13d7c6ad973f98461378032ffcf09dcfff780a087bfb18e8b2345b446",
"minCollateralFactorForLiquidation": "0xdc1582e6529d9cc8f1962399984c6069dcaa98f558366ed6c054c2b725b86eb7",
"minCollateralFactorForOpenInterestLong": "0x55f19e1cb6994dac8de0f0595716c8ce1c98c4a0fe7ab84d94a2581a2857ef77",
@@ -537,6 +546,7 @@
"maxLendableImpactFactor": "0x62fff146684d5367acfd3186d198f360d343641ec714f75bbfe1da5d15cc2d1a",
"maxLendableImpactFactorForWithdrawals": "0xb7655a124cfb3abd74e70cc7eb1e86ef590f4256be7b19dfa5a16a13a0853875",
"maxLendableImpactUsd": "0xb2b39807618c901e81778682b8c1784c922b07d57729cafc0f85fc55e6e17b74",
+ "lentPositionImpactPoolAmount": "0x3b7935cb9f25478bed786cbbc2db533c3f370637796f07b4d7b2776b12e10fa4",
"minCollateralFactor": "0xda500b491a746b24ab50e0b8b019f220ead47914b3745a2a7e7fdbd254e98380",
"minCollateralFactorForLiquidation": "0x34f110ea583e9f5ddde6db52500fdfa0f533d4289608e8385d6e8eb52b6ccc43",
"minCollateralFactorForOpenInterestLong": "0x766fd0d002f43488d55b72193e9da1714d44851b4eb0e813cc8d280bef17a17e",
@@ -592,6 +602,7 @@
"maxLendableImpactFactor": "0x3a9c470b53c165ab932328154f9874548715861c6460f805ee9a4a80a8fea78b",
"maxLendableImpactFactorForWithdrawals": "0x9fad6c729230ce1e718f2c8d59dc4d4b71cabdc42bdc9671eb9f3a657c96a76c",
"maxLendableImpactUsd": "0x9862560ef3b5dac5ce2b74ef17a25dbe09eb8a96671a982b6a965c5269d3cd45",
+ "lentPositionImpactPoolAmount": "0x9d097f5509c3c67bdeed446ec4598dac8db0935f13a8c9023bb1eb6baf52dca7",
"minCollateralFactor": "0x0319e091a3ec1a799e073a0b7936f425076d1918f56c3ebca0a61a077925d1a7",
"minCollateralFactorForLiquidation": "0x44c72c9b6faaa5a6a01ee3029c34a5998526cf5d06621babe61728a74452cc9c",
"minCollateralFactorForOpenInterestLong": "0x534530389b87caf5d983a7e0e861fa8081b2a7a13384cf923705a64a186c5230",
@@ -647,6 +658,7 @@
"maxLendableImpactFactor": "0xc6fe342f7964206bc124b771ff423c0ea289d1bb7de474110589adeffee82944",
"maxLendableImpactFactorForWithdrawals": "0x2870d8d25ffee717545ddf07c91cf6fd196b65e8f90c3ef166432c3fc0822382",
"maxLendableImpactUsd": "0xfcadfede8ed4a86ac6707ff911ab8013568d1a6aafc8533f4414ac34eab356b6",
+ "lentPositionImpactPoolAmount": "0xf4aec56aee11b79d98c7f6d4a454ba0e56205a687bd987c3826f0e97fd58be46",
"minCollateralFactor": "0xff3a85b820937ac9b174e1f49510b221d1e2eccc89cbdb68794b1e04f82c5e1e",
"minCollateralFactorForLiquidation": "0x04392113bc40d454de730f577ae537fe8a7a03c8699523dd377868df099dd735",
"minCollateralFactorForOpenInterestLong": "0xce841b0d0a75f7f23b3068a8731d79d46ffd5224bf752b82c99278c615ce9610",
@@ -702,6 +714,7 @@
"maxLendableImpactFactor": "0x8b638a3a6144458459f5ae1ded90a00fd71368b16e55375547465bc1c64dd948",
"maxLendableImpactFactorForWithdrawals": "0xfdae05a2ec9ea4f7ebd165c878f4ed38f7241ad080746ac736ed1fd290f88f44",
"maxLendableImpactUsd": "0xe70223bfaf4074aff312a883325204bd961829e8cc013550374a8ff390d757a6",
+ "lentPositionImpactPoolAmount": "0xff73e8c386163960756bf4028b8fad2438daf59d62a27b8ec82f8df3bd90bd7d",
"minCollateralFactor": "0x19551441f4fad115496cad924a5234a7c54fdfb4c8a1488f93b7bbd6b0ecedc1",
"minCollateralFactorForLiquidation": "0xdfc2ee462858568defefb730ffe6b557448fd43946f479e841fb1d8a07246f89",
"minCollateralFactorForOpenInterestLong": "0x2236f68da88942f622d2e117770f8f2147a2e26a5ae248e7facaed024241fff9",
@@ -757,6 +770,7 @@
"maxLendableImpactFactor": "0xf8570b1f7724a306cad7e751facf358775d2836bdb89a795e7cf10e9e5d300c4",
"maxLendableImpactFactorForWithdrawals": "0x8d6265e42640b0ac32cc3f53e56a5c09e3a813d783e81ac771a2a059cf5853a1",
"maxLendableImpactUsd": "0xe51022439894366b3a6e88867c5b10c08d7f7ff243117df10e59009a28aaf91d",
+ "lentPositionImpactPoolAmount": "0x38e5c5fb9fdd6a81cf67e9c963912c548f1c8b75cb9f3049dc6d67109bce6860",
"minCollateralFactor": "0x7cc57d46d5ff50a03e5a0f29242e18131d031794b2629b7f6398de7841588dbc",
"minCollateralFactorForLiquidation": "0x72e936023ba9fcbaf12a7120e82d41da53972b921ffd5dd1ad50ac1ae93bb900",
"minCollateralFactorForOpenInterestLong": "0xc91baace01ed132d5a1f539fb6ddacfa913f012c6d706993f1f9d21e28646417",
@@ -812,6 +826,7 @@
"maxLendableImpactFactor": "0xf403c0635696149bfb203b07cf6aa938a603884ce708fe342d0c95bb9c77f6c0",
"maxLendableImpactFactorForWithdrawals": "0x9f4f21d5d90fb9137601d9e8f67d52fc46912abe323569b8717ded1b8ca4dea4",
"maxLendableImpactUsd": "0x3facc7f4177d656a98252b3d56766e2797a66c79f6d86c6bcbf3d661dd49659d",
+ "lentPositionImpactPoolAmount": "0x5e1acb7b2b0e3a0aae60283a53fd1869b55460eb4c7a6874a69028084749c9e9",
"minCollateralFactor": "0x44d3450628900783da0a74bb9d83b0bca2ff8504e6c4d420a2c5480085883855",
"minCollateralFactorForLiquidation": "0x045488831e4d7b120737807287cdd91326b56a531a357dfc178b1e621a073fda",
"minCollateralFactorForOpenInterestLong": "0x95ed56a404dad3b4f299ec1ce25cef2de1a828458f02787a404fff019baaafa4",
@@ -867,6 +882,7 @@
"maxLendableImpactFactor": "0x1749895678e38a3343c373c2d2c043ee94127a7fa863488817f099d6ff98760a",
"maxLendableImpactFactorForWithdrawals": "0x3a41d7ec40650324eb9ffdc44c4cdebda6d53a5383a74f986d3d0cbb6819de34",
"maxLendableImpactUsd": "0xfabf16315fd84c105d19c87edd5186946f5a33dbd327d2c3ec395a67ac401043",
+ "lentPositionImpactPoolAmount": "0x62da073ddbddfeaf8aeef839b7d6134b84491635b7915b1426c5ff8720519e2e",
"minCollateralFactor": "0x6a8d715582ce7a436f0926fce0f99d60dd260a473e14babbb4560315a488cc1f",
"minCollateralFactorForLiquidation": "0xd0362b4c48dedbb4f87db87c773b0f4329525d6197ab8617c15dd6e4668d3264",
"minCollateralFactorForOpenInterestLong": "0x6d844c42863e83e23fa960ab45a1a5696e1be08fa1e4e772366172c0ac93229f",
@@ -922,6 +938,7 @@
"maxLendableImpactFactor": "0xde1ba05fe687e529a6a0c58d2100de1139ad4928b37e52862c8d1ebdb22a1a61",
"maxLendableImpactFactorForWithdrawals": "0xee346d2edd361d19d698b4dd0789969a134d4ed19a464cd4201596b74ce53fed",
"maxLendableImpactUsd": "0xcfce9499d841b6c0e363c365ac82b6f7a3da5f3af87fcddff222e8582f34d63d",
+ "lentPositionImpactPoolAmount": "0x4454cc660ad883b095ddc9c0857ae37b951ea31b82b25bf07708c2525e7300f2",
"minCollateralFactor": "0x5b9cbe70edfdfea83201f44a0f1c912fb82a4a1ee106f9a3842bb29cb5301035",
"minCollateralFactorForLiquidation": "0x71ff8d76e7fc434950cad2cccf97e7b7ba4f414cbf807094440bd8599e6a61d6",
"minCollateralFactorForOpenInterestLong": "0x2a50bf17c53f122cad04b207535a3c74b062687e8c8f8657ea2f927b501c1062",
@@ -977,6 +994,7 @@
"maxLendableImpactFactor": "0x04ebe570057f2180ebd8a9974508c054a9ce74f674831b8416c93266451a1283",
"maxLendableImpactFactorForWithdrawals": "0x6deeca3b9918df157ac6b79b200ae21f3325e0d5f776ed8cd20b4a84d38fea1e",
"maxLendableImpactUsd": "0x8d8d59ace8460900776b284975c4d174a52b808a53c04a79828065217ed88e0d",
+ "lentPositionImpactPoolAmount": "0x3ac5b008a4a45cde1635b3032377df6d75074abf6c7d9a80b4b93fdf82711019",
"minCollateralFactor": "0x69a941e84ede0f13d1c7a57eb687f63ce8927eeef908b0e1e8dc22f9fda6c050",
"minCollateralFactorForLiquidation": "0x5cbd1eda2c597db32bc6c3e5e9098bc9dbf2442d0956252f63722275452b0da7",
"minCollateralFactorForOpenInterestLong": "0x9a7f1df75521d5245272629ae3d633c5b1df32b56dbfb7bcb79f6ed1783f3207",
@@ -1032,6 +1050,7 @@
"maxLendableImpactFactor": "0xebef0970db3654b327983d90211b1d5835ca7aba423825a79892ebc3830b8290",
"maxLendableImpactFactorForWithdrawals": "0x94f2a84873648f9fdb79ac47c08980d65bc572ac20486f76d6aff0d08b39e68e",
"maxLendableImpactUsd": "0x5b357ad4bb38a6e6c6bb0046dbff6dd7e04211880474c6776313374c3801b90e",
+ "lentPositionImpactPoolAmount": "0x82ab418657d08d9c6646d415bbf1151bf53f6fdf275d3d8e50e6a373504e3ccc",
"minCollateralFactor": "0x658da6dd132bb7e1756b246c646e4f3681462f841ea26f37d83a1bc7a7c640af",
"minCollateralFactorForLiquidation": "0x3f735896b5ad89fc720a25fd616b3c729789db640f8a0620238eefaf2fc2de7c",
"minCollateralFactorForOpenInterestLong": "0x5b29bc756da04509ebef8e49358a85e1b080ee9d9b19f646413c7ec366643c4f",
@@ -1087,6 +1106,7 @@
"maxLendableImpactFactor": "0x1c73ec35a26f4307497d8cf7691e2b2af2c1d8d575d497ee365bd1aeee24d11b",
"maxLendableImpactFactorForWithdrawals": "0xe747a8862385c810a6a424472e69c7774549bbbf532d91c87861d0ac1bcb93df",
"maxLendableImpactUsd": "0xa9b9ec70460741f91d78a921f8aabbdb18ece7faefbc2934034a21ce9f38b78b",
+ "lentPositionImpactPoolAmount": "0x1e63a813f114a0e36791d2cf3cb9c8ba278c895facd33bf82652b841c163964f",
"minCollateralFactor": "0x99b3701cc7c1265785f49ccd881b41099fbe598b8eec779a1cb9f9d0ab47c538",
"minCollateralFactorForLiquidation": "0xa3555afc1b6acabe022942d56a72327d65daf86bf7eec60ebd84645c8793ad58",
"minCollateralFactorForOpenInterestLong": "0xc711c4d6d1307e7c53adb1d3e70e48374818834facdddda9f3aa07ab3b84b6eb",
@@ -1142,6 +1162,7 @@
"maxLendableImpactFactor": "0xfbe064e19c3e25cc5bfd9034893728a86c34fe48c285de49de11478c9763c2c2",
"maxLendableImpactFactorForWithdrawals": "0x6f18cbb5bc5d13d823dfa54644e3830fa136f22c5249c629344ce22761600d77",
"maxLendableImpactUsd": "0x760f274dbc4197734350f453e31e52e0f92218688034645fd667c249904ce555",
+ "lentPositionImpactPoolAmount": "0xf1161f028f91a3ff65d2ed847183aaaee60d6601e3dcf8eb35b30636a1dfadbf",
"minCollateralFactor": "0x505fc7c1a1954b72fd3b5f7f9b5250661340b75ce9e9044e6dd11c8da2d692db",
"minCollateralFactorForLiquidation": "0xf2a71a4e761efd126653b700f3f521749f94b22a97852ad66374cdd674e545c9",
"minCollateralFactorForOpenInterestLong": "0x7be7f22de8ae3c36d8218b44d06c5a126ea07b5bf1176ff4e90c34ccdae32302",
@@ -1197,6 +1218,7 @@
"maxLendableImpactFactor": "0xa75bce095842fe06e45af063eb831699f32ddf980e20fcfc902ca2631ca02613",
"maxLendableImpactFactorForWithdrawals": "0x31db483709baba5a5308053acd07bf2634f332731b317661879c618d0f5c602a",
"maxLendableImpactUsd": "0x29e9b1977298989ed1a7683018b65cb8acbcc60e5192fd76c1059701b553e10a",
+ "lentPositionImpactPoolAmount": "0x3c32fa51b15bd069ea7b9492ae965d188a2b02920e70ab1a161dea34f0f3ad41",
"minCollateralFactor": "0x23996b6d9b7a115e3ce89b84c1fb992e361ab8b7d0eee682f20dee97ec68ffe1",
"minCollateralFactorForLiquidation": "0x7c2459f97adc8e43337e81a934c826ed807ff31274e3f0092cc5677aa9ff20d2",
"minCollateralFactorForOpenInterestLong": "0x35859412d8490a4c126fe4f1bfc34c55cb8fe37dfa500acd3c8b86af666c5ec3",
@@ -1252,6 +1274,7 @@
"maxLendableImpactFactor": "0xd6ed141e8b8c6e2661ae4c99f03c1a2ee9ad0e40c565c5425075c5e1deb120a7",
"maxLendableImpactFactorForWithdrawals": "0xb6877a6bd2fa681248dd21765f9e70148c4a9d8828b25b28477a2b545880afd8",
"maxLendableImpactUsd": "0x46ef0d545d15cab8085e3b3fa590e5f0cd1dbe97e8f24becb729ed6174433f85",
+ "lentPositionImpactPoolAmount": "0xb1ffe51e28a73953e596bb398eb721fbaa5e76baa0daf35ed61480cb11298899",
"minCollateralFactor": "0x36ab3e3013ad52ba6a0d8f4a0453b7102f49cac48a2a11fa6c73dbe0aefe816f",
"minCollateralFactorForLiquidation": "0x5bfcbab875f4417b539e955ceac950cd006a69b7f451081607ba40e7fbb369dc",
"minCollateralFactorForOpenInterestLong": "0xb53e1f7357d8985ac911799567e535ae47b4b735a3aa570d896d2675c5ebb6d9",
@@ -1307,6 +1330,7 @@
"maxLendableImpactFactor": "0x1377b71f205affe712d85cc326a1813712cb326b30389154258cad6dad05449f",
"maxLendableImpactFactorForWithdrawals": "0x12e5f81e5061c091fe8da4eb9fc0578d98e6295028fb78b95908fddd566f75a0",
"maxLendableImpactUsd": "0x40eac551dff2fa3fd0b390d4fe083c05fde69ac07714f4c3b7b7effde854972e",
+ "lentPositionImpactPoolAmount": "0x5e10504e2df2f7b9e0d4f93203ac210d795d5515f628c4a893ddd59c87b9d7ba",
"minCollateralFactor": "0xb763d546f4c43a22e39e6d544d2a097e2b739449ac8125be625ca1b3edb6c7e6",
"minCollateralFactorForLiquidation": "0x58a728580355a6c6f82d3091d369b941e0376ff8b3d79274d71ad1d29d0748e2",
"minCollateralFactorForOpenInterestLong": "0x4279cffcd52e0915df8447175e708381712393531426166172e9a466f544ea6e",
@@ -1362,6 +1386,7 @@
"maxLendableImpactFactor": "0x186d29173beb29e46af8507ad99c5439541dde2f0ee0c5daaa001ff1522560f4",
"maxLendableImpactFactorForWithdrawals": "0xe646136991d826f11c1fd55ac36d40ea073be24c6353d193a821948bb77807cf",
"maxLendableImpactUsd": "0xc2038495be0ecd8d1bda4b8095be40012716d2c89bd121fa47fb714fd43a3ff4",
+ "lentPositionImpactPoolAmount": "0x86993b1b8299f1d667b8e7cf1df927971d6ab63c3001caef307649681d3c52b9",
"minCollateralFactor": "0x1cddd19b6c5ab7bac13bca435de5c29b7eb8b6d8f63653990ca7d124b6630211",
"minCollateralFactorForLiquidation": "0x59c09f1291f52daa4c169c57c3226ef99241adaf315a955970e8f7c25f3735a2",
"minCollateralFactorForOpenInterestLong": "0xf62a2cd524471634da150460345daeb42bcc47fc9a8b5ea5b1a581013edfef77",
@@ -1417,6 +1442,7 @@
"maxLendableImpactFactor": "0x893c92528968bfdcb2a8db3a3fd0d59a0469784a6a49c05e26bbf0696d241251",
"maxLendableImpactFactorForWithdrawals": "0x7d85b777c2461c1a7e4da064d63497d13736603dd9f5325cf60cc03e87e4e1d3",
"maxLendableImpactUsd": "0x8a0266bb93a239abfff419f4b80eb82e728536bd984d277b856de7864bb9ace1",
+ "lentPositionImpactPoolAmount": "0x046561480a0472652830888bd731acf65628b4a2dff051f19d7dbc909088b582",
"minCollateralFactor": "0xcc59cb6b61c7943f711dc18dfc2fa4726e3e0e23320769e9599a2362835575cd",
"minCollateralFactorForLiquidation": "0x917066ba7cd6f4221b0632336d34aded85c1e557fa3093cc7014cb86885d30fc",
"minCollateralFactorForOpenInterestLong": "0xd0b617f09379ad18f7bc551443b94d4b5c55e0023fb79c7165eec37289860743",
@@ -1472,6 +1498,7 @@
"maxLendableImpactFactor": "0x5c1355c208968eb059ad9b5206638c84d384a7bd050a8a5bd779d176eb061ed1",
"maxLendableImpactFactorForWithdrawals": "0xaabc0fbaf18db25648fee631c4ed2517dd0441bda5c364f31c021fc0d69f7e34",
"maxLendableImpactUsd": "0x1583168790a4d36c333daa89d68788c041ea06b9d22f8175f90f241efee55e71",
+ "lentPositionImpactPoolAmount": "0x0e13f064d811c29ca1726ac1b6088563060aeb7e1dfe8b4dbf01b596621e16c5",
"minCollateralFactor": "0xc887506d87b14983ab7ed186f9178fed3a134abbbe8245a13be07e42e313249e",
"minCollateralFactorForLiquidation": "0x306a88af5ce2a5f6da2d23fa1fc4da931f660d33ff5b01adb996552ee7a1d8bf",
"minCollateralFactorForOpenInterestLong": "0x974698c39aecd68284a0766fb070354eb0cc788557c000717eb1187a717a465e",
@@ -1527,6 +1554,7 @@
"maxLendableImpactFactor": "0xe673faf468e6416b8c56ac71f23fdd068a2338d118d006721482a7ea1dda1206",
"maxLendableImpactFactorForWithdrawals": "0xe73a020ca1218e9283b00c7c0667640c24988729c31c72ae05f74ab52aff1bbb",
"maxLendableImpactUsd": "0xe8b581b93595f7d71c84dabb879ee50a8ef943c07755fbe6ed96a27d9419b169",
+ "lentPositionImpactPoolAmount": "0x0c3be9a030ff7b1218f36ddd6d2be296a046c03a579df55a6d1f9ab9431299b6",
"minCollateralFactor": "0x306c4d11774ba8acc5857bc2b9eed4e6f4eaebd78ca19cc36c9e7543ee4e2baa",
"minCollateralFactorForLiquidation": "0xf999a6e4677e32df80732fac308066abf0b941fa1b8de71fa6ca65c62766fe19",
"minCollateralFactorForOpenInterestLong": "0x1a91d60f924b7371fe96dc19aec25c04a3c778b64b02909898c8ba552f8f8d74",
@@ -1582,6 +1610,7 @@
"maxLendableImpactFactor": "0x50bd4bfb7307a385bd505be86ebdd20719b391325c8092ec079e46e0b391d514",
"maxLendableImpactFactorForWithdrawals": "0xdd7e3e401c46e60998a084f097c1db69203022f848eb4c0b2699bb9925b7572b",
"maxLendableImpactUsd": "0x5fbd94369fc89ae1535ac8c26187fd9566d8bff81ec7c12e8bb0a71480eaa81a",
+ "lentPositionImpactPoolAmount": "0xf4dc83edc0a9cbf135ec125b0a2260e5459b43740e5ced199393dc08094fa0e2",
"minCollateralFactor": "0xf222dcd515762a01b5dcd95d0d7bf6220adebaeeca37241b2334aec31858d008",
"minCollateralFactorForLiquidation": "0x9a80dc36f347f59c5ebe196f2c8ec5e2915f9143d378ee582a5421ce121bb69e",
"minCollateralFactorForOpenInterestLong": "0x159b5efb14ba5fdf82eb9483ce36a5cc511603ddc0851867d2f62e061a1eb5a5",
@@ -1637,6 +1666,7 @@
"maxLendableImpactFactor": "0x0eafdffb45f992eecaba504f59d5b5274c6097c4755e607272d17d0b7526da97",
"maxLendableImpactFactorForWithdrawals": "0x7b9e2471dc5e5527de90ac527bcb204e159a4e800416d8f50b202df161e71e1e",
"maxLendableImpactUsd": "0x5e1be6e2cd707a9073c0528e7bb5f4878fdae6b4fdaae7b22e7757c70ba1d508",
+ "lentPositionImpactPoolAmount": "0x314032f20c89ed75de8135a3261e61d7461883f9743ee1a68c8b38f18e256250",
"minCollateralFactor": "0x37c9327170636d2644b4aef9428093a4b840396c017062d69214990437f11295",
"minCollateralFactorForLiquidation": "0x6427bd32e101cea4a95641d89d9c833ff5045eec210d362d5a271894653c6bfb",
"minCollateralFactorForOpenInterestLong": "0x3037baca9542bb9bf19e795a3ea8588f62fd7aa7f391835394eb39113b24f199",
@@ -1692,6 +1722,7 @@
"maxLendableImpactFactor": "0xafebff4ab40589e68a893108e1eca470ee021f6cf38fac40a564a47689a60145",
"maxLendableImpactFactorForWithdrawals": "0xe44b633524783518c74f5a088a5934399ae847c0dbc9d804dd6f1e2b0cca9771",
"maxLendableImpactUsd": "0x821fde56a37c89cb5a9277f0897836a1cae8b3a61c46528261926617d51fdc25",
+ "lentPositionImpactPoolAmount": "0xf145257db0baa708476a01d3fbbcc2016a88081a4083d76641ec44a11cefbfbd",
"minCollateralFactor": "0x26cf36b642d845e4537b703e1988ec4f179852681fa1da1da83f0c4f07aaa277",
"minCollateralFactorForLiquidation": "0x6af824714604d471f55475449bcebc7aa7b3aca42f27ceba6c7d803506af84c3",
"minCollateralFactorForOpenInterestLong": "0x093de38ced41ca0b1ed4b1125b61d2b919957df4784cfd03a2bec7169efe69d4",
@@ -1747,6 +1778,7 @@
"maxLendableImpactFactor": "0x4cb347550b736035c5556779419d724c8c41b3e914a948e225c03ae1f7b99715",
"maxLendableImpactFactorForWithdrawals": "0x96916ca557ff5867c9842839682a863984bb584c9cc3b81e67d5c89d65791417",
"maxLendableImpactUsd": "0x90c4b4a43e31fb0fda3a72f64fe6f592493a7ec4ce8713ddb9a904bde23095ba",
+ "lentPositionImpactPoolAmount": "0x6c5cfd677c3223f1e3aa3be0c4392eb8103e0107434cba35aca561e4061b3764",
"minCollateralFactor": "0x9796d33d6fd886b0f785e0e524e2b25f1e7c291b682ece47fe5ae62611e448cc",
"minCollateralFactorForLiquidation": "0x3393a73bc28e5c25db9ac6cb5d316468446a57bc0eab962823b7b1e58e0205ed",
"minCollateralFactorForOpenInterestLong": "0x1677f8025e1e4279b5a1db64264a79835c58c80818191018a56890aa23e9416d",
@@ -1802,6 +1834,7 @@
"maxLendableImpactFactor": "0xa384ae723aebe010b544d776903a19dbdf526c96a6269378389805872b13077e",
"maxLendableImpactFactorForWithdrawals": "0xc42aa701db13972c5846ace00f090eca1caec9e2fe83498a10ca01c637a48878",
"maxLendableImpactUsd": "0xb082c68f34392068dec1fd23f594d0e9232e6a4cafd65ace1fff7de68254942a",
+ "lentPositionImpactPoolAmount": "0x165c2b3fd05d13c4760d6604eb6121b5e2903cc7b201e08a8cc38e3bf2430638",
"minCollateralFactor": "0xdfe35a4a7d6fcea0730ea6a1d1296f1e1186dcdab4fec5c377a43ce80f26992b",
"minCollateralFactorForLiquidation": "0x70b5c091c0658a67df16c7e57093a054c69c4e6d02e411141176276f33a3517f",
"minCollateralFactorForOpenInterestLong": "0x28e3fb3d6672b82c0d07651dc08f2dc5b1a60a464edcc11c4ea8b5e0421cb3e7",
@@ -1857,6 +1890,7 @@
"maxLendableImpactFactor": "0xf44d56ce7e139490f7b7a4310497c507fcd82e006e6b7b93f2de4ee91278b911",
"maxLendableImpactFactorForWithdrawals": "0x229e5e1def9c9266dd5c3e7d22f10393319821c27fe674770002dfdb9dd30c3a",
"maxLendableImpactUsd": "0x476dabd1519700890e85a295007d0980df5d982e1e43daa18ebd3fdf91b32a5d",
+ "lentPositionImpactPoolAmount": "0x6df11507fb2833373189cd5b17663ad050e5e845540f143e3d69bedcbc2a89fa",
"minCollateralFactor": "0x71a615ceb63b3067aa53360b743986465151e56e727f6963baeb6f4a25483e6f",
"minCollateralFactorForLiquidation": "0xb0d9ffa1e7e99f2fcef00b4b23323d9b2d060bab7c552c2e7e56c32a638309e7",
"minCollateralFactorForOpenInterestLong": "0x5b602b41a9133139c01e6d0627ad253da782dfa70d615dea06e636974c0d2190",
@@ -1912,6 +1946,7 @@
"maxLendableImpactFactor": "0xc20b6cbf996644c2edfbc13175a89c561b9a6eede297cf186e514e71d47fedc9",
"maxLendableImpactFactorForWithdrawals": "0xf4d8ec3322874c694e3e3a263efee74d7d2d26289153ea6359ffa0a99b2d79fa",
"maxLendableImpactUsd": "0x07ec6051ce67255d5560112358474ea5d701dfbe4a2e70245dbe06b842e552f2",
+ "lentPositionImpactPoolAmount": "0x65341f28ad76202a7d9e80d060cebb19ace428b91df9a33bf46d81fee7d52d5e",
"minCollateralFactor": "0xc3e99d30df1bb7237cf5b6a371f53440e558f68381ad34cd7a39c8083f6835f3",
"minCollateralFactorForLiquidation": "0x2a0767e62c001f898fd730979111f1910f5191d8fad78cce263bdf4caa573131",
"minCollateralFactorForOpenInterestLong": "0xa9b976f225b7a1d9aa149a1674b712b8da2245e1d36f7e336a96c3794de912cc",
@@ -1967,6 +2002,7 @@
"maxLendableImpactFactor": "0xdf991481ba292a004f06af191f9ebb817694b2e7b12bfe21dc145fe72b321dd6",
"maxLendableImpactFactorForWithdrawals": "0x264dd9fe7edc154fc6ceeb16f6691474d0bbd1150ce2781e268f416b7737040c",
"maxLendableImpactUsd": "0x05dac597c6a585a40b6fd862a6ca41af6a8802157b0ff18cd2dd20bd349871e1",
+ "lentPositionImpactPoolAmount": "0x91fe0550c90f1066419d94226afba5d1b82139e28894200654faa3d5ff7f78cb",
"minCollateralFactor": "0x063c26170386b99ed813e28bbc466b472d58fbc4c565896708a259e15c426026",
"minCollateralFactorForLiquidation": "0x184f66f184f238b6d676e9de3e79ca166004e6e66c6ef5e51ee3ead951e11a5d",
"minCollateralFactorForOpenInterestLong": "0x49b7345940105477f772afb7f563688a99053ca3edca50f043ea031ef1bfa630",
@@ -2022,6 +2058,7 @@
"maxLendableImpactFactor": "0xdff7d16f81d953b578a822edaabed7fb5ff494ea6094374791de6d5cb13773d0",
"maxLendableImpactFactorForWithdrawals": "0x4da16212d85f59f9b6708a03c1d3e84f5c264b72ccf4f9c364d6b4ac9f592650",
"maxLendableImpactUsd": "0x3eb8c05030e5c10e984bd45d2f23868fc2c4569788bad788ff4b540ee1e65f63",
+ "lentPositionImpactPoolAmount": "0x549e6fd0cf6e4d3901590baf980d1f657669a7cc8893469ddab2cf0679830645",
"minCollateralFactor": "0xb30c0c9c615ca78136924ffcfd347ccbcfbd07cfbb066331490e171eb1a0a98f",
"minCollateralFactorForLiquidation": "0x716807f898c897a453ca05d0f2aa6ddcca6f7db64055b57f81c8e41ea7848fa3",
"minCollateralFactorForOpenInterestLong": "0xffea67e6c99a9d19d8e0fc2310bfa16b75cdc3634fa319d67a8ddedd5aaaab29",
@@ -2077,6 +2114,7 @@
"maxLendableImpactFactor": "0x79f4de524adfca59337487db23a19d9ce11471b5f0acaca903475028621ef792",
"maxLendableImpactFactorForWithdrawals": "0x943db693f24a5f67f6db804d36870b3f62823d87ee12f99076a832c8a6814aad",
"maxLendableImpactUsd": "0xf4158b055f1f0f76b4688b6f31e847b863fc03b6dae2bf72fb6d6a2c0bd98b5d",
+ "lentPositionImpactPoolAmount": "0xdd99060f77d0633a2efd4afbb52b296a9fd0cc02456405b653b0c1a4c70f5bd0",
"minCollateralFactor": "0xaf529b6d8c16416ab7e8dea0fee2c88b02a2582e96fd786c3c4aa1b6dd7ab315",
"minCollateralFactorForLiquidation": "0x3bb903a46ad84ce28b36d1c2d16311120b9390829b2edb3e8495b0ef53784c01",
"minCollateralFactorForOpenInterestLong": "0x4d83d368f9ff304adca7477a95605fca7d41bd25fb35ffdba3dc61e7bff2a83b",
@@ -2132,6 +2170,7 @@
"maxLendableImpactFactor": "0x85aa7cfb347e01586d92dca985ea1a0e36b50a35e5c25d595b708f4fe001dd61",
"maxLendableImpactFactorForWithdrawals": "0x092a2d629322699c7ec10fde7e4c4064effacd509bb1a530cb300df8f2ec999a",
"maxLendableImpactUsd": "0xb3f6e2c9d5a0c535e6114a8218f072fe191dddc6b2197df078e7a4e1ac504fbf",
+ "lentPositionImpactPoolAmount": "0xfe76998dd2b774c72072da177dc87bdaf48671b71fb209e11388fae61aba029f",
"minCollateralFactor": "0xde8e2683a32db2582bae01bac254fc9ffdf847f49c73f8e40d70831d516a0d63",
"minCollateralFactorForLiquidation": "0x1c9315aa7049bbb5d2b8bc32ed041d6e07526fc71e2658d12fc64700ba0a85cc",
"minCollateralFactorForOpenInterestLong": "0x2352a72b34e744b19d46183f2e17312f8c6d8e6e55ee031745c01426f29f46ec",
@@ -2187,6 +2226,7 @@
"maxLendableImpactFactor": "0xb04fe6a6c1deeac6f2a338514cd89d6c5c9e2c9486abb7be28cbc3412319e88d",
"maxLendableImpactFactorForWithdrawals": "0x0a0a26cb36e51ab9db31acafc82145edd6fe873661f62d861ccb84c15eed6e2a",
"maxLendableImpactUsd": "0x7bf131701265e68dea800bb92e5b2925a107dbd666d437e2cba416a10a63aea1",
+ "lentPositionImpactPoolAmount": "0x644139f34b3bd6c2ce0b14473ad054a9c728a84e61c95bb946a447cd310648d0",
"minCollateralFactor": "0xe12f227cd7530228e3e5fd17cc6e483d16da92b2a84c0e5ff1da9e812a5b165f",
"minCollateralFactorForLiquidation": "0x5424fa2cdf22e059599b3129445bc0af41411203cd1c67432b1676ab75977d3f",
"minCollateralFactorForOpenInterestLong": "0x17278babb19736222b2d9de676d18653ddf62c086d3665741aea4e5073e56fc6",
@@ -2242,6 +2282,7 @@
"maxLendableImpactFactor": "0xac8263f8aad77e8440d7519e2ccb1bc6df8c27e3cd335fc293090929e8ccd9d4",
"maxLendableImpactFactorForWithdrawals": "0x4c498f0497fb8a82fb336a222ead9d6cd2dc6538bef226bbd9ea604d60745b63",
"maxLendableImpactUsd": "0xa40dd2d46fe34bb43d4cd0f4e47af87dd9e8416f5eaccf9b2ee8766839ed8715",
+ "lentPositionImpactPoolAmount": "0x38fb5105ed878c704c1bb0b5a6a2d3445010eb2796f43f9b22178bf5a1f0d980",
"minCollateralFactor": "0xd1a9d8c3945e025659b09a50bbdf19d4b9a115dadcc662b86b59a61af9e795ce",
"minCollateralFactorForLiquidation": "0xf753b5b18d0dd10ddf23bdd1059939f3879247e5f5e1c6b0352cb01bcf4cf5e2",
"minCollateralFactorForOpenInterestLong": "0xbf0cbbcddabe14afa33f3d923e06fc7c713ad118078f7e77f3d2bb9a8d648619",
@@ -2297,6 +2338,7 @@
"maxLendableImpactFactor": "0xe71b2fe24fcb64b2aee6954430f838ba6446c64f61ce8df03ba35e2aeff60031",
"maxLendableImpactFactorForWithdrawals": "0xd00738ffc5c7205a5e40a094b0e53fc88107dba7dc1460e648c58d97d61474dd",
"maxLendableImpactUsd": "0x0df0549faf708fc4ac7c15268724150a810bd639c2503a582946fccd53ac76bb",
+ "lentPositionImpactPoolAmount": "0x16810e11234a60e065de1af42a4b98ccd19642a8c17d5b226e8c8293ac7f985d",
"minCollateralFactor": "0xeda57e7c9f036aced07cbf0300755e5a198f5b38b8f38709a4b3db66c6614d70",
"minCollateralFactorForLiquidation": "0xaab69b6b17ca07fc7c5e074a238946779c61ba7b06c80ab5ae092d0fa14f5d04",
"minCollateralFactorForOpenInterestLong": "0x4e55b36b90bb86b6c710c7a94743860cf086374614e1de9788b5d60f6f2af678",
@@ -2352,6 +2394,7 @@
"maxLendableImpactFactor": "0xa4f62f601d3256e54696361f07a5311f84a99bad5aab511eaec3462fcd04a27f",
"maxLendableImpactFactorForWithdrawals": "0x2e7060aa7c0e96af71f094bc2fdee585d9fb1cc58bd9d06616040b634f612a5c",
"maxLendableImpactUsd": "0xb6636bd7d6c845b8e827c4737a6046dcc18f33ca9fc08e3e632b4fc0f6d298aa",
+ "lentPositionImpactPoolAmount": "0x2b7d8014d69c6256c58ca4cc371bf72964cdd024778fd12f492d23f7accf43b7",
"minCollateralFactor": "0x77bde089799540169026c8dd1d4ae2e2128599fd8b9e31446c4dcc83bb9c23e7",
"minCollateralFactorForLiquidation": "0x07395d2acf2523661f22bac10669c8a51ca55b1618d2d5d8f9e293fce20539de",
"minCollateralFactorForOpenInterestLong": "0x36e72daab303600b4522ff9c0d0bb9a1eaf31c1cce97b8ae17084f0ebefe5924",
@@ -2407,6 +2450,7 @@
"maxLendableImpactFactor": "0x2e64eee7491505d680b57c4c65166533cc03a150e3aaa4f6b886de62ca91baad",
"maxLendableImpactFactorForWithdrawals": "0xb16b9e1df74cf0b2170913a3fbe6983fdad89a333d154b095e3e2f0666b7d8cb",
"maxLendableImpactUsd": "0xd351d973906e71859bd3af9cf85c2cce74231224edd2c67726a5a3bd39e7dd30",
+ "lentPositionImpactPoolAmount": "0xf3e0a20ec0adccb47462bb3c3e5755187c6988471571b3812959c46e0fac1440",
"minCollateralFactor": "0x64c28b87c54a43b52e4e78491ecc0749386e5fa99986c78e5855e4e0039fdd01",
"minCollateralFactorForLiquidation": "0x80c09ef7c9fd9bd8cfac4a4dfea9a09e895612ea378f41668a753350c6932f69",
"minCollateralFactorForOpenInterestLong": "0xb1f9e034cd8013cd53cef9f0bdec7c7bdbc4db862e555e88eb9d1cf5e6511956",
@@ -2462,6 +2506,7 @@
"maxLendableImpactFactor": "0xae87f11395854df27730c03627fe9fa049226d435b0408025dcfb489fcf06a0c",
"maxLendableImpactFactorForWithdrawals": "0xd43e4b0d9ebf88c4144b022f8d3241dab3b5c39e4351eee9674cc079ed8df106",
"maxLendableImpactUsd": "0xf45c560e511f5fe46d095ba361ff156cb4a0f51a14bc5edd67ef771816704a80",
+ "lentPositionImpactPoolAmount": "0xa6fcea5015ef7382e3050920351cada8e11a61c54a083e02e1c63bcc19f3ce09",
"minCollateralFactor": "0xe987e328f86edb1ddbe92a10a5a8ed7cc9e27012a3f8eacabb95015d8d4a5029",
"minCollateralFactorForLiquidation": "0xa872cd93df49b89091c0c052b1f9816b051bc3c837802ad34c28a32716a65cf2",
"minCollateralFactorForOpenInterestLong": "0x43fd25f73c5ad7cfa51e170a8e62c4b5267f167b881d77c8db40d0fff9b0cbfd",
@@ -2517,6 +2562,7 @@
"maxLendableImpactFactor": "0xabeef6af10a3f56b35364626ee2ce74ac4b2fc5e5c73249ff5d2821ee2b4389c",
"maxLendableImpactFactorForWithdrawals": "0x99773bf20f3592fbba4ae7d96470d273aedbbc7be2a59f8e0b937733aaa35bfa",
"maxLendableImpactUsd": "0x45a363babd50926907d227376a252d13abf447ed356916cbfcae1ad20d79a858",
+ "lentPositionImpactPoolAmount": "0x9b5e96a39a758cf2b91a6c525554121f2b13bf3b7d3f84ceac955336851faeac",
"minCollateralFactor": "0x4f281cdc49e1f75ea1a028c8c23e00c1331011026e794caf8547cdcfc8afbdd6",
"minCollateralFactorForLiquidation": "0x17804f6665dca57aaf8fefd6e6134d40f30afe8dae60b79da13190d4ca798641",
"minCollateralFactorForOpenInterestLong": "0xb41bba385bea8b61ee3a31a77f9b22ca93ddd1ddd4c0b2122a1479c41245a918",
@@ -2572,6 +2618,7 @@
"maxLendableImpactFactor": "0x761ab4d85c8d02769f1892e9544527e03bf6c30f447f04de8536fe2f3c8700a1",
"maxLendableImpactFactorForWithdrawals": "0x760851489978dd8127b1ee813fc067383fa463de207a6ba4fae5d02888dc1d65",
"maxLendableImpactUsd": "0x3fa3b2f9d004c88d67722537d6e17392f8c8dbb12709f592ff982371c6bcd483",
+ "lentPositionImpactPoolAmount": "0xed9d636ee89e792a0f7c913aa64beee264ab111f8afcd74b702e155b11507bae",
"minCollateralFactor": "0x6e2e2d9c129dee202f1002e2c7b8fa62b854c04ed92b2e84ccc8d7874d1d2b82",
"minCollateralFactorForLiquidation": "0xe95b93b905611839520fd90f7f70626dda38eac36b11245e48bd0013c4a96ca8",
"minCollateralFactorForOpenInterestLong": "0xc777cb82bf5fcf2085423ebb02d83a2e797ee69fe92e28bb541585d6d3ef9776",
@@ -2627,6 +2674,7 @@
"maxLendableImpactFactor": "0x8f2d0ed4f96fe24ed2d9c8dd642fb1acfc10a5567e47c4787f50deef6de62e22",
"maxLendableImpactFactorForWithdrawals": "0x2ba1e6446967b1ea874ebf51400cc46af88e33787ed9d452ff0bd45e47e3e0d9",
"maxLendableImpactUsd": "0x2997295762567bfb9f36140349930ff5febba89eb2aae6d21e157d82bd601168",
+ "lentPositionImpactPoolAmount": "0xae71a7ae57b6453066097069e546d52946ced985ef929af81540698680327d02",
"minCollateralFactor": "0xc27860b61b54460909bb28e4c88e66aa1d27de104b8b444fba674362795a4068",
"minCollateralFactorForLiquidation": "0xefd57fd6c01e403503503b2f4e057243ce629c1fbb965350bc5b699db54e3515",
"minCollateralFactorForOpenInterestLong": "0x3e352a600ba2709aa41ad9fe571943bf3119a5d4e2ed56b8d9c26f6b61c24df4",
@@ -2682,6 +2730,7 @@
"maxLendableImpactFactor": "0x280acb1c344ac555de42d4466eff401fd585fa62c27a0d1e3bf74c6a52e90731",
"maxLendableImpactFactorForWithdrawals": "0xce052928845fde42d14590daf8b4b29cec8ba7f4ef1fc3767ec4c2c8882aa57a",
"maxLendableImpactUsd": "0x32a2ddb5e22d3feceeffa3c959588640a038d3fcf8e70f27b9903c36ba56ada9",
+ "lentPositionImpactPoolAmount": "0x0fdf775c457064438c45c88dec178fa52e3bf0795d656abbd58d0f978044d177",
"minCollateralFactor": "0xaf43ec1b76b9c6c2c5167932b08308377bec48ef36aee9e4f40bf44013315ea6",
"minCollateralFactorForLiquidation": "0x751618cd5038dcbf1a35c7b6a4fad895b25d3c85860a57fd5e6f5f677ec85bba",
"minCollateralFactorForOpenInterestLong": "0x1b990975b2ec9cb3d7800bdcf4c2483ad891a580d9bb318b533b40c52c2f9ba8",
@@ -2737,6 +2786,7 @@
"maxLendableImpactFactor": "0x9bde08cd019f4d098e8014d5b59827bf15a02053eb110a570e17724780fef0ec",
"maxLendableImpactFactorForWithdrawals": "0x6e3e2275f3536b7802157f33a7463a6e30962c362542dd877c9c77b3b035535b",
"maxLendableImpactUsd": "0x7b3e8843f6bf26cb9724c627ea4e654dc7617e1582e78ce5405bffa27e3a4793",
+ "lentPositionImpactPoolAmount": "0x6e619860837358f304e18598e71571c6e17424b2afe08d0a9a1ae922a4d0651e",
"minCollateralFactor": "0xacfac03e8ca9bc9ba4e4139fb22189ce60223a4acf5fcb1c52fe6f5720c8285c",
"minCollateralFactorForLiquidation": "0x0e0c4eca25323de2ad594c25be09587a84873207c577ed3466d2c25c5c588307",
"minCollateralFactorForOpenInterestLong": "0x7aba0e66c4752d2788a33b21c7156bee0a7e7db1ddec971a23e4745cb4af6a44",
@@ -2792,6 +2842,7 @@
"maxLendableImpactFactor": "0x5073ac467dc2c2772cef5a355213369d78663bf0cb05153167e39db26e383c48",
"maxLendableImpactFactorForWithdrawals": "0xea083ff57c4f2b40a56513c09f35108e64c3c8a55d5b9c85b4e8c5162d846020",
"maxLendableImpactUsd": "0x823fee4780ac0aacc1528039fc1ae323c007c04cb5f641d08bf1e7d97fe04bc9",
+ "lentPositionImpactPoolAmount": "0x68e07e3ff441ee9303817bbae7608d4ed52d779dfe1699b57d1f994866445222",
"minCollateralFactor": "0x6dc630ed9d38eb4d509bd15a962a8f3f3e85c305ed38bd87b5a691f8e80c6718",
"minCollateralFactorForLiquidation": "0x5e72cbdf15c7c2759bcf483ad4e11e757e1be816fb2cfb21d0a451017677e93f",
"minCollateralFactorForOpenInterestLong": "0xe92ef25b6ac87cf0fe6420ff0b94dedb1dbcb99afdf6c01f4b0db2532a75bcfe",
@@ -2847,6 +2898,7 @@
"maxLendableImpactFactor": "0x1b745ff1648a88505d8071fd9f56d0ac11fad07ea60590542c7b725466cab15e",
"maxLendableImpactFactorForWithdrawals": "0x13e180d1a458621dc1a012653d5c163bfc736196ab576bd438f57fe9ad4936d7",
"maxLendableImpactUsd": "0xe4bbdea4d6f47bfe9357d37aee197ecc5b66673f6c585cb4cc723a12dd0557dd",
+ "lentPositionImpactPoolAmount": "0xea50da76a92602c6f9614ea72225692565cba936381d848c8c6ad83e2bde49ba",
"minCollateralFactor": "0xde6358bbb99972ed5e13eab04486dbe4a4fc8610e3b7c77b120e6bd807cd78b4",
"minCollateralFactorForLiquidation": "0xb62e8ac26d1c39798214c05ecd3b4d2dc5d3af8866088b3f315949b47730a843",
"minCollateralFactorForOpenInterestLong": "0xe51ceab2786b6da44608fcf1c9da64d1760bf55d57ff7ea1f9376b82886cbb20",
@@ -2902,6 +2954,7 @@
"maxLendableImpactFactor": "0x4e8f427a15641a64d02c069e41212d767f084cf5beb7cdeee73087b51caa18d3",
"maxLendableImpactFactorForWithdrawals": "0x88f85dfc2b759826e747760206e5bb4ace1299758e3b3bd5627bf8306211d108",
"maxLendableImpactUsd": "0x7a6801727c0d162294cc14fa0727bf7580c8c9ad479bd4c1f1725b4d6c6641f2",
+ "lentPositionImpactPoolAmount": "0x3beb34e325a0559ba81778d8f79289d78330d8ee206d1dcb858d5cf69e152e2d",
"minCollateralFactor": "0xa8f02a22712a973ce74cc208414ed1f87bff38cccb528fe8aa5dfaaac33387ff",
"minCollateralFactorForLiquidation": "0x4d588606a1bcba8846d247f4195a5ef8db551e3172b7588dda7a762c4b02dc5c",
"minCollateralFactorForOpenInterestLong": "0xf326ae64850d57c362abbe3e1a2223c94f4a69b17e96139800b5016fe434d4ba",
@@ -2957,6 +3010,7 @@
"maxLendableImpactFactor": "0x910deff99a9c7c4041bcbe7140c4fbc75eb27109d1643f2ac719094e026cce79",
"maxLendableImpactFactorForWithdrawals": "0xd4689134121be2f40b99593ec0c6cfb536e1c4472ab5f317b4e3de13fff577f3",
"maxLendableImpactUsd": "0x228ccbaab0faf5b2247fc5c7bb3bdf152ea87deef6a048ee3d574242d15823ed",
+ "lentPositionImpactPoolAmount": "0x1f58ff2d1f061a9d3a0c9565f5ece4f09b6f5e0fd60e8d9b97aeec70eaea0628",
"minCollateralFactor": "0x381baf1ffa3e7466635bafa799da30f2b9b7d274d6c5373aed1627655f1c84cc",
"minCollateralFactorForLiquidation": "0x09f7ab7442e66755f5bfd66d2e3eb08ec1ce60a9fe6f6369b638528f70c6e25f",
"minCollateralFactorForOpenInterestLong": "0x7c973b82d160218ec7405501b5ddc34bb772866294bff340a0046a665e2247d3",
@@ -3012,6 +3066,7 @@
"maxLendableImpactFactor": "0xdaaf876a03460b3249d6fed5b583e70757f5483e9fa0198c32ccb8a3a959750f",
"maxLendableImpactFactorForWithdrawals": "0x33df74336a7404127079f5c81aa656bce170179bba7b35e9563f727c6859bdcc",
"maxLendableImpactUsd": "0x3101e2eeb89e61a703e9aa3a52542bd271dcf019a3025afc14196a278393fd9a",
+ "lentPositionImpactPoolAmount": "0xdde34cc0979d43c77785df3be9a3547fe1ab41cac5d582ef9d999bcb1dfab87a",
"minCollateralFactor": "0x20d8ab78d0283316afeab33bf731344b07da86f7203514d76ee23baee753707e",
"minCollateralFactorForLiquidation": "0x4678d0672e6f710a1b949e87f9d131a666582b002ba33e4611370cb314c4fbbe",
"minCollateralFactorForOpenInterestLong": "0xb67d83d1aa168418e39a9e63db05fc226ef950870c88cef6489ba60614555ec3",
@@ -3067,6 +3122,7 @@
"maxLendableImpactFactor": "0x81e057e65b35d424b515c9d77bf4026c3427d140b9419c6200ba809dd4f2f419",
"maxLendableImpactFactorForWithdrawals": "0x906e115c1e1eb40ac022f964967ddeeba02b0c78951d5e016a2286fe6a611cd1",
"maxLendableImpactUsd": "0x31d2e65ebed0c8f9c4a1c7647640fcb6cd873429e923ab11432bad93b9f5098b",
+ "lentPositionImpactPoolAmount": "0xe4484870a22e98ab6bc91ffea8cc17b8e03faee4c909bf126db859dde45bcacf",
"minCollateralFactor": "0x464c137d7e96e96fcec38af328f9f2e20e1ec3ca751b7e347850ba39d3c519c2",
"minCollateralFactorForLiquidation": "0x63f56c8c49720b8c624535a0612b2838aa6c2fd809d28660be826e5593a84ab5",
"minCollateralFactorForOpenInterestLong": "0xac1d1a8dd04b4b1ce72264801861bb8c24d7085a54a992bd00af1c678dab9606",
@@ -3122,6 +3178,7 @@
"maxLendableImpactFactor": "0x7b2838de670aaddf75fc39a8e07ebb8b9ee6df9ff61c2818e8aea056458b8ba8",
"maxLendableImpactFactorForWithdrawals": "0x6ff0d20259999b453cd3b269bd10324de0c37d28038acbbf876429482dc00a97",
"maxLendableImpactUsd": "0x8a6e25ea26a52c10705407eb6152e0047ebf18a901143d38d52873163db1a069",
+ "lentPositionImpactPoolAmount": "0x85c402443e027e0899d4cc1f1a5da2f11c01067263bc00bc9ccbb1a605e83cfa",
"minCollateralFactor": "0x68a19f588c4ad0d3e1ee1c870ff0c3d4600a57e7be82732621425395992cbde1",
"minCollateralFactorForLiquidation": "0x7bfa38b3b418ccf0e7148ef4f83761ef84dfac2ede0009121e61a79cca9a8869",
"minCollateralFactorForOpenInterestLong": "0x3b95e2164fa00e54a136f46ac7791ab382b33ca305385943a18908b26110b691",
@@ -3177,6 +3234,7 @@
"maxLendableImpactFactor": "0xd8bd66997d12ba501a38b32b2d8f229fc3de3d67c9244a6153ab1183468f20c7",
"maxLendableImpactFactorForWithdrawals": "0x519789779c6ac9e09dac42534471068f2f66ba3af0bf3e9bbcc7f5dcb8723c1f",
"maxLendableImpactUsd": "0x67d08113992d07e0d31c1d901044d8106805e2b0a9dad9bf7bc799ef06417e53",
+ "lentPositionImpactPoolAmount": "0xb9f3834e621a32b9f4c7d0935a0df69c6c0e74699f08124b521a99bd395a6ea4",
"minCollateralFactor": "0xf57f95847b05863e3bb30297592097fcf7c8b2a2e25dec83ec531b914747bb4b",
"minCollateralFactorForLiquidation": "0xda84c5039b11ba8791d306f10ba8eb5897908ddfb3553dd90ae15b19a34558ea",
"minCollateralFactorForOpenInterestLong": "0x7ee7a2ce8cf97ae51b250ef153c4e47b752fe2a51865364cd7e5e0d96213560a",
@@ -3232,6 +3290,7 @@
"maxLendableImpactFactor": "0xaceaa6ad7a40f895b33159fef9d68e6541bae7e2809915eba26d0866ad3a3c7e",
"maxLendableImpactFactorForWithdrawals": "0x5dfd61350cb491e144e2503d41570158cb53a420b25d81a1a3c085595ab3ebce",
"maxLendableImpactUsd": "0x1a15338129bd487248d0aed2daa8622bd892913b84243c6f2d80e4be9722ea85",
+ "lentPositionImpactPoolAmount": "0x6ba48a6c4030c524de2c59cfbe6b64fee861b42666ad0b6785dc99cb05922fdb",
"minCollateralFactor": "0x876a4e9018e1ba1655bb96f13e4ca16365b7a5ad565f3f2005205f84cc1df97f",
"minCollateralFactorForLiquidation": "0x46faae59a599d91c70cf77626c8a6d97ddf7017fec20821a1d6cdbaa485a9178",
"minCollateralFactorForOpenInterestLong": "0xdbe85b764eb648e48f9fc7ee2ca91b67515bd3c9e5093fc110b0db61825fc00b",
@@ -3287,6 +3346,7 @@
"maxLendableImpactFactor": "0xc27401710cef786e506dc79ea1f00389be98e1816acb10be44c34bb83432e01c",
"maxLendableImpactFactorForWithdrawals": "0xad60473e5dec097f1450caba4b97a0d3c5ce91549067ae465f31c08914b1d28a",
"maxLendableImpactUsd": "0x503a20bd9e89616ebb0c2f629d49ae2fb07d4552848f62dba0befbc3cfd339f5",
+ "lentPositionImpactPoolAmount": "0xdb09e993c789c1053a7d8d177123604ed860d7331a10cb8fb2e6f0be9f47fb8c",
"minCollateralFactor": "0xf8b84b1cf5ca5b669e90e9fa97bc22a784f39654433ffaf839591bbb9fba803d",
"minCollateralFactorForLiquidation": "0xdccb44a6021a756a790c10935251bd0bc376b3969322208dc9af6c87e11f56b8",
"minCollateralFactorForOpenInterestLong": "0x74c0a14f2a215ff8ff5908b12fbaa3065d35c06a533007ed5e577223ebf46e4b",
@@ -3342,6 +3402,7 @@
"maxLendableImpactFactor": "0xa8f2560e946160759082aaa313cd2c092a0b062e95cc01a2070211a0e9199cf2",
"maxLendableImpactFactorForWithdrawals": "0x4a5efe9a5faf160836b4b55a024b41157e0be5a5fd38f96fd854fbf79d809d4f",
"maxLendableImpactUsd": "0x70d4966337c2ecb624614d2358cb2865b871651eb6eda2f17d2fcfa80341f90b",
+ "lentPositionImpactPoolAmount": "0xade099a38978b6d93e15dd49561d7f04cded44421f1cadf603ed6359df468c99",
"minCollateralFactor": "0xe9bee751eeaee778244a0b05e5dea9741d42b8f60a6527812d559db10378364c",
"minCollateralFactorForLiquidation": "0xf8251492b7b09de9de757e6c12b0417e0e8afc7471ea341141af2c59de187e55",
"minCollateralFactorForOpenInterestLong": "0xa588997b3b52f45c5ae3dd23491184ecdd8c73a4a3ad208d2d9b4b83d653cf2e",
@@ -3397,6 +3458,7 @@
"maxLendableImpactFactor": "0x6597b060c7043b7ffaf7cb3d929817b3f45c47e81f83b063090d41c1e1e93e75",
"maxLendableImpactFactorForWithdrawals": "0x4ffbbfe4b22be85287e38705df449305a9d176cd27e7459cd05d6c3e99443dfa",
"maxLendableImpactUsd": "0xd43a5d0f9ad8d80a0df71a21de112f24c8c4b72c397f5e3593fbaede2c1619e2",
+ "lentPositionImpactPoolAmount": "0x82e1b538ca1b185d0b3e0549cd04f483b89663c7b99e60799b9c8ded2ece36d1",
"minCollateralFactor": "0xe62544109042c59f4f79a7aaa8e44233eb129115b7b113a691ecfe81d6cc82ed",
"minCollateralFactorForLiquidation": "0xda36895ddb7fc90ac64dc9ca121874177903db68868ec4aca2e26c9877083fd1",
"minCollateralFactorForOpenInterestLong": "0x23d5a4de10d52ac5736f00723cb93b596ccb210a54534daf46984afe304838d6",
@@ -3452,6 +3514,7 @@
"maxLendableImpactFactor": "0x931757e2340ad964545999c2359c1e5034f1254c4a5ee40fbf9a9102bbc1e89b",
"maxLendableImpactFactorForWithdrawals": "0x100160edcd2bfedde8802fce2c9f72bfc6c51761e924993cda9f3b3defc0aa32",
"maxLendableImpactUsd": "0x3be800af705a3107131e9f2e966fe51e48125a537594aee72f16eba592138a8c",
+ "lentPositionImpactPoolAmount": "0x7720f3c426ac4cf7ddd9a6c889d503d351ad6d7caba452ad52abf2f05bff0e27",
"minCollateralFactor": "0xc119284ca99194e4d943a6af90e4dd7fb4bb14b050a974fb83142774cba81786",
"minCollateralFactorForLiquidation": "0x4e67474f7d9ec9e7dfccdebd0892b8f96bc85a36a16a90e6c8e1a54e85c4817d",
"minCollateralFactorForOpenInterestLong": "0xdc7d2b11c98f133ad856f4e38b92fae525d6a2ae80ceeb3b420e240dfad9849a",
@@ -3507,6 +3570,7 @@
"maxLendableImpactFactor": "0x9a3bf9c78080a358487159a8b6e44275cf31d3137a1097c7d64622757e25d32a",
"maxLendableImpactFactorForWithdrawals": "0xa295945573837b377763d6f09ac4ce18ec3eb2557e4292b645d37104a4501184",
"maxLendableImpactUsd": "0x03e814c56af2eac103ecfc5e34c139e8bb79c7e6c3e4f00b8173368e6ee22342",
+ "lentPositionImpactPoolAmount": "0x7d30fd1aa9dff7273c9a6073d15e5d3e37037dccbf4862050cad961a4288dcbe",
"minCollateralFactor": "0xc3b683211f897fd3d5139249aff11aa9339db2b59342fb4dde8b9f241ac744b7",
"minCollateralFactorForLiquidation": "0xa4dcc59c9562a3cdb7480e3bbd33b15e0a7272ccf9d3d453df784176ac492b18",
"minCollateralFactorForOpenInterestLong": "0x632d6bc9d36199ead3660e1d54803d97147abc31e2cac1b18dd386d250f44a2a",
@@ -3562,6 +3626,7 @@
"maxLendableImpactFactor": "0x39410aa221bb52fda47a9a9aa5bbc3fc56ac816190b4f2fb9ffbcae10a758041",
"maxLendableImpactFactorForWithdrawals": "0x701e4d0f98cc7a405c786c2285854dcefbbb646aa3b7ceeca24c3dbd24e698f9",
"maxLendableImpactUsd": "0x9fb3ea52913ff1ff83859b0864d2b69e30ac8e3e7e58b75f0c504add0ed57b4c",
+ "lentPositionImpactPoolAmount": "0x58228cc255c9cdb64eea767639bb2533df63991bb9855e5ac80740d32c1c43cc",
"minCollateralFactor": "0x74ff3abbabfffd3a5805a7c152e5b6f0d38444c6b1cf3684540fa3faf6f7bf57",
"minCollateralFactorForLiquidation": "0x373062bd389b4f542a94179cebaf0e1979ec7f3d420160cf1004f6599899fca1",
"minCollateralFactorForOpenInterestLong": "0x635e26e9daa2510e295f35fa17f561563e7428351b9282c13d5c56878aa57f83",
@@ -3617,6 +3682,7 @@
"maxLendableImpactFactor": "0x788f98ffa2190a5988b35dc79455c3e80c54a0c8f6d797588ef056a348ab0c38",
"maxLendableImpactFactorForWithdrawals": "0x5184f8265c3a48b345a8c09d321d60ebefc9df83b223ac00fe70440baeb2f23c",
"maxLendableImpactUsd": "0x110a45da52b3e7db79bce35164417ea3233f51addcf53ea56a5cb548b3fedbcd",
+ "lentPositionImpactPoolAmount": "0x63a990834e9688db1597465ad191bfc5899c6158d1eb5e56bf0b43b4570ddfb9",
"minCollateralFactor": "0x331419dea97f8be91933915bded722dd38f3b607cffba6deabf347336fdc3141",
"minCollateralFactorForLiquidation": "0x008138086200d4db7f493cd1697d2047828dee4c011532ed6d71a47f71aa6ca6",
"minCollateralFactorForOpenInterestLong": "0xbc8a5091e0c1ff7f8b613fe045ad5ada27f7f46e2025bd0365840c89e99bbdbc",
@@ -3672,6 +3738,7 @@
"maxLendableImpactFactor": "0xdad319cf45697bcedde77cfcbe34250d74395c10cca8144e0cd9ce7c3db4a5f9",
"maxLendableImpactFactorForWithdrawals": "0xa0dcc39feebd4d40a2fa906c4dd57ad7568e21d02ca7b29f80f2a65cfaba8df7",
"maxLendableImpactUsd": "0xc041071fc0ff246cb4e5fb3bdf450e6e15863d4123e7681df11b25b75c0e2e72",
+ "lentPositionImpactPoolAmount": "0x3f8b0002f7421a5195a29a0d8a608e2564aa28856e490bfffdacc955f679bee5",
"minCollateralFactor": "0x14f519d670ec6e5b2cdef769007dfcac09f7edd6f64da52fddd8a2160f7c51fe",
"minCollateralFactorForLiquidation": "0x41ba01e8c89c5d7646bfb600f8196c7bdba39101507971f06b9b0377054a7023",
"minCollateralFactorForOpenInterestLong": "0x12be7656b291987a3022965d8be409d4ed7feb1d382eeec36e6d67225d120789",
@@ -3727,6 +3794,7 @@
"maxLendableImpactFactor": "0x82e7f2ec187c1ff710ba4e3e47862c411ae48d8830278a64fe9799990f3523a7",
"maxLendableImpactFactorForWithdrawals": "0xe0b2a367ae98b305796ad880a05b938d573d1bbbda6b0ad17b8b0979e19e4038",
"maxLendableImpactUsd": "0x861ab51a6e050f8f87ea38c363c0dd0daa424191e606a9a3168fa28d926917a1",
+ "lentPositionImpactPoolAmount": "0xc674683266af6726324d60d4d9ab8343d0adedb4e571e32a91fa7faf189464a2",
"minCollateralFactor": "0x522dce74cbd5b4d440202a34f633bc1a0fad761cc20ccbfd6a6ed661a8e22601",
"minCollateralFactorForLiquidation": "0x9b94fc585564e4ce1edae95b097a9949730d58e43dbafd70e0a5c10203b6d9a0",
"minCollateralFactorForOpenInterestLong": "0x561ab444da9e0a84f33004689eaee0620921f53832690234974beadbb2874c16",
@@ -3782,6 +3850,7 @@
"maxLendableImpactFactor": "0xfd3549353cae50095a9c0773319d142d01774ec32b1132b0160e55da5c4b4489",
"maxLendableImpactFactorForWithdrawals": "0xb2fe4bf7818c52e2efafc54a069ceb3ef1bff7e3268efd1ec1d4629f6b50b219",
"maxLendableImpactUsd": "0x5c585e7bdc935a88ba8ef289ff518c08d861a30adc519571656489406bb425ed",
+ "lentPositionImpactPoolAmount": "0x2a3c3512270776586d597030cbab06098af2f26b51fca00e5172aa14e922adf0",
"minCollateralFactor": "0xffdda94c552e89c37aa851adc7a18e6bc47663010a27d83661a2e2fa8492ad71",
"minCollateralFactorForLiquidation": "0x3a606eb444659fc6d8703d1f4915560cd0e71813d3c824fbb4634c73002f3d62",
"minCollateralFactorForOpenInterestLong": "0xcb36c8d66209bda963fcd3a7029ca669b114218607d825722851aa897eba7ee6",
@@ -3837,6 +3906,7 @@
"maxLendableImpactFactor": "0x0b27f7e85429e3bcdf576b39139a59b5f087b04e4c60934be6752d8650696937",
"maxLendableImpactFactorForWithdrawals": "0x0d78b77825c5c0319c860937d6e7913a1cddf33b55d54f3fa399403bc45469a5",
"maxLendableImpactUsd": "0xa0313f1f0a8838e9ed03e4b000d76d325bb4291f349abb20adbffe665b0df33d",
+ "lentPositionImpactPoolAmount": "0x82263be6ea01444d31e9f39fff7dbbd91e628f6df2038b89678be6f7f2af6a38",
"minCollateralFactor": "0x8e3bed4f25e62e79d236e7ab4e5603e7622ef2eec8639585e4244725d8f409bd",
"minCollateralFactorForLiquidation": "0x67ae2314c7ad70da1afc2ff6bbc4ce36070db06a532137307b3949db7cdea89d",
"minCollateralFactorForOpenInterestLong": "0x9b60006748c20ded25ebeb6cb5b8b4fa1637b243173d9721a4ccfbe3101e7de3",
@@ -3892,6 +3962,7 @@
"maxLendableImpactFactor": "0x4226bc69694625b88f1e7ba618f2b5278690afbd7d04d09cd6e3e56adb598b3a",
"maxLendableImpactFactorForWithdrawals": "0xa55ea1d8e2d40aabd5bb601806317bae810b955bba23d271d4d45c020248a957",
"maxLendableImpactUsd": "0x3121bf7b8abbe87c16343a7a6afae2aa37e63995a487ac70ac184789097a9bd8",
+ "lentPositionImpactPoolAmount": "0x28b49f2cc08c123626db4c83de6905cf697c14932854642d34ebe011ef8bfee6",
"minCollateralFactor": "0x679fb485dc1559e6adc640756fe4740ee19dee07b8badd48976bdd28a87879e1",
"minCollateralFactorForLiquidation": "0xafc489671c1d4873473ecfcb310025d579c1c8ee4205d613c879338f160e3cd8",
"minCollateralFactorForOpenInterestLong": "0x84677935537cfc967f4cc379eda203039e555599457a5abe92b8d3be4ff80edf",
@@ -3947,6 +4018,7 @@
"maxLendableImpactFactor": "0x3cf17adf688ac44c780ab85febad2a468a583e3c3399a220e5e29d1a5e53a6ad",
"maxLendableImpactFactorForWithdrawals": "0xa6c9ede03fe1cd0adfb5e47772869d804d2fcf9c944a44174c1679abe50884ac",
"maxLendableImpactUsd": "0x3cfe77f5b4887aa393147fe72920ff17c49724b3469e887c91f257f6e35546b3",
+ "lentPositionImpactPoolAmount": "0x44714ed5ca4a8ed1b13348b9bc0e34c9045a5d7184c0d7e8ffa51b2716970a9f",
"minCollateralFactor": "0x3fe844c40773c125c030590d8b180fc7e7eea4b4620fc68b8933bffaa4c67b4a",
"minCollateralFactorForLiquidation": "0xb44f4b78ba17e0d1eff6125cbed7f5c6818e596f01fcd6aab2e739addb731706",
"minCollateralFactorForOpenInterestLong": "0x6e86a14a179aecf4b9c5d905c249fb4e36fcdaa1976cbaf81acccc340311036d",
@@ -4002,6 +4074,7 @@
"maxLendableImpactFactor": "0x770b5fe74d57ef3470e215fa854ee1d1e5b2e48cd5701bd56221ccbd0f5ff5c0",
"maxLendableImpactFactorForWithdrawals": "0x73ca53f0d77d24492d2fdc72f88e69576692534e1a53e82437e377791579753c",
"maxLendableImpactUsd": "0x6d40bb81b7f7cadac5717511628028b36e524c0c2fa42bca0262e3f36d2f0d3d",
+ "lentPositionImpactPoolAmount": "0xd2289eb77c6bc9daa9a7b0bb542da8b9072890647fa75d6744b71e942e3ba512",
"minCollateralFactor": "0x477063fcf3dcb2f7f5ea4dbfa8ebd08b75668e951d64c79c207fe225a1c7d3bc",
"minCollateralFactorForLiquidation": "0xca1ade249503a15c4b948131034294456c5786080676a30a2316606becce1605",
"minCollateralFactorForOpenInterestLong": "0xc28f780855330cd16102ba6fdb7ab47699efa33c0df3fcef42a44026ab9cceac",
@@ -4057,6 +4130,7 @@
"maxLendableImpactFactor": "0xdd2a640ded519663fd6dcd0d0773556890b0bea71d5994f57ca2ae98995b007d",
"maxLendableImpactFactorForWithdrawals": "0x018bbb9224779541e9138199e7c2af6b2bbe8e1df422f70d261d08d983ca2c4b",
"maxLendableImpactUsd": "0xec2b1eab979e1acb5a68262c3c4e05ade1c5c5e7fa8d22e772a4c81b72cfb004",
+ "lentPositionImpactPoolAmount": "0xfad1d8649ac5eedbd8b7f1f8a8cf4c54120de09efb9bc37a7e0313192bc2300b",
"minCollateralFactor": "0x66de3ebde9679ad0d1d7422384e7668a59308642f21b6ed99843bc6333dcfdbd",
"minCollateralFactorForLiquidation": "0xe5ff50ac9a0dfb0d5599b53e9c969ee858db161395ec92307f20922bc708557f",
"minCollateralFactorForOpenInterestLong": "0x979afa01e39a53a0ee59cb19c28a83db1f5ecddcf336a44541738671ea529f07",
@@ -4112,6 +4186,7 @@
"maxLendableImpactFactor": "0x5515c68b6615a33d29c833a177c28e83eefa8d37359eadefe7f40cc4cf5e931b",
"maxLendableImpactFactorForWithdrawals": "0x523659400dbe19d15727217bcb08130ee6d223c198d685fface935b1860f2b0e",
"maxLendableImpactUsd": "0xc2bd44e6d3d1beb409b79733a13f2a124b59942c2ecd9f332ac4759623649a5b",
+ "lentPositionImpactPoolAmount": "0x8f5e9f8ab5f62683773f0547487f67d30d5e82dd4fceca41f857e9d994f199c0",
"minCollateralFactor": "0xaea2afd33c6d2466b226b95971101b0250e5a558466f3e688135e606529cdea1",
"minCollateralFactorForLiquidation": "0xa65f72041f4bc42656406438eabaeb3a83e9f4f38aae62c9ff8235d0e81a7910",
"minCollateralFactorForOpenInterestLong": "0xc425f5ca4051c07b0ef0a474ce087918aff548677159081ce684e1832a0dbfe0",
@@ -4167,6 +4242,7 @@
"maxLendableImpactFactor": "0x0b0cf71a890beba3339150e4fce46b7790a1c75866ad17f049fa099046b1ecbf",
"maxLendableImpactFactorForWithdrawals": "0x39a407d8a89a525883f3f891a6ec25ffbe79da171cef45694bf1899c75f37fba",
"maxLendableImpactUsd": "0x5b55fff0d750ba099a6b448ed89defc38c817f3b5ea1a51b1e7c1159ea229250",
+ "lentPositionImpactPoolAmount": "0x7f747d0cf67f5b29218c28a4cc2d396981138a51c76a4d8ba6db2b8599352bc3",
"minCollateralFactor": "0x0265939bb7d88fea6fff26636a6858305b038871546f1414e5701ad669d5dc1a",
"minCollateralFactorForLiquidation": "0xca9593cfa0c874962f22b8bb702032807b9427579010b042670806b64ab2df34",
"minCollateralFactorForOpenInterestLong": "0x50d84922790ede06558e4ca6f2e96902c570c45e4f427cc6fcccdd32dddfecad",
@@ -4222,6 +4298,7 @@
"maxLendableImpactFactor": "0x07a3c676f0db6db3d8db26ff2fc47883d483091dccac5fce69b3c09a9b37808d",
"maxLendableImpactFactorForWithdrawals": "0xdfb2ca3011540b213a14ddf383ba4ed001f3d1ee172ab3f00b9ee5d376a363e6",
"maxLendableImpactUsd": "0x6b9b187296c4c45699c8b5fab9955585b18a428f093ffad2f06784a62a338e1c",
+ "lentPositionImpactPoolAmount": "0xbb1e96fafb49ae815aaf7feddc6be0f4b1663c66c5db81071b7e5b01391dcaa1",
"minCollateralFactor": "0xfb841e5374643d23b05f191cc2f0e1148808a7f71da91675b9a3d8c64b016544",
"minCollateralFactorForLiquidation": "0xd2e092583c07aa062aed1369c062d31719a80ff6e75d84ddc76b5e6bc7826054",
"minCollateralFactorForOpenInterestLong": "0x6d7fcd1f8264f3f59c707af933ec7782df25287b0b6b5f420a319b58b4886f7c",
@@ -4277,6 +4354,7 @@
"maxLendableImpactFactor": "0x21318669980e0bda8d54714e965f58fd6fee60aefe7a00084c3d2e72029d9057",
"maxLendableImpactFactorForWithdrawals": "0x98cadb0d1b4caa4c04ce0fc916b0616d3cbf8d94fe8191190485c40f926b1040",
"maxLendableImpactUsd": "0x552b8ab97c40de451e32f563871104f2a3bd6cb004f97bb20d14811feffd9cac",
+ "lentPositionImpactPoolAmount": "0xaccf2cb5694b087908d4e6919f53fb8138036e52d2817ad19bfb412c875cdcff",
"minCollateralFactor": "0x3a6062579846cca4b922db1cf9688c3f8f090eb5448600fc904bdf4b4b72bd22",
"minCollateralFactorForLiquidation": "0xabcb9f7c66df854a36c97a3cb49e635446fb7a3c56f8ab8b55b39f68d12aafd1",
"minCollateralFactorForOpenInterestLong": "0x94a978d635ef737465b195eec16b7f19c6f1bff0017c978ca61a17e5fe8b7808",
@@ -4332,6 +4410,7 @@
"maxLendableImpactFactor": "0x611a5706038f2743efbc3edfa3297c04acdf89cd037ac3e53652d6517659970b",
"maxLendableImpactFactorForWithdrawals": "0x84fb403374fc081fb547f1949582e0a12f3799f450b3be23e5d405da7e0f21ee",
"maxLendableImpactUsd": "0xb87743d8a51c6b26e2392bbbab800e130e3508cd359a5b592c70c6234b90adc1",
+ "lentPositionImpactPoolAmount": "0xf06057d3ae9088b458bc78d76f06e31965e631e1e38671ec6a45ca9d38983cd9",
"minCollateralFactor": "0x0aa8885df89de8ff34563554e6069a4ad8949cd4e6f77d4e7e5fc6eed353b721",
"minCollateralFactorForLiquidation": "0xce9ba90c380212578833d426e036da7abf6c564caa45e126e5c9f3af3f39727a",
"minCollateralFactorForOpenInterestLong": "0x4434267baa673353b931f72b997d623a8dbb24ad019fb1012b523e3445a9b522",
@@ -4387,6 +4466,7 @@
"maxLendableImpactFactor": "0xfb808e24c79a656df31ffd89dd51ea2faeda1bc9041f5b300080910bff27aead",
"maxLendableImpactFactorForWithdrawals": "0x970aca94d332873ab727b59cf55588a44f00b9007e4bde414002310939e8b72d",
"maxLendableImpactUsd": "0xce9f727834e2984c9a690e0cb55e001ee641c931895c37ce30dbdeb49f4d3085",
+ "lentPositionImpactPoolAmount": "0x4b22937fd39d48f629239894ad419f0a1622516fffb17e9d100dbdf808955cce",
"minCollateralFactor": "0xb10b7742e2b3281b2f4c6c986ee610bdaae744a102b587ed040bd5a26d0cfcf6",
"minCollateralFactorForLiquidation": "0x54898fae937ffecc11f45b346e2c2d31190475b9cc7829e2801c3bd2aedf7953",
"minCollateralFactorForOpenInterestLong": "0x24d067bde87a33817afba6f9159b1f879be5f907de489107e0e32433665c7c1d",
@@ -4442,6 +4522,7 @@
"maxLendableImpactFactor": "0xc8f6751279bc8ee904f588df45a88d92f862015fa055333d4fb948cc621a6865",
"maxLendableImpactFactorForWithdrawals": "0xeedc3dbfb87abeea1d05fe424b4dad10401b1f1be8e153100e2fa74de7d50d1a",
"maxLendableImpactUsd": "0x9f3f857116557171c55b06b0c7e73c89dbbea720b7f88829ba87336931047320",
+ "lentPositionImpactPoolAmount": "0xa426d6ee0b72483ee1706ce54780b3f38afdb278be3606e662f03e4efd86c8ab",
"minCollateralFactor": "0x80cc450de3e38bf0842c74de08feef0c83bbd4bd5b057c6ce752db74e8fc2004",
"minCollateralFactorForLiquidation": "0x8fd4ed805960eda98fc4829e08f9615cd22bfcb89ca38d1947083ff245785e55",
"minCollateralFactorForOpenInterestLong": "0xf2505508b048b3a9f6cd5d4f0f28decb75a374a948a988d270c8da823ffd628d",
@@ -4497,6 +4578,7 @@
"maxLendableImpactFactor": "0x7afb8a83e5ae3e633a983ecf68a396b1c767ad69879003c6e8ba4764516b1e16",
"maxLendableImpactFactorForWithdrawals": "0x862443f2dd7c14b1f9db2ba42990cec39441c33db9e6c0aa951f30a8864dbba9",
"maxLendableImpactUsd": "0xb5f25ad6874ca38d7c316af80adbb6479177e5896ff6381b1c5035c6b437df10",
+ "lentPositionImpactPoolAmount": "0xf8fd318a9bb13d620a7286dd499629f43f6ceb45af012e421f0a313eb4c48c2c",
"minCollateralFactor": "0xa5d93c751fd967d449430928a31c30b819fd3a1123a0e85297dd2a15e1975187",
"minCollateralFactorForLiquidation": "0x41bc7acbf6580c7822c4f8242416ec35d9c8b2e50be1d5379221c039a8d1119a",
"minCollateralFactorForOpenInterestLong": "0x4634662dada17c503986cce2faed9f7fc072f1051ebdd20db92b238c9f9ca03b",
@@ -4552,6 +4634,7 @@
"maxLendableImpactFactor": "0xf98b5a7bea6b04cf524bfb79ac4ef7e8c2d5a63d18433a1069a4a96a5fa97631",
"maxLendableImpactFactorForWithdrawals": "0xaf51334f13ecb6f593199c15f26af85ce87d039650fd64b2841c2493c6fc202d",
"maxLendableImpactUsd": "0x822e1063ee7b9a5cefac8546f5eb8ec64948dc327a6d8d4f57e3f2c643a8bffb",
+ "lentPositionImpactPoolAmount": "0xa1b1838be047379eea778b2ffde45ac38a01637f2d9eba71b01be779b523cc4b",
"minCollateralFactor": "0x57bc7d6117c01150e63f7d6376a598ee76432123b0a8f097c2b2e3acf36805c2",
"minCollateralFactorForLiquidation": "0x6ee2269ef5eaa11d456e4c5c24fcf4472789e05761bbccde7d124720734daca0",
"minCollateralFactorForOpenInterestLong": "0xb2a7bec849de6c6b7a38d4d561e876a210dbebde36c0a50dc37aad9083f73647",
@@ -4607,6 +4690,7 @@
"maxLendableImpactFactor": "0xa2b52b7d280ea3167644b7d1d88aa7490627ba799fdccba28117f2723b8da2e3",
"maxLendableImpactFactorForWithdrawals": "0xdcaab1fd6f8489a043f5b64e2d047a783e8614c7a18f156c8f1748f31fe890c4",
"maxLendableImpactUsd": "0x8e1e71664e9351f656f66459f64b2449d5523d9e7b35a9db3c7bd579fad8ac62",
+ "lentPositionImpactPoolAmount": "0x264b7391ab282f4bfa197d75ab376b16b7478fcd9792ed8635ba82a3a16bd279",
"minCollateralFactor": "0x9286a24a3b626cd4b440c9ebc31ce5a5b709c22f2f4acc917c3135cac6b26ef6",
"minCollateralFactorForLiquidation": "0x8ed79f4e6d3d38bfdfea170a01f66193eb1ad238a766ceddb168e3621d7eada4",
"minCollateralFactorForOpenInterestLong": "0x8c69704d7ad8d47b8fc79dd9f203c622ac43de9aaa60e25de14b70468e2d9b25",
@@ -4662,6 +4746,7 @@
"maxLendableImpactFactor": "0x5aad15db5c0aab031655bbfcdce39721a019dd89143749bb04023c66b3981402",
"maxLendableImpactFactorForWithdrawals": "0x7b26a8a4a53b3f84d684319a11f37d5f04064a23c6547e6e80b051a079838fff",
"maxLendableImpactUsd": "0xbaec5d6a4eb97c342d5c7755b10a84cb1e91c2d325ddebf0fc549bb0a7639b6f",
+ "lentPositionImpactPoolAmount": "0x1836572fb0e199827d3336bc96133057527bff84368ac582fb0cb89c757b57a0",
"minCollateralFactor": "0xd47ee119ab4e108c88d288443718f11ca44df176472339b0c35e2d6ae56d3ec8",
"minCollateralFactorForLiquidation": "0x426ce46062a702d0d68326ca347a1fa5d705087d2b43789dd0310835cfdaa74a",
"minCollateralFactorForOpenInterestLong": "0xdbaf0c15b855b2a4e1a68a581469b8c5d15f803cdeeb711edb1640fd38715903",
@@ -4717,6 +4802,7 @@
"maxLendableImpactFactor": "0x467d5377cb56667d1d0cf31bc63a7ceb4e120ead225195e3958bd30b44bcab7e",
"maxLendableImpactFactorForWithdrawals": "0x33cefb6f183a39a21457eebb2b74243010381d99af3f692e1860da516b1ca501",
"maxLendableImpactUsd": "0x81d4f9b3b66d42b3b7c3a3e9749146b8bff4969f429869f2094c64f8f1907778",
+ "lentPositionImpactPoolAmount": "0x039e702c728c5aa1acd7ea876e6337100d957dbcd32116f79bb8916122e4202b",
"minCollateralFactor": "0xbe95285a19c0ce88607d7b14c5230c60f53503455db2b61c3020f104d5ddbde0",
"minCollateralFactorForLiquidation": "0x79931b37d86fd4e1c24760f0d9c923458a505993af2db87ae125d2fc1d3b69df",
"minCollateralFactorForOpenInterestLong": "0x2a6d115de938ad85af12ca1d26a0f6644a2fe0599b2ab86f8acf87cb5624ae5d",
@@ -4772,6 +4858,7 @@
"maxLendableImpactFactor": "0xa200fdbfcb8ef3419f225c8ef2645f7c51ac78632d1d7c0b38178d02468cf5af",
"maxLendableImpactFactorForWithdrawals": "0xc92ba1efcc554e66ee1429f7f948f37e6c8d909a1821c89b3f56b77dd257b95c",
"maxLendableImpactUsd": "0xaac0b18a1002ea6fabf3793aee54fe98a640085f40b14daee9151ab652d97555",
+ "lentPositionImpactPoolAmount": "0x90e3f8c855ef37b87b1556a3ba6f520da85308d2845ab662128630c1895f37b7",
"minCollateralFactor": "0xa213ede0599ac0ad9d8d63cdfbd2bc353b68313ea17ae036bcc6b12ba1f3b46f",
"minCollateralFactorForLiquidation": "0x53242e803c0bb6381c1b5c42a8fcd00b54fbbe85995488a7a5dec6f225a5e5fc",
"minCollateralFactorForOpenInterestLong": "0x52afa3711c1e690c0bf7e156928aa8384c28f540b26fc9b607b05ca73c18bfd8",
@@ -4827,6 +4914,7 @@
"maxLendableImpactFactor": "0x452079f0f8e4232f1216d0e1dbc9899ddbb111cfc95fd67d8808bff645b9a676",
"maxLendableImpactFactorForWithdrawals": "0x4aa8d9ced2923efa1e9c767e9b96bdd98d460e517dd0638183d8e3540daa3b48",
"maxLendableImpactUsd": "0x6bc54f3ce9aeb8b08143f67bbedd05eec9d60aea96adcb960f288f6eaddbd863",
+ "lentPositionImpactPoolAmount": "0x7cd92d2fc980d67d61a33aac2a96004487fcdef64192e5424ca1aefbcfa21ce2",
"minCollateralFactor": "0xfbd9db0e5bcf95a34b4d52a97caee4aaacf32e91fea52fb3d0f6eedaff6b16e5",
"minCollateralFactorForLiquidation": "0xad6053c2d0c04fd2f4bf6806e2dc774d14481617371e602cbc76a83e6bb47d6f",
"minCollateralFactorForOpenInterestLong": "0xa7fc29d21ee4ffceb464f9889c70a3c5f92c8c48dbd5ffc824f088dda4b7515e",
@@ -4882,6 +4970,7 @@
"maxLendableImpactFactor": "0x86d3e82fbbb7ef85d605daf0f3e91d2e2557e78900221935c18e3d8ef4ee45c4",
"maxLendableImpactFactorForWithdrawals": "0xab9b13bcbd53b81249545d8c3c013f17a8f3502f5f2fb550b8a08237f93d992e",
"maxLendableImpactUsd": "0x332ee1eb11b5ff3fd34fafdb9c874d59aa2f3c3814865c5413f8be67ac82cbda",
+ "lentPositionImpactPoolAmount": "0xd2da7ed412c9439f57c9e43d01ee9add8f84943df4615ceb1619bc2abf84bfdf",
"minCollateralFactor": "0x2d6c706dadc679262e11249e94c293095e1d2fbd28b2dc9bf4bb2bdae5a9b60f",
"minCollateralFactorForLiquidation": "0x7571230a5a26f9280aa55776430b802d4ce0c4b1f31edc7d7323e1fb55654fe6",
"minCollateralFactorForOpenInterestLong": "0xb31a483d7cacd648d5b1cead2934dce80ffb22bbb0b1b5eacf4f680e7a7f51ef",
@@ -4937,6 +5026,7 @@
"maxLendableImpactFactor": "0x43b76d012b4f31389a3a5779df50f80164e8c084ebdb0b0c6c4e322d2996be70",
"maxLendableImpactFactorForWithdrawals": "0x66c8168dfe39c73d827d067081ebebaa988316d15fce8f6bd526d72d68787fb1",
"maxLendableImpactUsd": "0x39f5a3d9577967c6e611987af1dded1b5021ea1a79577eea0d8d907ed770498d",
+ "lentPositionImpactPoolAmount": "0x34e71553618df94005fe1f31b089518cb9e6d5616c2ff9d2375c426e3de1b80e",
"minCollateralFactor": "0x8add9b807058f0efe927f8dcd209f053d49a4831121c5ff1df617c0aaac42fca",
"minCollateralFactorForLiquidation": "0xdd3da19ef77fae0831f70db252ee293b55b7beefe26610364d751d7a2f1ddf13",
"minCollateralFactorForOpenInterestLong": "0xb053e44f2c73e33aca860160ad83dbae4c866151a88752a096ccbfc939ee4f34",
@@ -4992,6 +5082,7 @@
"maxLendableImpactFactor": "0x7a9398a675da4fe035a6bb70aae98124b12f2a45ba78177c4cf80f0c06b95b15",
"maxLendableImpactFactorForWithdrawals": "0x8e8faf1999fa9d901338e3d46ff1093c6b3b78dcd25eafc089199a025f777508",
"maxLendableImpactUsd": "0x1d5773e26db075dffce8c24dfc95f9769296c36454dd8a226a98ec61d2dbefae",
+ "lentPositionImpactPoolAmount": "0x7145ca807db24709f5474918671cd883ba269f313edf6b3cb7d68cadbf8175f2",
"minCollateralFactor": "0x239aebb5a33ed980f6d1c745fe313eddae94cfa8b6dfa61640ac3204d2e1ddea",
"minCollateralFactorForLiquidation": "0xa3d3e18739ebfbaca88f4aad3aef6b2545f949bae4d37af025a2f9ca18b7e555",
"minCollateralFactorForOpenInterestLong": "0x3ef566215c8b99506a5a252199891cb0268e97e592bf0ac06cf6f4227258e4ff",
@@ -5047,6 +5138,7 @@
"maxLendableImpactFactor": "0x96b20ee2310336fc91d3ae638e1aa0578534271ac496c0bf7f9f249880cbfe7f",
"maxLendableImpactFactorForWithdrawals": "0x735393a63607d60f6c069c503cc29efcb57db2a8af56011a97d78f3ee9a96727",
"maxLendableImpactUsd": "0x0ab6fb4bed20bf0e1ded571da67a009366693ea713a24cd8b71e6f3bf11c44f8",
+ "lentPositionImpactPoolAmount": "0xc7f3af484671f834f827b87322143ee35cb5cffbacfb4dc882cec4ca1657fca0",
"minCollateralFactor": "0x7802fed0c1073c7720f43038c4ce47a87f131dde78167cd6911e57369ea2f276",
"minCollateralFactorForLiquidation": "0x65f68a9afdb78cf330f681dd96e9cea7d39629c5298b7a0f26259e82af911a15",
"minCollateralFactorForOpenInterestLong": "0x4ec50614ebee32276c869866bc29cda2f0cd3b6a0fc081f99f69ee62d243e577",
@@ -5102,6 +5194,7 @@
"maxLendableImpactFactor": "0x1cd29cf18cb059adc0d26f7929c28b6dc1766caebe8b944c85cb663e640beafe",
"maxLendableImpactFactorForWithdrawals": "0x01e096f029bfb4ff702498771f8a1f317bc95104a3f49837d3b4da33db2be3a1",
"maxLendableImpactUsd": "0xc2f6645176282ea733a41d9f6d50ffcb8880edd3b7a176a966587ebf5d59cd8b",
+ "lentPositionImpactPoolAmount": "0x5cbe51b7302572a63d718c8349f8b5313fbccaf7212eb682bc1eacea91cb3cd0",
"minCollateralFactor": "0xbc7fc702ef6aaf9068cc0ed4435b3176394694d6737540ec0a9c001b764bfeff",
"minCollateralFactorForLiquidation": "0xc1d54cd6c502588af1cf73aa199beff47eaef8600505908f837db32a8c3d7c65",
"minCollateralFactorForOpenInterestLong": "0x0d6d3a35635ecae509baf03a4bb1d7cad458d3bfd2980159e523bea0d6ea36c4",
@@ -5157,6 +5250,7 @@
"maxLendableImpactFactor": "0x27f9d6df70fc97a74e3b829720bb772fa03cc8c7c0ec8fac9425438d0149d17f",
"maxLendableImpactFactorForWithdrawals": "0x31a542b6e730c23b8228a3901af7fd0ea4098d91978966c87ab64d7945129979",
"maxLendableImpactUsd": "0x4d4cca6302a1214b790200799b0ca5e2b742f8320945db9435448e331814dbcc",
+ "lentPositionImpactPoolAmount": "0x2e769d68a09414ff7c40d8d63b70be3725d11c9da8548e2b26923350bf6fe2d3",
"minCollateralFactor": "0xd2a3fc6200cad6ceefc89cd6fd11223bba1e5112b3c32822481d17e67c3a682a",
"minCollateralFactorForLiquidation": "0xb8ddca48aa09da174c6b9d743ad7800272dd601298b1cf8a20fcc7f02f3dc28f",
"minCollateralFactorForOpenInterestLong": "0x16564792d825aa02be225fdbae443d22a6398e40a3239c1309b49af701177170",
@@ -5212,6 +5306,7 @@
"maxLendableImpactFactor": "0x451b64316edf792914e442c55deb12560e3c4dad668ff95ec7a54d6459a9a7ac",
"maxLendableImpactFactorForWithdrawals": "0x183c9a6ca36462aa94646ee6e14e022331d472b3f8cb806eef2a8bd0640a89c1",
"maxLendableImpactUsd": "0xa696760d7618dbc157257aa7e5d7c2b12cb3f5ee0dbe3a5fe02f7979f327e028",
+ "lentPositionImpactPoolAmount": "0x6fa08dba1f1d10143d59ca5ec6752871c3b19412c7235899b09dfcc00af60e9a",
"minCollateralFactor": "0xf67fd77e9442ca54cf9851feec12819f4bd320e432f7ab1111cc775b9bddd543",
"minCollateralFactorForLiquidation": "0xf91cb8d735678f9b6455105a627fed7029da41c0ee1db64713ad218cc3fb4b73",
"minCollateralFactorForOpenInterestLong": "0x76df1c8a6b2192aee31ce7da93f1801aa488f2cc6fafe8348bc7603d11b2bd54",
@@ -5267,6 +5362,7 @@
"maxLendableImpactFactor": "0x0c3fe7038f76707787807a08f93c22dd14a490a2a204b9959435c8ec3442c51e",
"maxLendableImpactFactorForWithdrawals": "0x2188536e3974554bc6b3ee5f38d150fe9e7fc259e72e68b07e6bded472b39c40",
"maxLendableImpactUsd": "0xf0f6309864d086d2e0fb7da646adfe979619767ba4c3198c598c56b5ac051615",
+ "lentPositionImpactPoolAmount": "0x25c6b419467d06997d151a1721b1f20439723998c5aaba86c136bc5a2f6e4d2e",
"minCollateralFactor": "0xcee0d4cd08657f94f4c538e07c7020de356cd64a601fd6e58c8da6896d0f15f1",
"minCollateralFactorForLiquidation": "0xd901a64e17c3b8de6009bb0664596c577794080f85649ff18e1c52c6496b1171",
"minCollateralFactorForOpenInterestLong": "0xb20b211dbc8ddafec3527b5303e70d11d78510e03ad73616837e18b58dbcbe54",
@@ -5324,6 +5420,7 @@
"maxLendableImpactFactor": "0x9db704bec7ac071e0e90f7a93461809904f80664c78d05e69d231e9439dd5dfe",
"maxLendableImpactFactorForWithdrawals": "0xba0e0bf03d0c02aa72bc5fc17c3ebd655ee0636528247532b4e13226a1037ef3",
"maxLendableImpactUsd": "0x68cb741fa9d254bfcd5c73666794d3e6a3fbb6b6544049e7dffc7f04409ad248",
+ "lentPositionImpactPoolAmount": "0x30dfa4ec399ba1f32b162a7574da6d48c51bd0cbf10a878bed90528917e8b324",
"minCollateralFactor": "0xe910b1cb7c36fa1e005d1ce213e744ebb8e19c07f0e934605fb998fb518ec4c0",
"minCollateralFactorForLiquidation": "0x363406d304aa67f7d3bbde74f80598186c221785469b490cb4927732ee1de679",
"minCollateralFactorForOpenInterestLong": "0x3a15736cf99d0f99680260b5422bc87fd69925adbb1387bf7048191f19cab935",
@@ -5379,6 +5476,7 @@
"maxLendableImpactFactor": "0x6905d1082b2762772ab4518370d5c5168d2c3877e2381e37393452d44fd74932",
"maxLendableImpactFactorForWithdrawals": "0x1922711cd16e88c089890bb41826689426a3ff93c3f9a56cc5afb69254caa92d",
"maxLendableImpactUsd": "0x80124f278e5d8cabb600bb5eab8b4bb250364ebcdfd43d6c301ce4f4deb5fbf6",
+ "lentPositionImpactPoolAmount": "0x684e8643977be0d44bab018cfe226692650c5fffe6a6a71595e8e68b6b57398a",
"minCollateralFactor": "0x2bda0f19bd0a9c7a0bf9e89a4b1bcf0d06949d290d084f094d1f2daa73890e18",
"minCollateralFactorForLiquidation": "0x4675a79fa14651780daca8e35375904acbeb2958eb5414537ee4214241ee8dbb",
"minCollateralFactorForOpenInterestLong": "0x6cf8feab7ea0d8a785b057c390baee97be69e93f87bd3b5ef1b32522ade977e0",
@@ -5434,6 +5532,7 @@
"maxLendableImpactFactor": "0xfa593d54b5c34e98fec7dc8515a180443bfd9b30e100c68d75df4dfd70527401",
"maxLendableImpactFactorForWithdrawals": "0x184a90bdd9e17af13d4c8ff820c9331f157e6db5a2e18d6e5e51735e82734246",
"maxLendableImpactUsd": "0xa8b90dcf6d7893f3198c375cdd895ccc3d8497d9742cdd4877e2f876d9a33d8a",
+ "lentPositionImpactPoolAmount": "0x70eddaca6e85713493750fac03e971df8177bcfa9bb091ec0c121e2f0f968c86",
"minCollateralFactor": "0x45d92c625d74a031ce8338d168d2ec1699f338ca8669ad7f210c98ef9461bc43",
"minCollateralFactorForLiquidation": "0xe92fa6b0415f90201edf5c668993487dbedb71de9bb489cc4bec41ecebb369cc",
"minCollateralFactorForOpenInterestLong": "0xff9fe8e3365a18b999251316da505a550055626be033cf34378f1afd550a4f5b",
@@ -5489,6 +5588,7 @@
"maxLendableImpactFactor": "0xe2a4e43bde1878da29dae5a7787f199a8bb5e583957c3ddd566ee2d466af01c8",
"maxLendableImpactFactorForWithdrawals": "0xbf2805b8a8888767a4b59cf8ef33f341460051999a88a860f0d352014d579a12",
"maxLendableImpactUsd": "0x8fc9544d8899a2083f0091010b86542f2c88c79f9f46951724d8d8b039c94407",
+ "lentPositionImpactPoolAmount": "0xec44cf942c5f80c1aaa3001e30261cf0af83d55f473974a1c1c7af1e94f2c720",
"minCollateralFactor": "0xbaaa90a41b92be436a5c13d02137ab4d1da57a1256942b29ff1122f4ae3910ee",
"minCollateralFactorForLiquidation": "0x87ff74340b078cfd33cae47ce1e3ddb268a2380d8badb47bb14ff760be63c9a8",
"minCollateralFactorForOpenInterestLong": "0x8cbab030e059e5061c5844541de54fd884103976d5748b1afc27800eb6956781",
@@ -5544,6 +5644,7 @@
"maxLendableImpactFactor": "0x1387afb6154c7cbf8daf4f65eaadbbeae179487de4bbee973f41a0729bc0b681",
"maxLendableImpactFactorForWithdrawals": "0xaa191090a6af58e3f09e9e41a5353a606d8e25033b4e863abfe15077aad8e928",
"maxLendableImpactUsd": "0x709de5010e9f8d311a65eeb69d9b8903728d7c6a78a49ab3f838d6123b345b54",
+ "lentPositionImpactPoolAmount": "0x95b9d0993679ca9c2649b9f826e54f2fde0d14b3e9dc6af3ac2b338a09834abe",
"minCollateralFactor": "0xae80dde9ed11f8ffd789be3583df9e79a38f49ab1ba4dbe01fb87936545f600e",
"minCollateralFactorForLiquidation": "0xcbd111c1ddb157b7224dfa2eebc5b69b6666e02062258c016e027a45b66059d8",
"minCollateralFactorForOpenInterestLong": "0x3ee6bddafa71cc4e83b9278ef2f015a79ffc105e946f4b46c521388432cd9939",
@@ -5599,6 +5700,7 @@
"maxLendableImpactFactor": "0xa943d492ea8a8ee576462f5e20bb1329caa15626d3eecb3cd191c4a09030a172",
"maxLendableImpactFactorForWithdrawals": "0x092c6d65ead5d73190c48d23445cc8d833e1d57a9c858110967b1b396becf01a",
"maxLendableImpactUsd": "0xaf602d636576bf89bbbb45ed6340469fc1b1f314812b3ea2cc443e77a00ae9b8",
+ "lentPositionImpactPoolAmount": "0x385ee4d8d93ad8c682386b2f3b5ae4ca4418b1f0d3e139ee4f1d997f6b5f49dc",
"minCollateralFactor": "0x458441692f08c6fd6bc9096d6c6a85c9b30df02b3f2956d04603b1d84b5823aa",
"minCollateralFactorForLiquidation": "0x2fa437b43c4b8978a735c50513a74e89c5cd7f0d2a35ab4f964c4910b9563771",
"minCollateralFactorForOpenInterestLong": "0x2397923fc51dfa26d6dac95bec87e8d79e15cf9c934d9cfe3b26e3462bcc2145",
@@ -5654,6 +5756,7 @@
"maxLendableImpactFactor": "0xfb52c27fcefb2609956b29fac761b9eb9b098d57dfbbfa54a8bdffbb11ccddf7",
"maxLendableImpactFactorForWithdrawals": "0x0be5d9b16721e73e6e070dfe64d01b649b6d79ee2c263e63189e728a7a09b264",
"maxLendableImpactUsd": "0x8013378f3d03169032387578c5e109fb8db8941fe391a656ab3186122c360c3f",
+ "lentPositionImpactPoolAmount": "0xa4edccb84829e4c3e08bb988898e50993e8f78e5a47ab2fa82550677f4f7cd8b",
"minCollateralFactor": "0x97ea28d35e02b8862fda306e39a8c77858b4b942901171d778184db29497531e",
"minCollateralFactorForLiquidation": "0x3144b9a5938b191d682d5b8efeed673dc9c06646f4e283817ed5269a4b6cd78f",
"minCollateralFactorForOpenInterestLong": "0xdd677dfaf255e6feb915781df3a369173f1ba6a2fdeab9b5042ec3fe4f996930",
@@ -5709,6 +5812,7 @@
"maxLendableImpactFactor": "0xf9897dcd773b1ba122ecc580128b3a20eb2e3929c268e59b038e498dd0d2e1d2",
"maxLendableImpactFactorForWithdrawals": "0x2b55d610f89fae16d27b55ee4da7f9351976d0cc50b6d855ad3627659e3f99b7",
"maxLendableImpactUsd": "0x755fea56f53ee53ce8149795f297794b064a2fb7ef5cef2ea858fa2c454ade6e",
+ "lentPositionImpactPoolAmount": "0x973f246bc300b23e97621a478ca0167dc414f08c0bb747b4095a23e33cf79103",
"minCollateralFactor": "0xa9476f3721a3ace0e929e1ba274fc72c6d8db29cc1d9e2c0fc2bd49bec67b197",
"minCollateralFactorForLiquidation": "0xe0c8811ffba815d0fbb87b64a17f0f1bac3ea3b6613f79f8646289964d94fec7",
"minCollateralFactorForOpenInterestLong": "0xfab6fae41bc596b1bfcfb94ae9584c0de545d379cd225cb9c25c487d0503e4f7",
@@ -5764,6 +5868,7 @@
"maxLendableImpactFactor": "0x11517d9f021a799d56cc05ffe023b8af3fa22e0179b9afc2ede623c1df2bcc0e",
"maxLendableImpactFactorForWithdrawals": "0xc3525088ea56688cdc3f32e3a992678fef8f0a73f5c1a94cbf812c49abf8694b",
"maxLendableImpactUsd": "0x26e49505583b0c4d0a766368396063d2fc26383e2ca88093f3547b043fdf6609",
+ "lentPositionImpactPoolAmount": "0x826b081eac25c9e00c2ec3d3d4da2f60365eb135db2d40ec280eea606945ded5",
"minCollateralFactor": "0x33951e7ffe03288c836a45ddfaf69495b239d3c884d18c273d65d3293fd82492",
"minCollateralFactorForLiquidation": "0xb8b85be580514372ca4219fe34e89d7d0ff5cff5390ed948981ac4b39e138bdd",
"minCollateralFactorForOpenInterestLong": "0xe7dd7bf273ece58779bb00ae9a2e4ab2d1f6e2f112ee752f0a84ba30faea843c",
@@ -5819,6 +5924,7 @@
"maxLendableImpactFactor": "0xf86cc4e80ed83486a203d9ff30f38623d0ff5306e16750251f5da994f3edaf6a",
"maxLendableImpactFactorForWithdrawals": "0xd371f71f87885ebd4068cf3bd59048947f6fcf6722997d0b7cf4a9dfae5abea7",
"maxLendableImpactUsd": "0x6aaf08ea12a86b4684eb7a367795aa8ef1a12c8ed55801045e5614108c512e6d",
+ "lentPositionImpactPoolAmount": "0x7fb815659dc4e7e09f0fecefae2f2c327f47ba2fdc04bcf45f5dd8c0aad2fac4",
"minCollateralFactor": "0x9486c729d2726d090319334bf0c997eb6d988e6503abfc033835f3d21e5369da",
"minCollateralFactorForLiquidation": "0x62d319d61a973cf3d78242c86aaff68636bcfb93ee41be3b9060305db4ea1129",
"minCollateralFactorForOpenInterestLong": "0xd7fbf50ca354ff2b3f6828cd7e94d4ed7aa174e32264de0c0aabd07a70d52335",
@@ -5874,6 +5980,7 @@
"maxLendableImpactFactor": "0xbc4271dc645cdb7a59c16379ebdd343b6d1ada38f01cecd54e9761ed0d574ef1",
"maxLendableImpactFactorForWithdrawals": "0x91b91a16da46e40742b38969282b0297214b8a36f5e60638301643bde203c3a0",
"maxLendableImpactUsd": "0xe85cd1244e603122d8d3b0419264586117d4da110d1357e8f0812a3e4f9f90d6",
+ "lentPositionImpactPoolAmount": "0xe3788d964dad2d90bd7275f010f379846528012f5dc7e5fbbb2b9acf46c08c72",
"minCollateralFactor": "0xa5212835c9f726f03f4cc8e303e120a1f7cada099661ad2c42cc57dd28a7e3c1",
"minCollateralFactorForLiquidation": "0x8585b33652b828809ca030664ee0d9ea5e3bf9a37b335e934cb4127331d0ed7b",
"minCollateralFactorForOpenInterestLong": "0x7d50ef920428f507294cd36c1782f6d973a2fe06024c91df3cde7689c79fed96",
@@ -5929,6 +6036,7 @@
"maxLendableImpactFactor": "0x87eb71dea79f9e9147e18c50874b625378b9d2dd15db5a290a1da097820d69eb",
"maxLendableImpactFactorForWithdrawals": "0x5aebbf4c3422790268750ed775f292618e011ffbd1919d380104ec446620cd4e",
"maxLendableImpactUsd": "0x7735b5def38a0561a96a26df53592dc337b7ed02afa7e6232454b7285bdbc391",
+ "lentPositionImpactPoolAmount": "0x669be26aec44a803a0bf0bc1d8325beb60e5bbfbd3e9e691b71f0dcde116da30",
"minCollateralFactor": "0xee85c017db292f5a8eb09973adcde4bc15ebfd93d8fed7acc24ab19ebd74b07c",
"minCollateralFactorForLiquidation": "0x33b00fb914ce7903aa886f91080c2351c74dab96ad8d7ddffbb6bef6d8d652a6",
"minCollateralFactorForOpenInterestLong": "0x5ae759fed69d3b0c091d183c77af7e0a17e8e28bf134058733d7e4f6c65a9803",
@@ -5984,6 +6092,7 @@
"maxLendableImpactFactor": "0x43f787538d78a2982ef11e17adbd6055fbc1cbe7d7f3321bb713082f2b61add7",
"maxLendableImpactFactorForWithdrawals": "0xc2c1928a2bceb51e93a1c8de408430612601e80a44f1f531a216c1f4250bfc01",
"maxLendableImpactUsd": "0x81cf9f95385a790d1db64b27d3e85b6e83cf27e8a1efb5e386d329be83f31100",
+ "lentPositionImpactPoolAmount": "0xfaef63d717438bfd78f4e1ad3bc2189c3fef771b7a624d0e229faf3a4bf9061e",
"minCollateralFactor": "0x0f3ac78bcef32cacef7f434288d1dc395406249bac71ffd1f153ddf1aff1cb18",
"minCollateralFactorForLiquidation": "0x6b71547189b8a846f015a1f2343da687dedcadc907ab4ce46d1b5940de3dfc45",
"minCollateralFactorForOpenInterestLong": "0x45eedbc7142301fe4c59155e6ebd1653a9ff0c9a978099ccb2e9d707967adbca",
@@ -6039,6 +6148,7 @@
"maxLendableImpactFactor": "0x645e69af1d93a9c831437acf36d0470c8cee9cc3aa9a8bf7341a8346a5a5fd40",
"maxLendableImpactFactorForWithdrawals": "0xec453c03edf0091beb32aa8f62f9f626ba440ea571d6ff6429f8895d2cd90f2d",
"maxLendableImpactUsd": "0x0354f66f3a07b5322458c2d5a07f228c988a01e772550a43b547be2f110dfbde",
+ "lentPositionImpactPoolAmount": "0xdfd6ce9b1aa654201b8b2de147da83c9e17e3523ce8aea92feff2bebb671d7dc",
"minCollateralFactor": "0xd0e0e53e9fcc4b8aef885995a8c93e42395bc1bde27f72958c9ba5ceaa17b797",
"minCollateralFactorForLiquidation": "0x1b75189827254a93f7a53377e63f17e1b8e28a9e760227a07cab05b17a8c6e8c",
"minCollateralFactorForOpenInterestLong": "0x29db49c2d35032fbaa6998ba219c6b02284f74bfd0acc163ee051df95ed68ca3",
@@ -6094,6 +6204,7 @@
"maxLendableImpactFactor": "0xe5721d6e94d288c9654430be4987fa3d783dc1430dd883024130228daf783939",
"maxLendableImpactFactorForWithdrawals": "0x967a68e49df22c2a02894afba3eca0e6453e773fa086acf7daaea0df5432eb45",
"maxLendableImpactUsd": "0x3f2eed2086112d3b3b1f2a58fa5372070a78a0875ffea86305c4c441763edd92",
+ "lentPositionImpactPoolAmount": "0x42380fd5cf401a3161284b137691c1c76ee02238b15bfb0e8d0eb9bae653310a",
"minCollateralFactor": "0x40dde6825fead3925144ef7d7985c7eabc5f1c3989c554c16f0a6750ce8d661b",
"minCollateralFactorForLiquidation": "0x86ec7dea0767afca2e51da7c95db51654f3f0663312019e5e6cc4b0d1ba41843",
"minCollateralFactorForOpenInterestLong": "0x8f3f572e97c9d9c670333b644f13a2d0f6e539e9c061ee0a857cd9792672d22e",
@@ -6149,6 +6260,7 @@
"maxLendableImpactFactor": "0x97d1f7d41c638437b98777c03b3388b74eb4980c40c7dca97fba9217ae29c6ed",
"maxLendableImpactFactorForWithdrawals": "0xc99f2609161c72997d9c62c49fcf6db65bb39723458bbce2528451f563683e61",
"maxLendableImpactUsd": "0x1ceab2cb317724a5fc0354768c165e6dd92822dd5c5390e9d819900036be174d",
+ "lentPositionImpactPoolAmount": "0x030bf10049a914dbbe618dce6f66bfa15642ffcb560c9e2a1c7d49658bd90832",
"minCollateralFactor": "0xceb66e48992ccf002db99c948b87853fe88fb25d3d2f5639955fda193c33ca22",
"minCollateralFactorForLiquidation": "0xc181dcf243c0f2329ea8f867834c56e7922d6087c6f367ed5c51e860bb1751a2",
"minCollateralFactorForOpenInterestLong": "0x583df5e6f1edfb745d316e7bcd94e72ca9b5ca746577c020be7c18dd7dd4fe06",
@@ -6204,6 +6316,7 @@
"maxLendableImpactFactor": "0x9d986995d89682b9dcf24e1ae5b7e017a9d4d97cc808212fd610df60e5dc3a33",
"maxLendableImpactFactorForWithdrawals": "0xead7c06076b339077d22cf69bfcc2e275509ab440c3ef83eeb4384862155a903",
"maxLendableImpactUsd": "0x3500e247bbf32363b84ac11c7d6bf7ebce25e5fda330143d45e10188c796a34d",
+ "lentPositionImpactPoolAmount": "0x968aab8cc872fc87527ad5a54e806bcf3b29b92aec3c89ad595940bfbe10992b",
"minCollateralFactor": "0xa46adf9b6edb48c1ef2b4bbb2aca842015364a5f80ef06c351663fbf426c409f",
"minCollateralFactorForLiquidation": "0xf72fdbe7a9a4fa1a18392a24aac135b2854ad6702857dcb7a02b0396689742df",
"minCollateralFactorForOpenInterestLong": "0x818e5181980953fa609b761f0ae96c7ca154f7f0646efb32703b8b00f9066681",
@@ -6259,6 +6372,7 @@
"maxLendableImpactFactor": "0x2af1c47f779a27a18253d53f6443de1cdffc94a6192e21b639da78604ad9f505",
"maxLendableImpactFactorForWithdrawals": "0xb691e2d75e4a37455e4f38a7b8b9b4fde166307d87ba85df806b12ffa2bdc8b7",
"maxLendableImpactUsd": "0xf349ba50793ac7f79b1850b03ec2cc01301d6e631b630d11cebbf9154b66ea6f",
+ "lentPositionImpactPoolAmount": "0xdc5bff4aaf558f8e46fe9ee42999c64cecc23edd86204ad1a3b8962c4ae25569",
"minCollateralFactor": "0x660d36995d7842d65142957335204b2f5a47ee4ef14e45e808cd2a558ee1d64f",
"minCollateralFactorForLiquidation": "0x49ae2627469cbefb68666adbbbeb744cf29a4400c48e0e21c31cc84e0f34670e",
"minCollateralFactorForOpenInterestLong": "0x27e803ec18d5fa51715be719542a289f7423ac9ba9b20f576973d66b2551bf5d",
@@ -6314,6 +6428,7 @@
"maxLendableImpactFactor": "0x6c1d98f22fff91d60a00b7c05b1b230a046b90a706418c2316a6c3d04e1d1617",
"maxLendableImpactFactorForWithdrawals": "0xa744777827f361636e1ad96588f20e344c7763d253a17cf9b8c5f3cb0eaf3f03",
"maxLendableImpactUsd": "0x9946ea3fbd797b9c1613a06aec4c30f015cdb56fa0ec67235106eee841cadcf2",
+ "lentPositionImpactPoolAmount": "0x88e6f8f4a655e6486c463837cd2547e678b291002d988d8e41cad234301d4f35",
"minCollateralFactor": "0x47c761a326bc43721df008dbd681a56a95f967c8782f6c5627c44b0ee1e28d09",
"minCollateralFactorForLiquidation": "0x5d8b1de57e1489bee6417db642bdc78295466e0b17ac7cf4f3a4b6cbaf500513",
"minCollateralFactorForOpenInterestLong": "0x8e08f3f7be11c7cf1e417bad78b67816cc018466d09dbc178cbf14e775ec84fb",
@@ -6369,6 +6484,7 @@
"maxLendableImpactFactor": "0x7b03b41e9a35c9255a36f3a2ea41f5d8c94ca90a8e56658957a4c47b14a6711b",
"maxLendableImpactFactorForWithdrawals": "0xddaf6fa2c5ac46d8f95e4f366bb5e4b0f86f4fcace6d44d2f09b9be4db3e5887",
"maxLendableImpactUsd": "0x4916e8e20539620254fe26d080e1c680d02dae6a51ba6739263bf33d778775ba",
+ "lentPositionImpactPoolAmount": "0x79fcfdb4c739ab33a96f51e01469d88d5008f6ee60d0547e63391256b2969de8",
"minCollateralFactor": "0x70d8296fff44280d8f08d21c4827e88e576995b4ba5abe74057005597a25366f",
"minCollateralFactorForLiquidation": "0x9ea6294cb72900e32d374e281f6bf719a9a65fd530ecfb43f4fd2dccd7d267b1",
"minCollateralFactorForOpenInterestLong": "0x1ad4a9c2b4ce935ef436514c8854eedb430a2d63208a46b5b4c1a539c33e3d09",
@@ -6426,6 +6542,7 @@
"maxLendableImpactFactor": "0xede02bf5b44840e30969babd4f118cc6b7e1417a8c9679dba4e4343d1849cfdb",
"maxLendableImpactFactorForWithdrawals": "0x47f9d09cd9c1e56b7433edbf033d908ee9e2516e3063f470d46d5de26a0866e4",
"maxLendableImpactUsd": "0x575358386936c0620890f124f6d19141fd53c5745167a1a23d8a461a5e3aae29",
+ "lentPositionImpactPoolAmount": "0x8a9fbab28ccd7a5d1247cf6f98262b8705b2861e0549b6a65929a7b72f05caf0",
"minCollateralFactor": "0x79c16947dbddcd32e966cec7dab3ba71dfdcc0024ae40d2207d271067d727681",
"minCollateralFactorForLiquidation": "0xb8e50c3357c9b0687230c6323576d8c4ee3945c335963d1b140edeaacb2d4266",
"minCollateralFactorForOpenInterestLong": "0xa4bfbf6c0ee876da9dcbfee32442a86b0f70ea215d40f50d6136531dde67e999",
@@ -6481,6 +6598,7 @@
"maxLendableImpactFactor": "0xa4b4dcc843bd519c25c8f9e70d0ba37cfd2ff83d416261138e059c2e430a1f00",
"maxLendableImpactFactorForWithdrawals": "0x8146f601db0a6724c0490b88a7d1131ffdc58dd2c4bda1b2cb89acbe5db00572",
"maxLendableImpactUsd": "0xf4d256872fdefbcf6f9b74b35ef660550377eaf74d9d13f26c70df2f30c9cf66",
+ "lentPositionImpactPoolAmount": "0x41ffa61b8497a2d31d80c90b5aa91a5d20d6abc145edb9e99c25ffc358920dc7",
"minCollateralFactor": "0xc2edb3063d48246267159dc0decbc6ad303c34d2ca3dfccd5f22ca671ba417a6",
"minCollateralFactorForLiquidation": "0x13c9ef205907f266e10818c057548e059c57d5a0b0fca29f21341a3a34a5f3c8",
"minCollateralFactorForOpenInterestLong": "0x21af53e3b857539d49a91f80cd682c8386a7536bacee74a1e3694fcd304a8e46",
@@ -6536,6 +6654,7 @@
"maxLendableImpactFactor": "0x0c1c501bad7caa28ce0cda92c9d13c41e1bdc27420c262dc86801600ce4e0300",
"maxLendableImpactFactorForWithdrawals": "0x82672a03ee0b97e8fba5febf62e25e2af569f1d84ea5b3ab8e0f29d64baa0745",
"maxLendableImpactUsd": "0x5ad0e04cd5e93778c30d1d0c96b2c22a8d5824733cdf0723ea91310a87c888f4",
+ "lentPositionImpactPoolAmount": "0x5d767b7eb39d6309ad824615d743711cb9f4a5f9533ff3b152042c8b040349cb",
"minCollateralFactor": "0x44602657c72e1dbb7ac480657ba83e69528e0b3d1cdcf2232dc8f37156fc4d71",
"minCollateralFactorForLiquidation": "0x096a65eaa096404bd43912fab0518b62149c2bf39f85d1848fd4d78c40f8dedd",
"minCollateralFactorForOpenInterestLong": "0xcf807ed6fdcc8664b593225fc63bb816add4008d891a840fc6af82bb00f9bf3c",
@@ -6591,6 +6710,7 @@
"maxLendableImpactFactor": "0x52a172fe78507a9b9add733f90452d0a34ceb3816b9767276b98d85811835206",
"maxLendableImpactFactorForWithdrawals": "0x752da6cd6aa8253a60ca57985add1d8ffee67545335af24e4366b8ddc91abce6",
"maxLendableImpactUsd": "0xf95b2bd88f276a228ae665c88208504a71e3bfea2e410f081042f071f52bf1fa",
+ "lentPositionImpactPoolAmount": "0xd24943d88bab006242167704656591770eb1c997b369d82c72fec93e6746476a",
"minCollateralFactor": "0x03257da2786063bfdd152d461897826eaf6dc4b2694b0b10710a6537e478ccdb",
"minCollateralFactorForLiquidation": "0x71a102ce47f7a87ab0db19e35ee9bd0490ab45b2b21733cd96c946728333c56e",
"minCollateralFactorForOpenInterestLong": "0x958a0b1e22336db2aa2a005c0f60bec36679d2f78effd8393d8faa699cb6f401",
@@ -6646,6 +6766,7 @@
"maxLendableImpactFactor": "0xc15d25d475f4aa50f9a5259cbe7a305a9847cdf6c045b230a6afbc1cd5f18531",
"maxLendableImpactFactorForWithdrawals": "0x5d91aa603ca8ea2d4acb5cfdcab217ab180813ca23ff7670b30b9b4607e2b708",
"maxLendableImpactUsd": "0xb1de43a4aafe1524432c9c4db804da4f7367fc8bd9cc0ae46e9e466c04d6283d",
+ "lentPositionImpactPoolAmount": "0x692b86231bae04b5cfb515b5ba1649dbb2ee9790b3dbe504e80e4265ea73ae54",
"minCollateralFactor": "0x03ecbc69da5ac390ea111fe758b31fa45985710c5a9c25586abb760798bbbf9c",
"minCollateralFactorForLiquidation": "0xd920b7294e62802604fada6c7c980ebb231a9aa0696622422269bdda53254fd5",
"minCollateralFactorForOpenInterestLong": "0x5f9b7158e11769003f8be017ed1bf645a37c93d2c7f1a07fbcef8ec7f04cbb6a",
@@ -6701,6 +6822,7 @@
"maxLendableImpactFactor": "0xafb174ffaf8c22d2186ede3633386a2679c5ed9dffe2ba2ab2cf2d56467e6d92",
"maxLendableImpactFactorForWithdrawals": "0xf600423e844ceebbe6fbae6cd7555a99b428eb86905f6115658fb17146d07eeb",
"maxLendableImpactUsd": "0x5fc6ba3bfef635a161b780169896828c41dc9166a4430883ccd793f8c6c74542",
+ "lentPositionImpactPoolAmount": "0x93214cec9c92ce9615bafdb3d0a74acc28e91c14b848066260b9661b049c5b47",
"minCollateralFactor": "0x27aae14bd281c4cad2e25eb7dddf2056cf33fe30c92334b6c1908e33603a594a",
"minCollateralFactorForLiquidation": "0x4d36cb411e16178e83604c194f3384eea3dfc987123fd9cc25ef8f78dd043ee1",
"minCollateralFactorForOpenInterestLong": "0x35b24de0a1a1af62333ba0be24b03cf0639b0e1395d94c4cedec839ca221b0e7",
@@ -6756,6 +6878,7 @@
"maxLendableImpactFactor": "0x218dfb2f3fa7191c4314e14e2e8ba2945227027b451a23eea586f505242377fa",
"maxLendableImpactFactorForWithdrawals": "0xb260aecb10c9f454588ec8744bd33fe7996e449f70f197bff29b8f9d4ec9a3d5",
"maxLendableImpactUsd": "0x726bf4307a78ca4571ac740aaa9b8b643ce70e00fd2875843a363eb07bbf971e",
+ "lentPositionImpactPoolAmount": "0x6aabcfc53d8a865968fc2c45d4bb3b69753a7ef87ce5ee9516d112d14189ec80",
"minCollateralFactor": "0x698b96cd3a094ea412a7628c971920e715fe06bd06e200035b367b3dc046f745",
"minCollateralFactorForLiquidation": "0x00a26c33e84c34d7464b8b5e05c899812831d9c82e964ca0f6f73e84eb5a7c1e",
"minCollateralFactorForOpenInterestLong": "0x58330b893e1565ce7732e4b4d3255dc018500d7aefd5d58946144d3067508cc0",
@@ -6811,6 +6934,7 @@
"maxLendableImpactFactor": "0x0def8c8ea46384cb92a739eb0740b85aa9501a27c1e0b83de960af9c67343e4f",
"maxLendableImpactFactorForWithdrawals": "0xae42fa5e213f98535331eb37f6d70d88b1b1244713d7dccf1b585ab06436b7f7",
"maxLendableImpactUsd": "0x06ca1a93a5dc53cbe9ad35ae34186d6f863555074a5b712728d36d3e8c1aa27e",
+ "lentPositionImpactPoolAmount": "0xa74a87486b3920fd1739353f9da119fb9946409f1881627f55a1d20fb5cc99f7",
"minCollateralFactor": "0x3c8e9a2263e7b3aaed77f397cbb78c154d7df45c8fd9f3293610e7a9499f3bd6",
"minCollateralFactorForLiquidation": "0x8e64049c3c2981df32bed046c45d8b9a264df191d293b069d02d0e790add562c",
"minCollateralFactorForOpenInterestLong": "0x68db012f561515480190c5a28c8b7c8bff8bcfefa9f2329aa4ebb00a64dfb027",
@@ -6866,6 +6990,7 @@
"maxLendableImpactFactor": "0x22eba806cb5e0c3009a64cbd36dfe0c17608afd15fd51fe16ce47227e3a6dcc2",
"maxLendableImpactFactorForWithdrawals": "0x54c88b5d971110d4696941f23633e7580df99a0bb0554d81075f1e7690981907",
"maxLendableImpactUsd": "0x5c0c70fd4d948fc0eb766512928cc611648c1c3defc6875b5fa542a4dcfee832",
+ "lentPositionImpactPoolAmount": "0x3b40905ffd2685035d5d06ff218c8a48e780e73c7cceef85ca19fbb7fec01e62",
"minCollateralFactor": "0x2c1b564020448b09588e27ce484dac4ed1e5788851545539ed25326726fa047d",
"minCollateralFactorForLiquidation": "0x9793b322d406bd3ab07bab9bfeba55d733658a1866fcd18806a2ea761138e9ec",
"minCollateralFactorForOpenInterestLong": "0x764b0b370f16745c38880c82893b0b0272f2631f1298984dce74474631a139fd",
@@ -6921,6 +7046,7 @@
"maxLendableImpactFactor": "0x80ca26367a53b7bb69eb63378896b856d9c56873e514539df9fd1f8cbe0f5fcb",
"maxLendableImpactFactorForWithdrawals": "0x6946ea1947e9f712789712f745d5501523f92ddc69ee681186e7215cf7f6c325",
"maxLendableImpactUsd": "0x389a546d02e4ac6d3d52cfeafe5bd1a34a3a1419974e040e4f8cfee3a6a9b22b",
+ "lentPositionImpactPoolAmount": "0x1473b20c05aadac00091df90bb3acf3f7a408bf29d27d7a82fcb147690cf6125",
"minCollateralFactor": "0x8c07e19be90a3b67ead909350737c6f60ec7994cf1284b8de1374a905df4782b",
"minCollateralFactorForLiquidation": "0x47485a33abc979478e8344f4f7d339fe712240f96bba4b1b86e87d5e787073b5",
"minCollateralFactorForOpenInterestLong": "0xe1a895360341ff2c180e3c4243d98086f42adfb2b9d2e5081ac3a5f955d63d07",
@@ -6976,6 +7102,7 @@
"maxLendableImpactFactor": "0x2951dbec739b96f6c80548203cac5b59883a33f7d8169c7bbe6a6bf99be780bc",
"maxLendableImpactFactorForWithdrawals": "0x233d6a215085716798e78c682a74257be7d51f245b2786c4bfe337dc3bbadcb1",
"maxLendableImpactUsd": "0xf69e318de5ae2ff85065f2f5240e7f849c3d7e07bdb9004742b1a1e9c0f025a1",
+ "lentPositionImpactPoolAmount": "0x1a601b98de6e741f33523dde850eee355272cdbc616c1ae7da182c065d0a7862",
"minCollateralFactor": "0x6e0deb754cc255b60e296d94475feb89ecb013d88a5091c3d9784547a2cd00ea",
"minCollateralFactorForLiquidation": "0xbf4106a36b751df8edfb0c97be58049aa60a9535d83945c1e856f91aac3fbe2e",
"minCollateralFactorForOpenInterestLong": "0x39019addfc2617caa7a3c788332ec013a656af5eeb2726791dd869e978b6f0b5",
@@ -7031,6 +7158,7 @@
"maxLendableImpactFactor": "0x8d16f5c15f018ef27f8fffe83d845516d72374453112ad3c58f6ba9c4854278a",
"maxLendableImpactFactorForWithdrawals": "0x71fd88f3e3d94c6b3027b0b13b0c6fcaf00118b551fb1290aae4c362d2959e9b",
"maxLendableImpactUsd": "0xbd4ef1fd1114165f56db57865f029ec14b70c5137ab2100cb2f51c263d0701fe",
+ "lentPositionImpactPoolAmount": "0x37dbc28688043222222ca65d6034c3457c780155d9da89fa92cfda496573c08e",
"minCollateralFactor": "0xd2a56837fd65e7a57ec1b4df363df080248a402cdf8e4e10d32205f1299315c9",
"minCollateralFactorForLiquidation": "0xfbd2218164ffb156dd63428496d0a3038351db6817aa610b8a3d9c01b6da48d6",
"minCollateralFactorForOpenInterestLong": "0xf7423212c3b818bdb9261de36121cde34561293943f7645be9b61f0c35d8a996",
@@ -7086,6 +7214,7 @@
"maxLendableImpactFactor": "0xc6273fcfdf59cd91deb9fb9686994494903d24a668dd4ad0960048cc817a4723",
"maxLendableImpactFactorForWithdrawals": "0x6213a0c14104706f4387d058b9cdb7582e400d89a03dc291fd9340077744d57a",
"maxLendableImpactUsd": "0xd790b6460a2b4c13213d3a699653358bc4d22d0e5324cb36d2ea96b7082a2fc2",
+ "lentPositionImpactPoolAmount": "0x90f402d88b7e250c0375c0cd9913c020c63395778aa45a0262d28e8b77d7e6f2",
"minCollateralFactor": "0x2f63aa6789d2240d4a5aad10ba4b0c0db02e4972c9dd4ab57f67efec5028c9fe",
"minCollateralFactorForLiquidation": "0x0665b1af9c69fea970edc0f3ec2b5c6e6319e90749f8f70c60460cd7bde7230f",
"minCollateralFactorForOpenInterestLong": "0x8854c35c045fa4645e96d74bbd69b2e0bc8404a342aa528d70cdc0c015026ca9",
@@ -7141,6 +7270,7 @@
"maxLendableImpactFactor": "0x5b88cb66dee6cb5dd91dadb3901d8750fcd4ef4958d904cee1c86a554127e19e",
"maxLendableImpactFactorForWithdrawals": "0x2ad2552fb14cf42643c0cd8d117266d5f9306cf7973c8e606b419b86fa432eb2",
"maxLendableImpactUsd": "0x223f7aa968e4d0cfa0719b43405e29ecedbc98585b16e36703fb433f3a5c0d90",
+ "lentPositionImpactPoolAmount": "0xfb1d20c5fa708d5d80f340dd72df24d3b3a657a382d8d53b8927da368c88f2c7",
"minCollateralFactor": "0xd38d20369d10ff1ed3db4eac4f163d02310aedcd18a1d8ffd0e6e3ebb41d3907",
"minCollateralFactorForLiquidation": "0xb09c34890fe5881ad70910d4f2f6ea1ad50ef8990deedb4f6bd2a67212024656",
"minCollateralFactorForOpenInterestLong": "0x09d4ab823430791729510b7468eaaabcb5e8c00f90ecaa1c0fdcffec4c8aaa0a",
@@ -7196,6 +7326,7 @@
"maxLendableImpactFactor": "0x60ea3fb8c0541347b44a27c9adf58e1d7977c75a12da3231c1f5d99177670b91",
"maxLendableImpactFactorForWithdrawals": "0xae7bf691e11f1ada5a403209414a428140d869b9f15bf32c4d8abffb7b4f37b4",
"maxLendableImpactUsd": "0x7cca29147821282e9cd61ddbbc45b2989d9a4fab470d277e19af5d91c49df52b",
+ "lentPositionImpactPoolAmount": "0xd18d949138e1a7b7fd3bbd5e09e89ba26ec06904f7a2b1936242b3cdd2c7ab13",
"minCollateralFactor": "0x28b8c6de3b16af893d3062b3c6dd997355b0571f574d9d3614932a2aee60c2bc",
"minCollateralFactorForLiquidation": "0xdf248c72ad94002750220a12ba36fc086656e26676a6700755ba2e70eb3bd3a7",
"minCollateralFactorForOpenInterestLong": "0xdfad34850b6f15e9790e144784adf3e0dbe917690bb3f58260b5e578ff17e8c6",
@@ -7251,6 +7382,7 @@
"maxLendableImpactFactor": "0x2a06ec84a62ccb33f287dd45185f7bf53cc99a1f93569c347a3235b9c7627ae6",
"maxLendableImpactFactorForWithdrawals": "0x2fbf71e0d4fe56729305f96cabf0114d94bb0f0b6084c580588b4b44a9d492e5",
"maxLendableImpactUsd": "0xbd9c23f98d94e6649cb6abe4422a6332e3860e2c52306a711662240d466fd90a",
+ "lentPositionImpactPoolAmount": "0x7e0650a0ea46877b830195e52bead93bf0a89cd861fc5fcea632beb980abcec3",
"minCollateralFactor": "0x31ff077a89a32edefaa4d80de3855e73eaf6a40cc50f32ebe71560a577c4afba",
"minCollateralFactorForLiquidation": "0x5d282deab53e4da440e31d2f5627a9596a180d66855aa39e8afb0fb887459757",
"minCollateralFactorForOpenInterestLong": "0x5adf64aba368af76710a5ace26141cbcc2d482564ff50ff73428a666445593c1",
@@ -7306,6 +7438,7 @@
"maxLendableImpactFactor": "0xa456c783748d386471539dabbf506b9f523aca38e0cd40409d8d9463ba4ab882",
"maxLendableImpactFactorForWithdrawals": "0x154c58896af81cac2a2ae567841141398833a5ea9bb6efd0215d0b64087b4234",
"maxLendableImpactUsd": "0x310ee4e0657f8fc1c015e019261f7cfaaba724ab6a864d5ccb6789fdde5c5bf7",
+ "lentPositionImpactPoolAmount": "0x05c0ba1e67d6a269ca3e77cee12b3a57df58fc601ecb22b3ca1311187ab37f70",
"minCollateralFactor": "0x1adace9e32dddc011e401ada4d5ee58e76ceb2fac5990dac9ff8d1c8d1666049",
"minCollateralFactorForLiquidation": "0x013a678abe6ed4cd220abe15c07141f42893af0f2e47ff3b029c01b50819b3fd",
"minCollateralFactorForOpenInterestLong": "0x522166a0e6ac5a421bc8346f41d2ffbeace0d26930dbd211138e25646df6b4f0",
@@ -7363,6 +7496,7 @@
"maxLendableImpactFactor": "0x022ad3811d7b7d91bc080bd3301809fcf2f2d81a8038cc01dd3055b8eb688620",
"maxLendableImpactFactorForWithdrawals": "0x19d6b24c84ef3046336297552cb5a0d5d7bb5b7b7d08fbaa16f0891be5cf1209",
"maxLendableImpactUsd": "0x99b21d3e9498dee8d5ac721b3ee663996f73b5c396afff9e8d85a398cafed053",
+ "lentPositionImpactPoolAmount": "0xf989959db1a04a0704266024f6d994121f3e33842c9e7d51dda04dce3617b029",
"minCollateralFactor": "0xc8ac65a0133369e799e6bf3c2643209fc8999c2bcff00259d9627e16ab94df40",
"minCollateralFactorForLiquidation": "0x5f1772e6791b6c0a69b330be106779748f3a9f8d283357a42308bcd741f65989",
"minCollateralFactorForOpenInterestLong": "0xce4c8aa0201126eed98457458fc4d149dcf4493dd67f019fba0201d31699ef29",
@@ -7418,6 +7552,7 @@
"maxLendableImpactFactor": "0x7b6fddaaab7639f429fe405d397616696bb906c4be231cfb1c4d7e236562c50b",
"maxLendableImpactFactorForWithdrawals": "0xe556b79a93716a37cb4b0a756f9742dcdadef058d74a812d65ae62ae59a89e54",
"maxLendableImpactUsd": "0x9cfe20df3a4b61875138447ee723fe49dbeb3527295e022c21c020256c16ed3c",
+ "lentPositionImpactPoolAmount": "0xc4308a48266b27dbd2e69834596e4a81c95624603602246bc55fb30d0eee0b0b",
"minCollateralFactor": "0xc71123704a2c87e18f41f95e892d2e27ce8da0b6018544ae460f48f8f2144ea4",
"minCollateralFactorForLiquidation": "0x7992b22e42f8e8f71ab230265b54505134806d370ae23ea1846b52cadd750028",
"minCollateralFactorForOpenInterestLong": "0x06dae7e677152cf439b23a94671cfe2f632bae0a0eb85f52610742b73280818d",
@@ -7473,6 +7608,7 @@
"maxLendableImpactFactor": "0x9200212f010b5dd1abeb243eb2ac086d9bbcd93551d90e20804aea6cab322b56",
"maxLendableImpactFactorForWithdrawals": "0x7300e17fa70454eb385939bf4ec80163beddeaf3f354790ef94aed9dc4c13d10",
"maxLendableImpactUsd": "0x280ea380e16eb78606095ca2ddfc82434fbec454e9779085a9d7163e8d951f8e",
+ "lentPositionImpactPoolAmount": "0xf71e037f8855a3cc202629a9ae07d8b408ccfd58492c038acea574a2905c18a0",
"minCollateralFactor": "0xf7acb321f5990dbd2bf54ddab8e7426f8c045dd4be514bb56b519748395f3cb5",
"minCollateralFactorForLiquidation": "0x9a87fa7bb6705fede532152e983195af8bf8b86ed9b80c87ea22dea75b961c3b",
"minCollateralFactorForOpenInterestLong": "0x6ed33823024e228a1e472abbb2b3101ade60d23a6a6039ce31db1558d0954430",
@@ -7528,6 +7664,7 @@
"maxLendableImpactFactor": "0x2eb81ca2db52707f192ab9632661f0e1132cdfc0694ad18bee397a254f222731",
"maxLendableImpactFactorForWithdrawals": "0x6a89295107925cc7889dd59bbb7105ac3c9584561e8c96004478d45814e912a2",
"maxLendableImpactUsd": "0x3988b771b9d14b205a91822bd00ca86670b27988546645d5be212e6249b58312",
+ "lentPositionImpactPoolAmount": "0xcbdd8337c03f23f45a4523c3806217336ba930b7a98c4077c269a09c60c8e901",
"minCollateralFactor": "0x0ea5c12870d31f5d56509a8d6f937d6d265bb0835b1633663c78d3b55ad2cbc6",
"minCollateralFactorForLiquidation": "0x4dc8fa882d20557c438d4b989132dffcdec3a2eaba1089cef51b90436232479e",
"minCollateralFactorForOpenInterestLong": "0x638947e41e3db0abc6f46332e4c0312c0f771ed78912b88148a27aa777c9b3f6",
@@ -7583,6 +7720,7 @@
"maxLendableImpactFactor": "0xf708b5ec47885aabb16b2d447bf2cd5c1402a3bdcf70b3a5e109371f1369a98c",
"maxLendableImpactFactorForWithdrawals": "0x28de0a3bba927558d52feec34658ddc40cbc5ba8dc1b93a4375d92657bd287e6",
"maxLendableImpactUsd": "0x2eca434623f8709dc1cfe29b4c8ee81075194579976131913f1b79cce84dd375",
+ "lentPositionImpactPoolAmount": "0x9c1c07244a02b8aaa14935b64b49922544464cc6d1f2d1656ef3c6288f167971",
"minCollateralFactor": "0xe90b7b04eb6f259d072fd69ed1f54345da2f08de8fc9a0dcc299a87c8bf98244",
"minCollateralFactorForLiquidation": "0x97c9697f9c54bee1d7aa87aafb951e9271ee448039c033ee1b07f82f6bd393c6",
"minCollateralFactorForOpenInterestLong": "0xa671eebbbbf69e5fdc8ba09cd259de013c3efedf731d39a16b2aacfcb0897650",
diff --git a/sdk/src/test/mock.ts b/sdk/src/test/mock.ts
index 9b9365679f..37ec08ac22 100644
--- a/sdk/src/test/mock.ts
+++ b/sdk/src/test/mock.ts
@@ -226,6 +226,7 @@ export function mockMarketsInfoData(
maxLendableImpactFactor: expandDecimals(1, 23),
maxLendableImpactFactorForWithdrawals: expandDecimals(1, 23),
maxLendableImpactUsd: expandDecimals(1, 23),
+ lentPositionImpactPoolAmount: expandDecimals(1, 23),
positionImpactExponentFactor: expandDecimals(2, 30),
swapFeeFactorForBalanceWasImproved: expandDecimals(2, 27),
diff --git a/sdk/src/types/markets.ts b/sdk/src/types/markets.ts
index 418eac2046..6e9acd87b6 100644
--- a/sdk/src/types/markets.ts
+++ b/sdk/src/types/markets.ts
@@ -103,6 +103,7 @@ export type MarketInfo = Market &
maxLendableImpactFactor: bigint;
maxLendableImpactFactorForWithdrawals: bigint;
maxLendableImpactUsd: bigint;
+ lentPositionImpactPoolAmount: bigint;
positionImpactExponentFactor: bigint;
swapFeeFactorForBalanceWasImproved: bigint;
diff --git a/sdk/src/types/subsquid.ts b/sdk/src/types/subsquid.ts
index a29132332e..40440c5e9a 100644
--- a/sdk/src/types/subsquid.ts
+++ b/sdk/src/types/subsquid.ts
@@ -6917,6 +6917,8 @@ export interface SwapInfosConnection {
export interface TradeAction {
__typename?: "TradeAction";
+ srcChainId?: Maybe;
+ totalImpactUsd?: Maybe;
acceptablePrice?: Maybe;
account: Scalars["String"]["output"];
basePnlUsd?: Maybe;
diff --git a/sdk/src/types/tradeHistory.ts b/sdk/src/types/tradeHistory.ts
index 617bc98acd..5786bd5923 100644
--- a/sdk/src/types/tradeHistory.ts
+++ b/sdk/src/types/tradeHistory.ts
@@ -12,6 +12,7 @@ export enum TradeActionType {
export type PositionTradeAction = {
id: string;
+ srcChainId: number | null;
eventName: TradeActionType;
marketInfo: MarketInfo;
marketAddress: string;
@@ -44,6 +45,7 @@ export type PositionTradeAction = {
reason?: string;
reasonBytes?: string | Uint8Array;
shouldUnwrapNativeToken: boolean;
+ totalImpactUsd: bigint | null;
liquidationFeeAmount?: bigint;
twapParams:
| {
@@ -59,6 +61,7 @@ export type PositionTradeAction = {
export type SwapTradeAction = {
id: string;
+ srcChainId: number | null;
account: string;
eventName: TradeActionType;
initialCollateralTokenAddress: string;
diff --git a/sdk/src/utils/fees/priceImpact.ts b/sdk/src/utils/fees/priceImpact.ts
index 7dcd17bfd3..97e2e314fd 100644
--- a/sdk/src/utils/fees/priceImpact.ts
+++ b/sdk/src/utils/fees/priceImpact.ts
@@ -216,7 +216,7 @@ export function getProportionalPendingImpactValues({
}) {
// TODO: round up magnitude division
const proportionalPendingImpactDeltaAmount =
- sizeDeltaUsd !== 0n ? bigMath.mulDiv(pendingImpactAmount, sizeDeltaUsd, sizeInUsd) : 0n;
+ sizeDeltaUsd !== 0n && sizeInUsd !== 0n ? bigMath.mulDiv(pendingImpactAmount, sizeDeltaUsd, sizeInUsd) : 0n;
const proportionalPendingImpactDeltaUsd = convertToUsd(
proportionalPendingImpactDeltaAmount,
diff --git a/sdk/src/utils/marketKeysAndConfigs.ts b/sdk/src/utils/marketKeysAndConfigs.ts
index 015599bad7..ab6d9f6c11 100644
--- a/sdk/src/utils/marketKeysAndConfigs.ts
+++ b/sdk/src/utils/marketKeysAndConfigs.ts
@@ -7,6 +7,7 @@ import {
FUNDING_FACTOR_KEY,
FUNDING_INCREASE_FACTOR_PER_SECOND,
IS_MARKET_DISABLED_KEY,
+ LENT_POSITION_IMPACT_POOL_AMOUNT_KEY,
MAX_FUNDING_FACTOR_PER_SECOND,
MAX_LENDABLE_IMPACT_FACTOR_FOR_WITHDRAWALS_KEY,
MAX_LENDABLE_IMPACT_FACTOR_KEY,
@@ -205,6 +206,10 @@ export function hashMarketConfigKeys(market: MarketConfig) {
["bytes32", "address"],
[MAX_LENDABLE_IMPACT_USD_KEY, marketAddress],
],
+ lentPositionImpactPoolAmount: [
+ ["bytes32", "address"],
+ [LENT_POSITION_IMPACT_POOL_AMOUNT_KEY, marketAddress],
+ ],
minCollateralFactor: [
["bytes32", "address"],
[MIN_COLLATERAL_FACTOR_KEY, marketAddress],
diff --git a/sdk/src/utils/prices.ts b/sdk/src/utils/prices.ts
index efe90e3179..183aae1882 100644
--- a/sdk/src/utils/prices.ts
+++ b/sdk/src/utils/prices.ts
@@ -50,12 +50,13 @@ export function getOrderThresholdType(orderType: OrderType, isLong: boolean) {
export function getAcceptablePriceInfo(p: {
marketInfo: MarketInfo;
isIncrease: boolean;
+ isLimit: boolean;
isLong: boolean;
indexPrice: bigint;
sizeDeltaUsd: bigint;
maxNegativePriceImpactBps?: bigint;
}) {
- const { marketInfo, isIncrease, isLong, indexPrice, sizeDeltaUsd, maxNegativePriceImpactBps } = p;
+ const { marketInfo, isIncrease, isLong, isLimit, indexPrice, sizeDeltaUsd, maxNegativePriceImpactBps } = p;
const { indexToken } = marketInfo;
const values = {
@@ -104,7 +105,7 @@ export function getAcceptablePriceInfo(p: {
isIncrease,
{
fallbackToZero: !isIncrease,
- shouldCapNegativeImpact: isIncrease,
+ shouldCapNegativeImpact: isIncrease && !isLimit,
}
);
diff --git a/sdk/src/utils/trade/decrease.ts b/sdk/src/utils/trade/decrease.ts
index c5d97b82a5..be7b77f2c2 100644
--- a/sdk/src/utils/trade/decrease.ts
+++ b/sdk/src/utils/trade/decrease.ts
@@ -300,10 +300,10 @@ export function getDecreasePositionAmounts(p: {
const totalFeesUsd = getTotalFeesUsdForDecrease({
positionFeeUsd: values.positionFeeUsd,
- borrowingFeeUsd: 0n,
- fundingFeeUsd: 0n,
- swapProfitFeeUsd: 0n,
- swapUiFeeUsd: 0n,
+ borrowingFeeUsd: values.borrowingFeeUsd,
+ fundingFeeUsd: values.fundingFeeUsd,
+ swapProfitFeeUsd: values.swapProfitFeeUsd,
+ swapUiFeeUsd: values.swapUiFeeUsd,
uiFeeUsd: values.uiFeeUsd,
pnlUsd: values.realizedPnl,
totalPendingImpactDeltaUsd: values.totalPendingImpactDeltaUsd,
@@ -325,8 +325,6 @@ export function getDecreasePositionAmounts(p: {
values.collateralPrice
)!;
- values.receiveTokenAmount = payedInfo.outputAmount;
-
// Collateral delta
if (values.isFullClose) {
values.collateralDeltaUsd = estimatedCollateralUsd;
@@ -511,6 +509,7 @@ function applyAcceptablePrice(p: {
const acceptablePriceInfo = getAcceptablePriceInfo({
marketInfo,
isIncrease: false,
+ isLimit: false,
isLong,
indexPrice: values.indexPrice,
sizeDeltaUsd: values.sizeDeltaUsd,
@@ -558,6 +557,7 @@ function applyAcceptablePrice(p: {
const triggerAcceptablePriceInfo = getAcceptablePriceInfo({
marketInfo,
isIncrease: false,
+ isLimit: false,
isLong,
indexPrice: values.indexPrice,
sizeDeltaUsd: values.sizeDeltaUsd,
diff --git a/sdk/src/utils/trade/increase.ts b/sdk/src/utils/trade/increase.ts
index 6be8554a43..b8f6498d62 100644
--- a/sdk/src/utils/trade/increase.ts
+++ b/sdk/src/utils/trade/increase.ts
@@ -375,6 +375,7 @@ export function getIncreasePositionAmounts(p: IncreasePositionParams): IncreaseP
const acceptablePriceInfo = getAcceptablePriceInfo({
marketInfo,
isIncrease: true,
+ isLimit,
isLong,
indexPrice: values.indexPrice,
sizeDeltaUsd: values.sizeDeltaUsd,
@@ -408,6 +409,7 @@ export function getIncreasePositionAmounts(p: IncreasePositionParams): IncreaseP
const limitAcceptablePriceInfo = getAcceptablePriceInfo({
marketInfo,
isIncrease: true,
+ isLimit,
isLong,
indexPrice: values.indexPrice,
sizeDeltaUsd: values.sizeDeltaUsd,
diff --git a/sdk/src/utils/tradeHistory.ts b/sdk/src/utils/tradeHistory.ts
index 517339dfcb..b531a3e0b4 100644
--- a/sdk/src/utils/tradeHistory.ts
+++ b/sdk/src/utils/tradeHistory.ts
@@ -46,6 +46,7 @@ export function createRawTradeActionTransformer(
const tradeAction: SwapTradeAction = {
id: rawAction.id,
+ srcChainId: rawAction.srcChainId ?? null,
eventName: rawAction.eventName as TradeActionType,
account: rawAction.account,
swapPath,
@@ -99,6 +100,7 @@ export function createRawTradeActionTransformer(
account: rawAction.account,
marketAddress,
marketInfo,
+ srcChainId: rawAction.srcChainId ?? null,
indexToken,
swapPath,
initialCollateralTokenAddress,
@@ -138,6 +140,7 @@ export function createRawTradeActionTransformer(
priceImpactDiffUsd: rawAction.priceImpactDiffUsd ? BigInt(rawAction.priceImpactDiffUsd) : undefined,
priceImpactUsd: rawAction.priceImpactUsd ? BigInt(rawAction.priceImpactUsd) : undefined,
+ totalImpactUsd: rawAction.totalImpactUsd ? BigInt(rawAction.totalImpactUsd) : null,
positionFeeAmount: rawAction.positionFeeAmount ? BigInt(rawAction.positionFeeAmount) : undefined,
borrowingFeeAmount: rawAction.borrowingFeeAmount ? BigInt(rawAction.borrowingFeeAmount) : undefined,
fundingFeeAmount: rawAction.fundingFeeAmount ? BigInt(rawAction.fundingFeeAmount) : undefined,
diff --git a/src/components/Synthetics/TradeHistory/TradeHistory.tsx b/src/components/Synthetics/TradeHistory/TradeHistory.tsx
index f07958a1a8..f054f2dca1 100644
--- a/src/components/Synthetics/TradeHistory/TradeHistory.tsx
+++ b/src/components/Synthetics/TradeHistory/TradeHistory.tsx
@@ -57,9 +57,8 @@ export function TradeHistory(p: Props) {
const [fromTxTimestamp, toTxTimestamp] = useNormalizeDateRange(startDate, endDate);
- const {
- positionsConstants: { minCollateralUsd },
- } = usePositionsConstantsRequest(chainId);
+ const { positionsConstants } = usePositionsConstantsRequest(chainId);
+ const { minCollateralUsd } = positionsConstants || {};
const {
tradeActions,
diff --git a/src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts b/src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
index 17436b3b79..2e64bd0d63 100644
--- a/src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
+++ b/src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
@@ -3,7 +3,7 @@ import { t } from "@lingui/macro";
import { MaxInt256 } from "ethers";
import { getMarketFullName, getMarketIndexName, getMarketPoolName } from "domain/synthetics/markets";
-import { OrderType, isIncreaseOrderType } from "domain/synthetics/orders";
+import { OrderType, isDecreaseOrderType, isIncreaseOrderType } from "domain/synthetics/orders";
import { convertToUsd, parseContractPrice } from "domain/synthetics/tokens/utils";
import { getShouldUseMaxPrice } from "domain/synthetics/trade";
import {
@@ -23,6 +23,7 @@ import { bigMath } from "sdk/utils/bigmath";
import {
INEQUALITY_GT,
INEQUALITY_LT,
+ Line,
MakeOptional,
RowDetails,
formatTradeActionTimestamp,
@@ -41,6 +42,8 @@ export const formatPositionMessage = (
relativeTimestamp = true
): RowDetails => {
const collateralToken = tradeAction.initialCollateralToken;
+ const isV22Action = tradeAction.srcChainId !== null;
+
let sizeDeltaUsd = tradeAction.sizeDeltaUsd;
if (
@@ -164,7 +167,15 @@ export const formatPositionMessage = (
displayDecimals: marketPriceDecimals,
visualMultiplier: tradeAction.indexToken.visualMultiplier,
});
- const formattedPriceImpact = formatDeltaUsd(tradeAction.priceImpactUsd);
+
+ const priceImpactLines = getPriceImpactLines(tradeAction);
+
+ let displayedPriceImpact: string | undefined = undefined;
+ if (isIncreaseOrderType(ot) && !isV22Action) {
+ displayedPriceImpact = formatDeltaUsd(tradeAction.priceImpactUsd);
+ } else if (isDecreaseOrderType(ot) && isV22Action && tradeAction.totalImpactUsd !== null) {
+ displayedPriceImpact = formatDeltaUsd(tradeAction.totalImpactUsd);
+ }
let result: MakeOptional;
@@ -185,6 +196,7 @@ export const formatPositionMessage = (
} else if (ot === OrderType.MarketIncrease && ev === TradeActionType.OrderExecuted) {
const customAction = sizeDeltaUsd > 0 ? action : i18n._(actionTextMap["Deposit-OrderExecuted"]!);
const customSize = sizeDeltaUsd > 0 ? sizeDeltaText : formattedCollateralDelta;
+
const priceComment =
sizeDeltaUsd > 0
? lines(
@@ -192,12 +204,7 @@ export const formatPositionMessage = (
"",
infoRow(t`Order Acceptable Price`, acceptablePriceInequality + formattedAcceptablePrice),
infoRow(t`Order Execution Price`, formattedExecutionPrice!),
- infoRow(t`Price Impact`, {
- text: formattedPriceImpact!,
- state: numberToState(tradeAction.priceImpactUsd!),
- }),
- "",
- t`Order execution price takes into account price impact.`
+ ...priceImpactLines
)
: lines(t`Mark price for the order.`);
@@ -255,12 +262,7 @@ export const formatPositionMessage = (
? infoRow(t`Order Acceptable Price`, acceptablePriceInequality + formattedAcceptablePrice)
: undefined,
infoRow(t`Order Execution Price`, formattedExecutionPrice!),
- infoRow(t`Price Impact`, {
- text: formattedPriceImpact!,
- state: numberToState(tradeAction.priceImpactUsd!),
- }),
- "",
- t`Order execution price takes into account price impact.`
+ ...priceImpactLines
),
acceptablePrice: t`N/A`,
pnl: formattedPnl,
@@ -329,12 +331,7 @@ export const formatPositionMessage = (
? infoRow(t`Order Acceptable Price`, acceptablePriceInequality + formattedAcceptablePrice)
: undefined,
infoRow(t`Order Execution Price`, formattedExecutionPrice!),
- infoRow(t`Price Impact`, {
- text: formattedPriceImpact!,
- state: numberToState(tradeAction.priceImpactUsd!),
- }),
- "",
- t`Order execution price takes into account price impact.`
+ ...priceImpactLines
),
acceptablePrice: isAcceptablePriceUseful ? acceptablePriceInequality + formattedAcceptablePrice : undefined,
};
@@ -432,12 +429,7 @@ export const formatPositionMessage = (
"",
infoRow(t`Order Acceptable Price`, acceptablePriceInequality + formattedAcceptablePrice),
infoRow(t`Order Execution Price`, formattedExecutionPrice!),
- infoRow(t`Price Impact`, {
- text: formattedPriceImpact!,
- state: numberToState(tradeAction.priceImpactUsd!),
- }),
- "",
- t`Order execution price takes into account price impact.`
+ ...priceImpactLines
),
acceptablePrice: acceptablePriceInequality + formattedAcceptablePrice,
pnl: formattedPnl,
@@ -477,12 +469,7 @@ export const formatPositionMessage = (
infoRow(t`Order Trigger Price`, triggerPriceInequality + formattedTriggerPrice),
infoRow(t`Order Acceptable Price`, acceptablePriceInequality + formattedAcceptablePrice),
infoRow(t`Order Execution Price`, formattedExecutionPrice!),
- infoRow(t`Price Impact`, {
- text: formattedPriceImpact!,
- state: numberToState(tradeAction.priceImpactUsd!),
- }),
- "",
- t`Order execution price takes into account price impact.`
+ ...priceImpactLines
),
acceptablePrice: acceptablePriceInequality + formattedAcceptablePrice,
pnl: formattedPnl,
@@ -558,12 +545,7 @@ export const formatPositionMessage = (
? infoRow(t`Order Acceptable Price`, acceptablePriceInequality + formattedAcceptablePrice)
: undefined,
infoRow(t`Order Execution Price`, formattedExecutionPrice!),
- infoRow(t`Price Impact`, {
- text: formattedPriceImpact!,
- state: numberToState(tradeAction.priceImpactUsd!),
- }),
- "",
- t`Order execution price takes into account price impact.`
+ ...priceImpactLines
),
pnl: formattedPnl,
pnlState: numberToState(tradeAction.pnlUsd),
@@ -730,10 +712,7 @@ export const formatPositionMessage = (
infoRow(t`Min. Required Collateral`, formattedMinCollateral),
infoRow(t`Collateral at Liquidation`, formattedLeftoverCollateral),
"",
- infoRow(t`Price Impact`, {
- text: formattedPriceImpact!,
- state: numberToState(tradeAction.priceImpactUsd!),
- }),
+ ...priceImpactLines,
infoRow(t`Liquidation Fee`, {
text: formattedLiquidationFee,
state: "error",
@@ -760,13 +739,59 @@ export const formatPositionMessage = (
size: sizeDeltaText,
marketPrice: formattedMarketPrice,
executionPrice: formattedExecutionPrice,
- priceImpact: formattedPriceImpact,
+ priceImpact: displayedPriceImpact,
indexName,
poolName,
...result!,
};
};
+function getPriceImpactLines(tradeAction: PositionTradeAction) {
+ const isV22Action = tradeAction.srcChainId !== null;
+ const lines: Line[] = [];
+
+ if (isIncreaseOrderType(tradeAction.orderType)) {
+ if (isV22Action) {
+ return [];
+ }
+
+ const formattedPriceImpact = formatDeltaUsd(tradeAction.priceImpactUsd);
+
+ lines.push(
+ infoRow(t`Price Impact`, {
+ text: formattedPriceImpact!,
+ state: numberToState(tradeAction.priceImpactUsd!),
+ })
+ );
+ }
+
+ if (isDecreaseOrderType(tradeAction.orderType)) {
+ if (isV22Action && tradeAction.totalImpactUsd !== null) {
+ const formattedNetPriceImpact = formatDeltaUsd(tradeAction.totalImpactUsd);
+
+ lines.push(
+ infoRow(t`Net Price Impact`, {
+ text: formattedNetPriceImpact!,
+ state: numberToState(tradeAction.totalImpactUsd!),
+ })
+ );
+ } else {
+ const formattedPriceImpact = formatDeltaUsd(tradeAction.priceImpactUsd);
+
+ lines.push(
+ infoRow(t`Price Impact`, {
+ text: formattedPriceImpact!,
+ state: numberToState(tradeAction.priceImpactUsd!),
+ })
+ );
+ }
+ }
+
+ lines.push("", t`Order execution price takes into account price impact.`);
+
+ return lines;
+}
+
function getTokenPriceByTradeAction(tradeAction: PositionTradeAction) {
return getShouldUseMaxPrice(isIncreaseOrderType(tradeAction.orderType), tradeAction.isLong)
? tradeAction.indexTokenPriceMax
diff --git a/src/config/subgraph.ts b/src/config/subgraph.ts
index d1d097b763..cb4486cc11 100644
--- a/src/config/subgraph.ts
+++ b/src/config/subgraph.ts
@@ -8,7 +8,8 @@ const SUBGRAPH_URLS = {
referrals: "https://subgraph.satsuma-prod.com/3b2ced13c8d9/gmx/gmx-arbitrum-referrals/api",
nissohVault: "https://api.thegraph.com/subgraphs/name/nissoh/gmx-vault",
syntheticsStats: "https://subgraph.satsuma-prod.com/3b2ced13c8d9/gmx/synthetics-arbitrum-stats/api",
- subsquid: "https://gmx-test.squids.live/arbitrum-multichain@536193/api/graphql",
+ // subsquid: "https://gmx.squids.live/gmx-synthetics-arbitrum:prod/api/graphql",
+ subsquid: "https://gmx-test.squids.live/v22-arbitrum2@kd7hzy/api/graphql",
},
[AVALANCHE]: {
@@ -26,7 +27,7 @@ const SUBGRAPH_URLS = {
},
[ARBITRUM_SEPOLIA]: {
- subsquid: "https://gmx-test.squids.live/arbitrum-sepolia-multichain@dda06b/api/graphql",
+ subsquid: "https://gmx-test.squids.live/v22-arbitrum-sepolia@eysngo/api/graphql",
},
[BOTANIX]: {
diff --git a/src/context/SyntheticsStateContext/SyntheticsStateContextProvider.tsx b/src/context/SyntheticsStateContext/SyntheticsStateContextProvider.tsx
index b50976b1fa..9bfd2badfd 100644
--- a/src/context/SyntheticsStateContext/SyntheticsStateContextProvider.tsx
+++ b/src/context/SyntheticsStateContext/SyntheticsStateContextProvider.tsx
@@ -208,10 +208,10 @@ export function SyntheticsStateContextProvider({
const userReferralInfo = useUserReferralInfoRequest(signer, chainId, account, skipLocalReferralCode);
const [closingPositionKey, setClosingPositionKey] = useState();
const [isCandlesLoaded, setIsCandlesLoaded] = useState(false);
- const { accruedPositionPriceImpactFees, claimablePositionPriceImpactFees } = useRebatesInfoRequest(
- chainId,
- isTradePage
- );
+ const { accruedPositionPriceImpactFees, claimablePositionPriceImpactFees } = useRebatesInfoRequest(chainId, {
+ enabled: isTradePage,
+ positionsConstants,
+ });
const oracleSettings = useOracleSettingsData();
diff --git a/src/context/SyntheticsStateContext/selectors/globalSelectors.ts b/src/context/SyntheticsStateContext/selectors/globalSelectors.ts
index ede574b182..a35ff1d13b 100644
--- a/src/context/SyntheticsStateContext/selectors/globalSelectors.ts
+++ b/src/context/SyntheticsStateContext/selectors/globalSelectors.ts
@@ -56,9 +56,9 @@ export const selectGlvAndMarketsInfoData = createSelector((q) => {
};
});
-export const selectMinCollateralUsd = (s: SyntheticsState) => s.globals.positionsConstants.minCollateralUsd;
-export const selectMinPositionSizeUsd = (s: SyntheticsState) => s.globals.positionsConstants.minPositionSizeUsd;
-export const selectMaxAutoCancelOrders = (s: SyntheticsState) => s.globals.positionsConstants.maxAutoCancelOrders;
+export const selectMinCollateralUsd = (s: SyntheticsState) => s.globals.positionsConstants?.minCollateralUsd;
+export const selectMinPositionSizeUsd = (s: SyntheticsState) => s.globals.positionsConstants?.minPositionSizeUsd;
+export const selectMaxAutoCancelOrders = (s: SyntheticsState) => s.globals.positionsConstants?.maxAutoCancelOrders;
export const selectClosingPositionKey = (s: SyntheticsState) => s.globals.closingPositionKey;
export const selectSetClosingPositionKey = (s: SyntheticsState) => s.globals.setClosingPositionKey;
diff --git a/src/context/SyntheticsStateContext/selectors/orderEditorSelectors.ts b/src/context/SyntheticsStateContext/selectors/orderEditorSelectors.ts
index b6ae2e80e9..25b6271433 100644
--- a/src/context/SyntheticsStateContext/selectors/orderEditorSelectors.ts
+++ b/src/context/SyntheticsStateContext/selectors/orderEditorSelectors.ts
@@ -589,6 +589,7 @@ export const selectOrderEditorPriceImpactFeeBps = createSelector((q) => {
getAcceptablePriceInfo({
indexPrice: markPrice!,
isIncrease: isIncreaseOrderType(order.orderType),
+ isLimit: isLimitOrderType(order.orderType),
isLong: order.isLong,
marketInfo: market,
sizeDeltaUsd: sizeDeltaUsd!,
diff --git a/src/domain/synthetics/__tests__/trade/decrease.spec.ts b/src/domain/synthetics/__tests__/trade/decrease.spec.ts
index fa1202600d..5729cd99e5 100644
--- a/src/domain/synthetics/__tests__/trade/decrease.spec.ts
+++ b/src/domain/synthetics/__tests__/trade/decrease.spec.ts
@@ -113,6 +113,7 @@ const marketInfo: MarketInfo = {
maxLendableImpactFactor: BigInt("0x00"),
maxLendableImpactFactorForWithdrawals: BigInt("0x00"),
maxLendableImpactUsd: BigInt("0x00"),
+ lentPositionImpactPoolAmount: BigInt("0x00"),
positionImpactExponentFactor: BigInt("0x193e5939a08ce9dbd480000000"),
swapFeeFactorForBalanceWasImproved: BigInt("0x019d971e4fe8401e74000000"),
swapFeeFactorForBalanceWasNotImproved: BigInt("0x024306c4097859c43c000000"),
diff --git a/src/domain/synthetics/fees/useRebatesInfo.ts b/src/domain/synthetics/fees/useRebatesInfo.ts
index 007b5e49f4..3be1ab53f9 100644
--- a/src/domain/synthetics/fees/useRebatesInfo.ts
+++ b/src/domain/synthetics/fees/useRebatesInfo.ts
@@ -3,9 +3,12 @@ import { getAddress } from "ethers";
import { useMemo } from "react";
import useSWR from "swr";
-import { expandDecimals } from "lib/numbers";
-import { getSyntheticsGraphClient } from "lib/subgraph";
+import { expandDecimals, PRECISION } from "lib/numbers";
+import { getSubsquidGraphClient } from "lib/subgraph";
import useWallet from "lib/wallets/useWallet";
+import { nowInSeconds } from "sdk/utils/time";
+
+import { PositionsConstants } from "../positions/usePositionsConstants";
type RawClaimableCollateral = {
marketAddress: string;
@@ -14,6 +17,7 @@ type RawClaimableCollateral = {
value: string;
factor: string;
factorByTime: string;
+ reductionFactor: string;
id: string;
};
@@ -24,6 +28,7 @@ export type RebateInfoItem = {
timeKey: string;
tokenAddress: string;
valueByFactor: bigint;
+ reductionFactor: bigint;
id: string;
};
@@ -32,9 +37,18 @@ export type RebatesInfoResult = {
claimablePositionPriceImpactFees: RebateInfoItem[];
};
-export function useRebatesInfoRequest(chainId: number, enabled: boolean): RebatesInfoResult {
+export function useRebatesInfoRequest(
+ chainId: number,
+ {
+ enabled,
+ positionsConstants,
+ }: {
+ enabled: boolean;
+ positionsConstants: PositionsConstants | undefined;
+ }
+): RebatesInfoResult {
const { account } = useWallet();
- const client = getSyntheticsGraphClient(chainId);
+ const client = getSubsquidGraphClient(chainId);
const key = enabled && chainId && client && account ? [chainId, "useRebatesInfo", account] : null;
@@ -42,7 +56,7 @@ export function useRebatesInfoRequest(chainId: number, enabled: boolean): Rebate
fetcher: async () => {
const query = gql(`{
claimableCollaterals(
- where: { account: "${account!.toLowerCase()}", claimed: false }
+ where: { account_eq: "${account}", claimed: false }
) {
id
marketAddress
@@ -50,6 +64,7 @@ export function useRebatesInfoRequest(chainId: number, enabled: boolean): Rebate
timeKey
value
factor
+ reductionFactor
factorByTime
}
}`);
@@ -61,21 +76,44 @@ export function useRebatesInfoRequest(chainId: number, enabled: boolean): Rebate
});
const { accruedPositionPriceImpactFees, claimablePositionPriceImpactFees } = useMemo(() => {
+ if (!positionsConstants) {
+ return {
+ accruedPositionPriceImpactFees: [],
+ claimablePositionPriceImpactFees: [],
+ };
+ }
+
const res: {
accruedPositionPriceImpactFees: RebateInfoItem[];
claimablePositionPriceImpactFees: RebateInfoItem[];
} = { accruedPositionPriceImpactFees: [], claimablePositionPriceImpactFees: [] };
data?.forEach((rawRebateInfo) => {
- let factor = BigInt(rawRebateInfo.factor);
const factorByTime = BigInt(rawRebateInfo.factorByTime);
+ const reductionFactor = BigInt(rawRebateInfo.reductionFactor);
+ const timeKey = BigInt(rawRebateInfo.timeKey);
+ const value = BigInt(rawRebateInfo.value);
+
+ let factor = BigInt(rawRebateInfo.factor);
+ // factorByTime > factorByAccount
if (factorByTime > factor) {
factor = factorByTime;
}
- const value = BigInt(rawRebateInfo.value);
- const valueByFactor = (value * factor) / expandDecimals(1, 30);
+ const timeDiff = BigInt(nowInSeconds()) - timeKey * positionsConstants.claimableCollateralTimeDivisor;
+
+ if (factor === 0n && reductionFactor === 0n && timeDiff > positionsConstants.claimableCollateralDelay) {
+ factor = PRECISION;
+ }
+
+ if (factor > reductionFactor) {
+ factor -= reductionFactor;
+ } else {
+ factor = 0n;
+ }
+
+ let valueByFactor = (value * factor) / expandDecimals(1, 30);
const rebateInfo: RebateInfoItem = {
factor,
@@ -84,6 +122,7 @@ export function useRebatesInfoRequest(chainId: number, enabled: boolean): Rebate
timeKey: rawRebateInfo.timeKey,
marketAddress: getAddress(rawRebateInfo.marketAddress),
tokenAddress: getAddress(rawRebateInfo.tokenAddress),
+ reductionFactor,
id: rawRebateInfo.id,
};
@@ -101,7 +140,7 @@ export function useRebatesInfoRequest(chainId: number, enabled: boolean): Rebate
});
return res;
- }, [data]);
+ }, [data, positionsConstants]);
return {
accruedPositionPriceImpactFees,
diff --git a/src/domain/synthetics/markets/useMarketsInfoRequest/buildMarketsConfigsRequest.ts b/src/domain/synthetics/markets/useMarketsInfoRequest/buildMarketsConfigsRequest.ts
index 0430422801..346b904235 100644
--- a/src/domain/synthetics/markets/useMarketsInfoRequest/buildMarketsConfigsRequest.ts
+++ b/src/domain/synthetics/markets/useMarketsInfoRequest/buildMarketsConfigsRequest.ts
@@ -181,6 +181,10 @@ export async function buildMarketsConfigsRequest(
methodName: "getUint",
params: [prebuiltHashedKeys.maxLendableImpactUsd],
},
+ lentPositionImpactPoolAmount: {
+ methodName: "getUint",
+ params: [prebuiltHashedKeys.lentPositionImpactPoolAmount],
+ },
minCollateralFactor: {
methodName: "getUint",
params: [prebuiltHashedKeys.minCollateralFactor],
diff --git a/src/domain/synthetics/markets/useMarketsInfoRequest/index.ts b/src/domain/synthetics/markets/useMarketsInfoRequest/index.ts
index 4c8011fa49..2c6cba16b8 100644
--- a/src/domain/synthetics/markets/useMarketsInfoRequest/index.ts
+++ b/src/domain/synthetics/markets/useMarketsInfoRequest/index.ts
@@ -333,6 +333,7 @@ function useMarketsConfigsRequest({
maxLendableImpactFactorForWithdrawals:
dataStoreValues.maxLendableImpactFactorForWithdrawals.returnValues[0],
maxLendableImpactUsd: dataStoreValues.maxLendableImpactUsd.returnValues[0],
+ lentPositionImpactPoolAmount: dataStoreValues.lentPositionImpactPoolAmount.returnValues[0],
positionImpactExponentFactor: dataStoreValues.positionImpactExponentFactor.returnValues[0],
swapFeeFactorForBalanceWasImproved: dataStoreValues.swapFeeFactorForBalanceWasImproved.returnValues[0],
swapFeeFactorForBalanceWasNotImproved:
diff --git a/src/domain/synthetics/markets/useMarketsInfoRequest/useFastMarketsInfoRequest.ts b/src/domain/synthetics/markets/useMarketsInfoRequest/useFastMarketsInfoRequest.ts
index bf9c4f7f65..82b39bdef0 100644
--- a/src/domain/synthetics/markets/useMarketsInfoRequest/useFastMarketsInfoRequest.ts
+++ b/src/domain/synthetics/markets/useMarketsInfoRequest/useFastMarketsInfoRequest.ts
@@ -87,6 +87,11 @@ export function useFastMarketsInfoRequest(chainId: number) {
positionImpactFactorNegative
maxPositionImpactFactorPositive
maxPositionImpactFactorNegative
+ maxLendableImpactFactor
+ maxLendableImpactFactorForWithdrawals
+ maxLendableImpactUsd
+ lentPositionImpactPoolAmount
+ atomicSwapFeeFactor
maxPositionImpactFactorForLiquidations
positionImpactExponentFactor
@@ -181,7 +186,7 @@ export function useFastMarketsInfoRequest(chainId: number) {
swapImpactPoolAmountLong: BigInt(mInfo.swapImpactPoolAmountLong),
swapImpactPoolAmountShort: BigInt(mInfo.swapImpactPoolAmountShort),
- atomicSwapFeeFactor: 0n,
+ atomicSwapFeeFactor: BigInt(mInfo.atomicSwapFeeFactor),
maxPnlFactorForTradersLong: BigInt(mInfo.maxPnlFactorForTradersLong),
maxPnlFactorForTradersShort: BigInt(mInfo.maxPnlFactorForTradersShort),
@@ -198,9 +203,10 @@ export function useFastMarketsInfoRequest(chainId: number) {
maxPositionImpactFactorPositive: BigInt(mInfo.maxPositionImpactFactorPositive),
maxPositionImpactFactorNegative: BigInt(mInfo.maxPositionImpactFactorNegative),
maxPositionImpactFactorForLiquidations: BigInt(mInfo.maxPositionImpactFactorForLiquidations),
- maxLendableImpactFactor: 0n,
- maxLendableImpactFactorForWithdrawals: 0n,
- maxLendableImpactUsd: 0n,
+ maxLendableImpactFactor: BigInt(mInfo.maxLendableImpactFactor),
+ maxLendableImpactFactorForWithdrawals: BigInt(mInfo.maxLendableImpactFactorForWithdrawals),
+ maxLendableImpactUsd: BigInt(mInfo.maxLendableImpactUsd),
+ lentPositionImpactPoolAmount: BigInt(mInfo.lentPositionImpactPoolAmount),
positionImpactExponentFactor: BigInt(mInfo.positionImpactExponentFactor),
swapFeeFactorForBalanceWasImproved: BigInt(mInfo.swapFeeFactorForPositiveImpact),
diff --git a/src/domain/synthetics/orders/utils.tsx b/src/domain/synthetics/orders/utils.tsx
index b0815b8fdb..50cdd43188 100644
--- a/src/domain/synthetics/orders/utils.tsx
+++ b/src/domain/synthetics/orders/utils.tsx
@@ -6,6 +6,7 @@ import { getTokenVisualMultiplier } from "sdk/configs/tokens";
import {
isDecreaseOrderType,
isIncreaseOrderType,
+ isLimitOrderType,
isMarketOrderType,
isOrderForPosition,
isSwapOrder,
@@ -197,6 +198,7 @@ export function getOrderErrors(p: {
const { acceptablePriceDeltaBps: currentAcceptablePriceDeltaBps } = getAcceptablePriceInfo({
marketInfo: positionOrder.marketInfo,
isIncrease: isIncreaseOrderType(positionOrder.orderType),
+ isLimit: isLimitOrderType(positionOrder.orderType),
isLong: positionOrder.isLong,
indexPrice: positionOrder.triggerPrice,
sizeDeltaUsd: positionOrder.sizeDeltaUsd,
diff --git a/src/domain/synthetics/positions/usePositionsConstants.ts b/src/domain/synthetics/positions/usePositionsConstants.ts
index 19f6202954..9c523f6bf8 100644
--- a/src/domain/synthetics/positions/usePositionsConstants.ts
+++ b/src/domain/synthetics/positions/usePositionsConstants.ts
@@ -4,6 +4,7 @@ import { getContract } from "config/contracts";
import {
CLAIMABLE_COLLATERAL_DELAY_KEY,
CLAIMABLE_COLLATERAL_REDUCTION_FACTOR_KEY,
+ CLAIMABLE_COLLATERAL_TIME_DIVISOR_KEY,
MAX_AUTO_CANCEL_ORDERS_KEY,
MIN_COLLATERAL_USD_KEY,
MIN_POSITION_SIZE_USD_KEY,
@@ -11,14 +12,18 @@ import {
import { useMulticall } from "lib/multicall";
import { CONFIG_UPDATE_INTERVAL } from "lib/timeConstants";
import type { ContractsChainId } from "sdk/configs/chains";
+
+export type PositionsConstants = {
+ minCollateralUsd: bigint;
+ minPositionSizeUsd: bigint;
+ maxAutoCancelOrders: bigint;
+ claimableCollateralDelay: bigint;
+ claimableCollateralReductionFactor: bigint;
+ claimableCollateralTimeDivisor: bigint;
+};
+
export type PositionsConstantsResult = {
- positionsConstants: {
- minCollateralUsd?: bigint;
- minPositionSizeUsd?: bigint;
- maxAutoCancelOrders?: bigint;
- claimableCollateralDelay?: bigint;
- claimableCollateralReductionFactor?: bigint;
- };
+ positionsConstants: PositionsConstants | undefined;
error?: Error;
};
@@ -53,6 +58,10 @@ export function usePositionsConstantsRequest(chainId: ContractsChainId): Positio
methodName: "getUint",
params: [CLAIMABLE_COLLATERAL_REDUCTION_FACTOR_KEY],
},
+ claimableCollateralTimeDivisor: {
+ methodName: "getUint",
+ params: [CLAIMABLE_COLLATERAL_TIME_DIVISOR_KEY],
+ },
},
},
},
@@ -63,13 +72,14 @@ export function usePositionsConstantsRequest(chainId: ContractsChainId): Positio
maxAutoCancelOrders: res.data.dataStore.maxAutoCancelOrders.returnValues[0],
claimableCollateralDelay: res.data.dataStore.claimableCollateralDelay.returnValues[0],
claimableCollateralReductionFactor: res.data.dataStore.claimableCollateralReductionFactor.returnValues[0],
+ claimableCollateralTimeDivisor: res.data.dataStore.claimableCollateralTimeDivisor.returnValues[0],
};
},
});
return useMemo(
() => ({
- positionsConstants: data || {},
+ positionsConstants: data || undefined,
error,
}),
[data, error]
diff --git a/src/domain/synthetics/positions/usePositionsInfo.ts b/src/domain/synthetics/positions/usePositionsInfo.ts
index a2d9b307b6..e1b72ea597 100644
--- a/src/domain/synthetics/positions/usePositionsInfo.ts
+++ b/src/domain/synthetics/positions/usePositionsInfo.ts
@@ -58,10 +58,8 @@ export function usePositionsInfoRequest(
} = p;
const { signer } = useWallet();
- const {
- positionsConstants: { minCollateralUsd },
- error: positionsConstantsError,
- } = usePositionsConstantsRequest(chainId);
+ const { positionsConstants, error: positionsConstantsError } = usePositionsConstantsRequest(chainId);
+ const { minCollateralUsd } = positionsConstants || {};
const { error: uiFeeFactorError } = useUiFeeFactorRequest(chainId);
const userReferralInfo = useUserReferralInfoRequest(signer, chainId, account, skipLocalReferralCode);
@@ -162,6 +160,7 @@ export function usePositionsInfoRequest(
? getAcceptablePriceInfo({
marketInfo,
isIncrease: false,
+ isLimit: false,
isLong: position.isLong,
indexPrice: getMarkPrice({ prices: indexToken.prices, isLong: position.isLong, isIncrease: false }),
sizeDeltaUsd: position.sizeInUsd,
diff --git a/src/domain/synthetics/trade/utils/decrease.spec.ts b/src/domain/synthetics/trade/utils/decrease.spec.ts
index 37b4621337..9e34e1c326 100644
--- a/src/domain/synthetics/trade/utils/decrease.spec.ts
+++ b/src/domain/synthetics/trade/utils/decrease.spec.ts
@@ -120,6 +120,7 @@ const marketInfo: MarketInfo = {
swapImpactFactorPositive: BigInt("0x0ad78ebc5ac6200000"),
swapImpactFactorNegative: BigInt("0x0ad78ebc5ac6200000"),
swapImpactExponentFactor: BigInt("0x193e5939a08ce9dbd480000000"),
+ lentPositionImpactPoolAmount: BigInt("0x00"),
atomicSwapFeeFactor: BigInt("0x00"),
borrowingFactorPerSecondForLongs: BigInt("0x00"),
borrowingFactorPerSecondForShorts: BigInt("0xd03c28208ed1247ad5"),
diff --git a/src/domain/synthetics/tradeHistory/useTradeHistory.ts b/src/domain/synthetics/tradeHistory/useTradeHistory.ts
index 143cb587b6..b11076698c 100644
--- a/src/domain/synthetics/tradeHistory/useTradeHistory.ts
+++ b/src/domain/synthetics/tradeHistory/useTradeHistory.ts
@@ -317,6 +317,7 @@ export async function fetchTradeActions({
id
eventName
+ srcChainId
account
marketAddress
swapPath
@@ -351,6 +352,8 @@ export async function fetchTradeActions({
shouldUnwrapNativeToken
twapGroupId
numberOfParts
+ totalImpactUsd
+ proportionalPendingImpactUsd
reason
reasonBytes
diff --git a/src/locales/de/messages.po b/src/locales/de/messages.po
index 05776d266b..1175019107 100644
--- a/src/locales/de/messages.po
+++ b/src/locales/de/messages.po
@@ -4447,11 +4447,6 @@ msgstr ""
#: src/components/Synthetics/GmSwap/GmFees/GmFees.tsx
#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
#: src/components/Synthetics/TradeHistory/useDownloadAsCsv.tsx
msgid "Price Impact"
msgstr "Preisimpact"
@@ -4622,6 +4617,7 @@ msgstr ""
#: src/components/Synthetics/PositionItem/PositionItem.tsx
#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
msgid "Net Price Impact"
msgstr ""
@@ -5229,6 +5225,10 @@ msgstr ""
msgid "GMX Announcements"
msgstr ""
+#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+msgid "Net price impact is the sum of the stored impact at increase and the impact at decrease action, which is only settled on position decrease. <0>Read more0>"
+msgstr ""
+
#: src/components/Header/AppHeaderLinks.tsx
#: src/pages/Referrals/Referrals.tsx
#: src/pages/Referrals/Referrals.tsx
@@ -6535,11 +6535,6 @@ msgstr ""
msgid "GMX {versionName} Account"
msgstr ""
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
msgid "Order execution price takes into account price impact."
@@ -7768,8 +7763,8 @@ msgid "Avalanche LP incentives"
msgstr ""
#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
-msgid "Net price impact is the sum of the stored impact at increase and the impact at decrease action, which is only settled on position decrease.<0>Read more0>"
-msgstr ""
+#~ msgid "Net price impact is the sum of the stored impact at increase and the impact at decrease action, which is only settled on position decrease.<0>Read more0>"
+#~ msgstr ""
#: src/components/Stake/GMXAprTooltip.tsx
msgid "{nativeTokenSymbol} APR"
diff --git a/src/locales/en/messages.po b/src/locales/en/messages.po
index 0c9278754d..04932e4509 100644
--- a/src/locales/en/messages.po
+++ b/src/locales/en/messages.po
@@ -4450,11 +4450,6 @@ msgstr "Gas Payment Token"
#: src/components/Synthetics/GmSwap/GmFees/GmFees.tsx
#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
#: src/components/Synthetics/TradeHistory/useDownloadAsCsv.tsx
msgid "Price Impact"
msgstr "Price Impact"
@@ -4625,6 +4620,7 @@ msgstr "Withdraw submitted."
#: src/components/Synthetics/PositionItem/PositionItem.tsx
#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
msgid "Net Price Impact"
msgstr "Net Price Impact"
@@ -5232,6 +5228,10 @@ msgstr "One-Click Settings"
msgid "GMX Announcements"
msgstr "GMX Announcements"
+#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+msgid "Net price impact is the sum of the stored impact at increase and the impact at decrease action, which is only settled on position decrease. <0>Read more0>"
+msgstr "Net price impact is the sum of the stored impact at increase and the impact at decrease action, which is only settled on position decrease. <0>Read more0>"
+
#: src/components/Header/AppHeaderLinks.tsx
#: src/pages/Referrals/Referrals.tsx
#: src/pages/Referrals/Referrals.tsx
@@ -6538,11 +6538,6 @@ msgstr "Price Impact / Fees"
msgid "GMX {versionName} Account"
msgstr "GMX {versionName} Account"
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
msgid "Order execution price takes into account price impact."
@@ -7774,8 +7769,8 @@ msgid "Avalanche LP incentives"
msgstr "Avalanche LP incentives"
#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
-msgid "Net price impact is the sum of the stored impact at increase and the impact at decrease action, which is only settled on position decrease.<0>Read more0>"
-msgstr "Net price impact is the sum of the stored impact at increase and the impact at decrease action, which is only settled on position decrease.<0>Read more0>"
+#~ msgid "Net price impact is the sum of the stored impact at increase and the impact at decrease action, which is only settled on position decrease.<0>Read more0>"
+#~ msgstr "Net price impact is the sum of the stored impact at increase and the impact at decrease action, which is only settled on position decrease.<0>Read more0>"
#: src/components/Stake/GMXAprTooltip.tsx
msgid "{nativeTokenSymbol} APR"
diff --git a/src/locales/es/messages.po b/src/locales/es/messages.po
index d67d837a34..5625358e37 100644
--- a/src/locales/es/messages.po
+++ b/src/locales/es/messages.po
@@ -4447,11 +4447,6 @@ msgstr ""
#: src/components/Synthetics/GmSwap/GmFees/GmFees.tsx
#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
#: src/components/Synthetics/TradeHistory/useDownloadAsCsv.tsx
msgid "Price Impact"
msgstr "Impacto de Precio"
@@ -4622,6 +4617,7 @@ msgstr ""
#: src/components/Synthetics/PositionItem/PositionItem.tsx
#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
msgid "Net Price Impact"
msgstr ""
@@ -5229,6 +5225,10 @@ msgstr ""
msgid "GMX Announcements"
msgstr ""
+#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+msgid "Net price impact is the sum of the stored impact at increase and the impact at decrease action, which is only settled on position decrease. <0>Read more0>"
+msgstr ""
+
#: src/components/Header/AppHeaderLinks.tsx
#: src/pages/Referrals/Referrals.tsx
#: src/pages/Referrals/Referrals.tsx
@@ -6535,11 +6535,6 @@ msgstr ""
msgid "GMX {versionName} Account"
msgstr ""
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
msgid "Order execution price takes into account price impact."
@@ -7768,8 +7763,8 @@ msgid "Avalanche LP incentives"
msgstr ""
#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
-msgid "Net price impact is the sum of the stored impact at increase and the impact at decrease action, which is only settled on position decrease.<0>Read more0>"
-msgstr ""
+#~ msgid "Net price impact is the sum of the stored impact at increase and the impact at decrease action, which is only settled on position decrease.<0>Read more0>"
+#~ msgstr ""
#: src/components/Stake/GMXAprTooltip.tsx
msgid "{nativeTokenSymbol} APR"
diff --git a/src/locales/fr/messages.po b/src/locales/fr/messages.po
index b1cb16f855..8e63d04f25 100644
--- a/src/locales/fr/messages.po
+++ b/src/locales/fr/messages.po
@@ -4447,11 +4447,6 @@ msgstr ""
#: src/components/Synthetics/GmSwap/GmFees/GmFees.tsx
#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
#: src/components/Synthetics/TradeHistory/useDownloadAsCsv.tsx
msgid "Price Impact"
msgstr "Impact sur le prix"
@@ -4622,6 +4617,7 @@ msgstr ""
#: src/components/Synthetics/PositionItem/PositionItem.tsx
#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
msgid "Net Price Impact"
msgstr ""
@@ -5229,6 +5225,10 @@ msgstr ""
msgid "GMX Announcements"
msgstr ""
+#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+msgid "Net price impact is the sum of the stored impact at increase and the impact at decrease action, which is only settled on position decrease. <0>Read more0>"
+msgstr ""
+
#: src/components/Header/AppHeaderLinks.tsx
#: src/pages/Referrals/Referrals.tsx
#: src/pages/Referrals/Referrals.tsx
@@ -6535,11 +6535,6 @@ msgstr ""
msgid "GMX {versionName} Account"
msgstr ""
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
msgid "Order execution price takes into account price impact."
@@ -7768,8 +7763,8 @@ msgid "Avalanche LP incentives"
msgstr ""
#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
-msgid "Net price impact is the sum of the stored impact at increase and the impact at decrease action, which is only settled on position decrease.<0>Read more0>"
-msgstr ""
+#~ msgid "Net price impact is the sum of the stored impact at increase and the impact at decrease action, which is only settled on position decrease.<0>Read more0>"
+#~ msgstr ""
#: src/components/Stake/GMXAprTooltip.tsx
msgid "{nativeTokenSymbol} APR"
diff --git a/src/locales/ja/messages.po b/src/locales/ja/messages.po
index 12cfbabbf6..3fefb42e54 100644
--- a/src/locales/ja/messages.po
+++ b/src/locales/ja/messages.po
@@ -4447,11 +4447,6 @@ msgstr ""
#: src/components/Synthetics/GmSwap/GmFees/GmFees.tsx
#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
#: src/components/Synthetics/TradeHistory/useDownloadAsCsv.tsx
msgid "Price Impact"
msgstr "価格インパクト"
@@ -4622,6 +4617,7 @@ msgstr ""
#: src/components/Synthetics/PositionItem/PositionItem.tsx
#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
msgid "Net Price Impact"
msgstr ""
@@ -5229,6 +5225,10 @@ msgstr ""
msgid "GMX Announcements"
msgstr ""
+#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+msgid "Net price impact is the sum of the stored impact at increase and the impact at decrease action, which is only settled on position decrease. <0>Read more0>"
+msgstr ""
+
#: src/components/Header/AppHeaderLinks.tsx
#: src/pages/Referrals/Referrals.tsx
#: src/pages/Referrals/Referrals.tsx
@@ -6535,11 +6535,6 @@ msgstr ""
msgid "GMX {versionName} Account"
msgstr ""
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
msgid "Order execution price takes into account price impact."
@@ -7768,8 +7763,8 @@ msgid "Avalanche LP incentives"
msgstr ""
#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
-msgid "Net price impact is the sum of the stored impact at increase and the impact at decrease action, which is only settled on position decrease.<0>Read more0>"
-msgstr ""
+#~ msgid "Net price impact is the sum of the stored impact at increase and the impact at decrease action, which is only settled on position decrease.<0>Read more0>"
+#~ msgstr ""
#: src/components/Stake/GMXAprTooltip.tsx
msgid "{nativeTokenSymbol} APR"
diff --git a/src/locales/ko/messages.po b/src/locales/ko/messages.po
index b61b5cd457..2052134bb4 100644
--- a/src/locales/ko/messages.po
+++ b/src/locales/ko/messages.po
@@ -4447,11 +4447,6 @@ msgstr ""
#: src/components/Synthetics/GmSwap/GmFees/GmFees.tsx
#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
#: src/components/Synthetics/TradeHistory/useDownloadAsCsv.tsx
msgid "Price Impact"
msgstr "가격 영향"
@@ -4622,6 +4617,7 @@ msgstr ""
#: src/components/Synthetics/PositionItem/PositionItem.tsx
#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
msgid "Net Price Impact"
msgstr ""
@@ -5229,6 +5225,10 @@ msgstr ""
msgid "GMX Announcements"
msgstr ""
+#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+msgid "Net price impact is the sum of the stored impact at increase and the impact at decrease action, which is only settled on position decrease. <0>Read more0>"
+msgstr ""
+
#: src/components/Header/AppHeaderLinks.tsx
#: src/pages/Referrals/Referrals.tsx
#: src/pages/Referrals/Referrals.tsx
@@ -6535,11 +6535,6 @@ msgstr ""
msgid "GMX {versionName} Account"
msgstr ""
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
msgid "Order execution price takes into account price impact."
@@ -7768,8 +7763,8 @@ msgid "Avalanche LP incentives"
msgstr ""
#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
-msgid "Net price impact is the sum of the stored impact at increase and the impact at decrease action, which is only settled on position decrease.<0>Read more0>"
-msgstr ""
+#~ msgid "Net price impact is the sum of the stored impact at increase and the impact at decrease action, which is only settled on position decrease.<0>Read more0>"
+#~ msgstr ""
#: src/components/Stake/GMXAprTooltip.tsx
msgid "{nativeTokenSymbol} APR"
diff --git a/src/locales/pseudo/messages.po b/src/locales/pseudo/messages.po
index 7ddad0b17d..ae03f99753 100644
--- a/src/locales/pseudo/messages.po
+++ b/src/locales/pseudo/messages.po
@@ -4447,11 +4447,6 @@ msgstr ""
#: src/components/Synthetics/GmSwap/GmFees/GmFees.tsx
#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
#: src/components/Synthetics/TradeHistory/useDownloadAsCsv.tsx
msgid "Price Impact"
msgstr ""
@@ -4622,6 +4617,7 @@ msgstr ""
#: src/components/Synthetics/PositionItem/PositionItem.tsx
#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
msgid "Net Price Impact"
msgstr ""
@@ -5229,6 +5225,10 @@ msgstr ""
msgid "GMX Announcements"
msgstr ""
+#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+msgid "Net price impact is the sum of the stored impact at increase and the impact at decrease action, which is only settled on position decrease. <0>Read more0>"
+msgstr ""
+
#: src/components/Header/AppHeaderLinks.tsx
#: src/pages/Referrals/Referrals.tsx
#: src/pages/Referrals/Referrals.tsx
@@ -6535,11 +6535,6 @@ msgstr ""
msgid "GMX {versionName} Account"
msgstr ""
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
msgid "Order execution price takes into account price impact."
@@ -7768,8 +7763,8 @@ msgid "Avalanche LP incentives"
msgstr ""
#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
-msgid "Net price impact is the sum of the stored impact at increase and the impact at decrease action, which is only settled on position decrease.<0>Read more0>"
-msgstr ""
+#~ msgid "Net price impact is the sum of the stored impact at increase and the impact at decrease action, which is only settled on position decrease.<0>Read more0>"
+#~ msgstr ""
#: src/components/Stake/GMXAprTooltip.tsx
msgid "{nativeTokenSymbol} APR"
diff --git a/src/locales/ru/messages.po b/src/locales/ru/messages.po
index 5002aecaa7..f17f71d172 100644
--- a/src/locales/ru/messages.po
+++ b/src/locales/ru/messages.po
@@ -4447,11 +4447,6 @@ msgstr ""
#: src/components/Synthetics/GmSwap/GmFees/GmFees.tsx
#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
#: src/components/Synthetics/TradeHistory/useDownloadAsCsv.tsx
msgid "Price Impact"
msgstr "Влияние цены"
@@ -4622,6 +4617,7 @@ msgstr ""
#: src/components/Synthetics/PositionItem/PositionItem.tsx
#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
msgid "Net Price Impact"
msgstr ""
@@ -5229,6 +5225,10 @@ msgstr ""
msgid "GMX Announcements"
msgstr ""
+#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+msgid "Net price impact is the sum of the stored impact at increase and the impact at decrease action, which is only settled on position decrease. <0>Read more0>"
+msgstr ""
+
#: src/components/Header/AppHeaderLinks.tsx
#: src/pages/Referrals/Referrals.tsx
#: src/pages/Referrals/Referrals.tsx
@@ -6535,11 +6535,6 @@ msgstr ""
msgid "GMX {versionName} Account"
msgstr ""
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
msgid "Order execution price takes into account price impact."
@@ -7768,8 +7763,8 @@ msgid "Avalanche LP incentives"
msgstr ""
#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
-msgid "Net price impact is the sum of the stored impact at increase and the impact at decrease action, which is only settled on position decrease.<0>Read more0>"
-msgstr ""
+#~ msgid "Net price impact is the sum of the stored impact at increase and the impact at decrease action, which is only settled on position decrease.<0>Read more0>"
+#~ msgstr ""
#: src/components/Stake/GMXAprTooltip.tsx
msgid "{nativeTokenSymbol} APR"
diff --git a/src/locales/zh/messages.po b/src/locales/zh/messages.po
index 46ea36fb07..dd13658532 100644
--- a/src/locales/zh/messages.po
+++ b/src/locales/zh/messages.po
@@ -4447,11 +4447,6 @@ msgstr ""
#: src/components/Synthetics/GmSwap/GmFees/GmFees.tsx
#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
#: src/components/Synthetics/TradeHistory/useDownloadAsCsv.tsx
msgid "Price Impact"
msgstr "价格影响"
@@ -4622,6 +4617,7 @@ msgstr ""
#: src/components/Synthetics/PositionItem/PositionItem.tsx
#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
msgid "Net Price Impact"
msgstr ""
@@ -5229,6 +5225,10 @@ msgstr ""
msgid "GMX Announcements"
msgstr ""
+#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+msgid "Net price impact is the sum of the stored impact at increase and the impact at decrease action, which is only settled on position decrease. <0>Read more0>"
+msgstr ""
+
#: src/components/Header/AppHeaderLinks.tsx
#: src/pages/Referrals/Referrals.tsx
#: src/pages/Referrals/Referrals.tsx
@@ -6535,11 +6535,6 @@ msgstr ""
msgid "GMX {versionName} Account"
msgstr ""
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
-#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
#: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts
msgid "Order execution price takes into account price impact."
@@ -7768,8 +7763,8 @@ msgid "Avalanche LP incentives"
msgstr ""
#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
-msgid "Net price impact is the sum of the stored impact at increase and the impact at decrease action, which is only settled on position decrease.<0>Read more0>"
-msgstr ""
+#~ msgid "Net price impact is the sum of the stored impact at increase and the impact at decrease action, which is only settled on position decrease.<0>Read more0>"
+#~ msgstr ""
#: src/components/Stake/GMXAprTooltip.tsx
msgid "{nativeTokenSymbol} APR"
diff --git a/src/pages/SyntheticsStats/SyntheticsStats.tsx b/src/pages/SyntheticsStats/SyntheticsStats.tsx
index b185ab0b3b..9053394f2d 100644
--- a/src/pages/SyntheticsStats/SyntheticsStats.tsx
+++ b/src/pages/SyntheticsStats/SyntheticsStats.tsx
@@ -60,14 +60,9 @@ export function SyntheticsStats() {
const { tokensData } = useTokensDataRequest(chainId, srcChainId);
const { marketsInfoData } = useMarketsInfoRequest(chainId, { tokensData });
const { kinkMarketsBorrowingRatesData } = useKinkModelMarketsRates(chainId);
- const {
- positionsConstants: {
- minCollateralUsd,
- minPositionSizeUsd,
- claimableCollateralDelay,
- claimableCollateralReductionFactor,
- },
- } = usePositionsConstantsRequest(chainId);
+ const { positionsConstants } = usePositionsConstantsRequest(chainId);
+ const { minCollateralUsd, minPositionSizeUsd, claimableCollateralDelay, claimableCollateralReductionFactor } =
+ positionsConstants || {};
const markets = Object.values(marketsInfoData || {});
markets.sort((a, b) => {
@@ -1065,6 +1060,11 @@ export function SyntheticsStats() {
value={formatUsd(market.maxLendableImpactUsd)}
showDollar={false}
/>
+
From 99a0f65c30d43bf0ca1877b324e33418d4cadb31 Mon Sep 17 00:00:00 2001
From: Divhead <110596516+divhead@users.noreply.github.com>
Date: Sun, 24 Aug 2025 20:30:27 -0700
Subject: [PATCH 38/55] messages
---
.../rows/PositionSellerPriceImpactFeesRow.tsx | 19 +++++-
.../TradeBoxRows/PriceImpactFeesRow.tsx | 67 +++++++++++++++++--
.../Synthetics/TradeFeesRow/TradeFeesRow.tsx | 32 +--------
src/locales/de/messages.po | 5 +-
src/locales/en/messages.po | 5 +-
src/locales/es/messages.po | 5 +-
src/locales/fr/messages.po | 5 +-
src/locales/ja/messages.po | 5 +-
src/locales/ko/messages.po | 5 +-
src/locales/pseudo/messages.po | 5 +-
src/locales/ru/messages.po | 5 +-
src/locales/zh/messages.po | 5 +-
12 files changed, 106 insertions(+), 57 deletions(-)
diff --git a/src/components/Synthetics/PositionSeller/rows/PositionSellerPriceImpactFeesRow.tsx b/src/components/Synthetics/PositionSeller/rows/PositionSellerPriceImpactFeesRow.tsx
index 84376947fc..3f9649c682 100644
--- a/src/components/Synthetics/PositionSeller/rows/PositionSellerPriceImpactFeesRow.tsx
+++ b/src/components/Synthetics/PositionSeller/rows/PositionSellerPriceImpactFeesRow.tsx
@@ -1,4 +1,4 @@
-import { t } from "@lingui/macro";
+import { t, Trans } from "@lingui/macro";
import cx from "classnames";
import { useMemo } from "react";
@@ -6,7 +6,9 @@ import { selectPositionSellerFees } from "context/SyntheticsStateContext/selecto
import { useSelector } from "context/SyntheticsStateContext/utils";
import { formatPercentage } from "lib/numbers";
+import ExternalLink from "components/ExternalLink/ExternalLink";
import { SyntheticsInfoRow } from "components/Synthetics/SyntheticsInfoRow";
+import Tooltip from "components/Tooltip/Tooltip";
export function PositionSellerPriceImpactFeesRow() {
const { fees } = useSelector(selectPositionSellerFees);
@@ -49,7 +51,20 @@ export function PositionSellerPriceImpactFeesRow() {
return (
+ Net price impact is the sum of the stored impact at increase and the impact at decrease action, which is
+ only settled on position decrease.{" "}
+
+ Read more
+
+
+ }
+ />
+ }
value={
<>
0;
+ const totalPriceImpactPercentage =
+ (fees?.positionPriceImpact?.precisePercentage ?? 0n) + (fees?.priceImpactDiff?.precisePercentage ?? 0n);
+
+ const formattedPriceImpactPercentage =
+ totalPriceImpactPercentage === undefined
+ ? "..."
+ : formatPercentage(totalPriceImpactPercentage, {
+ bps: false,
+ signed: true,
+ displayDecimals: 3,
+ });
+
+ const isPriceImpactPositive = totalPriceImpactPercentage !== undefined && totalPriceImpactPercentage > 0;
const rebateIsApplicable =
fees?.positionFee?.deltaUsd !== undefined && fees.positionFee.deltaUsd <= 0 && feesType !== "swap";
@@ -75,9 +90,49 @@ export function PriceImpactFeesRow() {
};
}, [feesPercentage, feesType, userReferralInfo, rebateIsApplicable, estimatedRebatesPercentage]);
+ if (isTrigger) {
+ return (
+
+ Net price impact is the sum of the stored impact at increase and the impact at decrease action, which is
+ only settled on position decrease.{" "}
+
+ Read more
+
+
+ }
+ />
+ }
+ value={
+ <>
+
+ {formattedPriceImpactPercentage}
+ {" "}
+ /{" "}
+
+ {formattedTotalFeePercentage}
+
+ >
+ }
+ />
+ );
+ }
+
return (
{
- if (p.positionPriceImpact?.deltaUsd === undefined || p.positionPriceImpact.deltaUsd === 0n) {
- return null;
- }
-
- return (
-
- Net price impact is the sum of the stored impact at increase and the impact at decrease action, which is only
- settled on position decrease.{" "}
-
- Read more
-
-
- );
- }, [p.positionPriceImpact?.deltaUsd]);
-
const priceImpactRebatesInfo = useMemo(() => {
if (p.priceImpactDiff?.deltaUsd === undefined || p.priceImpactDiff.deltaUsd === 0n) {
return null;
@@ -574,12 +558,6 @@ export function TradeFeesRow(p: Props) {
{incentivesBottomText}
)}
- {netPriceImpactInfo && (
-
-
- {netPriceImpactInfo}
-
- )}
{priceImpactRebatesInfo && (
@@ -597,15 +575,7 @@ export function TradeFeesRow(p: Props) {
/>
);
}
- }, [
- totalFeeUsd,
- feeRows,
- incentivesBottomText,
- shouldShowWarning,
- netPriceImpactInfo,
- priceImpactRebatesInfo,
- swapRouteMsg,
- ]);
+ }, [totalFeeUsd, feeRows, incentivesBottomText, shouldShowWarning, priceImpactRebatesInfo, swapRouteMsg]);
return
;
}
diff --git a/src/locales/de/messages.po b/src/locales/de/messages.po
index 1175019107..3479969986 100644
--- a/src/locales/de/messages.po
+++ b/src/locales/de/messages.po
@@ -305,7 +305,6 @@ msgstr ""
#: src/components/Glp/GlpSwap.jsx
#: src/components/Synthetics/OrderEditor/OrderEditor.tsx
#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
-#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
#: src/pages/Dashboard/StatsCard.tsx
msgid "Fees"
@@ -5225,7 +5224,8 @@ msgstr ""
msgid "GMX Announcements"
msgstr ""
-#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+#: src/components/Synthetics/PositionSeller/rows/PositionSellerPriceImpactFeesRow.tsx
+#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
msgid "Net price impact is the sum of the stored impact at increase and the impact at decrease action, which is only settled on position decrease. <0>Read more0>"
msgstr ""
@@ -8458,6 +8458,7 @@ msgid "Claim funds"
msgstr ""
#: src/components/Synthetics/PositionSeller/rows/PositionSellerPriceImpactFeesRow.tsx
+#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
msgid "Net Price Impact / Fees"
msgstr ""
diff --git a/src/locales/en/messages.po b/src/locales/en/messages.po
index 04932e4509..26eb1642b3 100644
--- a/src/locales/en/messages.po
+++ b/src/locales/en/messages.po
@@ -305,7 +305,6 @@ msgstr "No incentives distribution history yet."
#: src/components/Glp/GlpSwap.jsx
#: src/components/Synthetics/OrderEditor/OrderEditor.tsx
#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
-#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
#: src/pages/Dashboard/StatsCard.tsx
msgid "Fees"
@@ -5228,7 +5227,8 @@ msgstr "One-Click Settings"
msgid "GMX Announcements"
msgstr "GMX Announcements"
-#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+#: src/components/Synthetics/PositionSeller/rows/PositionSellerPriceImpactFeesRow.tsx
+#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
msgid "Net price impact is the sum of the stored impact at increase and the impact at decrease action, which is only settled on position decrease. <0>Read more0>"
msgstr "Net price impact is the sum of the stored impact at increase and the impact at decrease action, which is only settled on position decrease. <0>Read more0>"
@@ -8464,6 +8464,7 @@ msgid "Claim funds"
msgstr "Claim funds"
#: src/components/Synthetics/PositionSeller/rows/PositionSellerPriceImpactFeesRow.tsx
+#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
msgid "Net Price Impact / Fees"
msgstr "Net Price Impact / Fees"
diff --git a/src/locales/es/messages.po b/src/locales/es/messages.po
index 5625358e37..f233df5f80 100644
--- a/src/locales/es/messages.po
+++ b/src/locales/es/messages.po
@@ -305,7 +305,6 @@ msgstr ""
#: src/components/Glp/GlpSwap.jsx
#: src/components/Synthetics/OrderEditor/OrderEditor.tsx
#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
-#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
#: src/pages/Dashboard/StatsCard.tsx
msgid "Fees"
@@ -5225,7 +5224,8 @@ msgstr ""
msgid "GMX Announcements"
msgstr ""
-#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+#: src/components/Synthetics/PositionSeller/rows/PositionSellerPriceImpactFeesRow.tsx
+#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
msgid "Net price impact is the sum of the stored impact at increase and the impact at decrease action, which is only settled on position decrease. <0>Read more0>"
msgstr ""
@@ -8458,6 +8458,7 @@ msgid "Claim funds"
msgstr ""
#: src/components/Synthetics/PositionSeller/rows/PositionSellerPriceImpactFeesRow.tsx
+#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
msgid "Net Price Impact / Fees"
msgstr ""
diff --git a/src/locales/fr/messages.po b/src/locales/fr/messages.po
index 8e63d04f25..2470d607c3 100644
--- a/src/locales/fr/messages.po
+++ b/src/locales/fr/messages.po
@@ -305,7 +305,6 @@ msgstr ""
#: src/components/Glp/GlpSwap.jsx
#: src/components/Synthetics/OrderEditor/OrderEditor.tsx
#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
-#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
#: src/pages/Dashboard/StatsCard.tsx
msgid "Fees"
@@ -5225,7 +5224,8 @@ msgstr ""
msgid "GMX Announcements"
msgstr ""
-#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+#: src/components/Synthetics/PositionSeller/rows/PositionSellerPriceImpactFeesRow.tsx
+#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
msgid "Net price impact is the sum of the stored impact at increase and the impact at decrease action, which is only settled on position decrease. <0>Read more0>"
msgstr ""
@@ -8458,6 +8458,7 @@ msgid "Claim funds"
msgstr ""
#: src/components/Synthetics/PositionSeller/rows/PositionSellerPriceImpactFeesRow.tsx
+#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
msgid "Net Price Impact / Fees"
msgstr ""
diff --git a/src/locales/ja/messages.po b/src/locales/ja/messages.po
index 3fefb42e54..4bbfc8db4c 100644
--- a/src/locales/ja/messages.po
+++ b/src/locales/ja/messages.po
@@ -305,7 +305,6 @@ msgstr ""
#: src/components/Glp/GlpSwap.jsx
#: src/components/Synthetics/OrderEditor/OrderEditor.tsx
#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
-#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
#: src/pages/Dashboard/StatsCard.tsx
msgid "Fees"
@@ -5225,7 +5224,8 @@ msgstr ""
msgid "GMX Announcements"
msgstr ""
-#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+#: src/components/Synthetics/PositionSeller/rows/PositionSellerPriceImpactFeesRow.tsx
+#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
msgid "Net price impact is the sum of the stored impact at increase and the impact at decrease action, which is only settled on position decrease. <0>Read more0>"
msgstr ""
@@ -8458,6 +8458,7 @@ msgid "Claim funds"
msgstr ""
#: src/components/Synthetics/PositionSeller/rows/PositionSellerPriceImpactFeesRow.tsx
+#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
msgid "Net Price Impact / Fees"
msgstr ""
diff --git a/src/locales/ko/messages.po b/src/locales/ko/messages.po
index 2052134bb4..127e196dcb 100644
--- a/src/locales/ko/messages.po
+++ b/src/locales/ko/messages.po
@@ -305,7 +305,6 @@ msgstr ""
#: src/components/Glp/GlpSwap.jsx
#: src/components/Synthetics/OrderEditor/OrderEditor.tsx
#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
-#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
#: src/pages/Dashboard/StatsCard.tsx
msgid "Fees"
@@ -5225,7 +5224,8 @@ msgstr ""
msgid "GMX Announcements"
msgstr ""
-#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+#: src/components/Synthetics/PositionSeller/rows/PositionSellerPriceImpactFeesRow.tsx
+#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
msgid "Net price impact is the sum of the stored impact at increase and the impact at decrease action, which is only settled on position decrease. <0>Read more0>"
msgstr ""
@@ -8458,6 +8458,7 @@ msgid "Claim funds"
msgstr ""
#: src/components/Synthetics/PositionSeller/rows/PositionSellerPriceImpactFeesRow.tsx
+#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
msgid "Net Price Impact / Fees"
msgstr ""
diff --git a/src/locales/pseudo/messages.po b/src/locales/pseudo/messages.po
index ae03f99753..fab7fe6024 100644
--- a/src/locales/pseudo/messages.po
+++ b/src/locales/pseudo/messages.po
@@ -305,7 +305,6 @@ msgstr ""
#: src/components/Glp/GlpSwap.jsx
#: src/components/Synthetics/OrderEditor/OrderEditor.tsx
#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
-#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
#: src/pages/Dashboard/StatsCard.tsx
msgid "Fees"
@@ -5225,7 +5224,8 @@ msgstr ""
msgid "GMX Announcements"
msgstr ""
-#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+#: src/components/Synthetics/PositionSeller/rows/PositionSellerPriceImpactFeesRow.tsx
+#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
msgid "Net price impact is the sum of the stored impact at increase and the impact at decrease action, which is only settled on position decrease. <0>Read more0>"
msgstr ""
@@ -8458,6 +8458,7 @@ msgid "Claim funds"
msgstr ""
#: src/components/Synthetics/PositionSeller/rows/PositionSellerPriceImpactFeesRow.tsx
+#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
msgid "Net Price Impact / Fees"
msgstr ""
diff --git a/src/locales/ru/messages.po b/src/locales/ru/messages.po
index f17f71d172..dc74cabb51 100644
--- a/src/locales/ru/messages.po
+++ b/src/locales/ru/messages.po
@@ -305,7 +305,6 @@ msgstr ""
#: src/components/Glp/GlpSwap.jsx
#: src/components/Synthetics/OrderEditor/OrderEditor.tsx
#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
-#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
#: src/pages/Dashboard/StatsCard.tsx
msgid "Fees"
@@ -5225,7 +5224,8 @@ msgstr ""
msgid "GMX Announcements"
msgstr ""
-#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+#: src/components/Synthetics/PositionSeller/rows/PositionSellerPriceImpactFeesRow.tsx
+#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
msgid "Net price impact is the sum of the stored impact at increase and the impact at decrease action, which is only settled on position decrease. <0>Read more0>"
msgstr ""
@@ -8458,6 +8458,7 @@ msgid "Claim funds"
msgstr ""
#: src/components/Synthetics/PositionSeller/rows/PositionSellerPriceImpactFeesRow.tsx
+#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
msgid "Net Price Impact / Fees"
msgstr ""
diff --git a/src/locales/zh/messages.po b/src/locales/zh/messages.po
index dd13658532..f950949a4d 100644
--- a/src/locales/zh/messages.po
+++ b/src/locales/zh/messages.po
@@ -305,7 +305,6 @@ msgstr ""
#: src/components/Glp/GlpSwap.jsx
#: src/components/Synthetics/OrderEditor/OrderEditor.tsx
#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
-#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
#: src/pages/Dashboard/StatsCard.tsx
msgid "Fees"
@@ -5225,7 +5224,8 @@ msgstr ""
msgid "GMX Announcements"
msgstr ""
-#: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx
+#: src/components/Synthetics/PositionSeller/rows/PositionSellerPriceImpactFeesRow.tsx
+#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
msgid "Net price impact is the sum of the stored impact at increase and the impact at decrease action, which is only settled on position decrease. <0>Read more0>"
msgstr ""
@@ -8458,6 +8458,7 @@ msgid "Claim funds"
msgstr ""
#: src/components/Synthetics/PositionSeller/rows/PositionSellerPriceImpactFeesRow.tsx
+#: src/components/Synthetics/TradeBox/TradeBoxRows/PriceImpactFeesRow.tsx
msgid "Net Price Impact / Fees"
msgstr ""
From 67f0fe72c7488f81eb638e9ffe55f53863cf1cec Mon Sep 17 00:00:00 2001
From: Divhead <110596516+divhead@users.noreply.github.com>
Date: Sun, 24 Aug 2025 20:35:18 -0700
Subject: [PATCH 39/55] leverage with pnl
---
.../synthetics/positions/usePositionsInfo.ts | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/src/domain/synthetics/positions/usePositionsInfo.ts b/src/domain/synthetics/positions/usePositionsInfo.ts
index e1b72ea597..5f8e78d64e 100644
--- a/src/domain/synthetics/positions/usePositionsInfo.ts
+++ b/src/domain/synthetics/positions/usePositionsInfo.ts
@@ -1,7 +1,7 @@
import { useMemo } from "react";
import { useUserReferralInfoRequest } from "domain/referrals";
-import { getBasisPoints } from "lib/numbers";
+import { BASIS_POINTS_DIVISOR_BIGINT, getBasisPoints } from "lib/numbers";
import { getByKey } from "lib/objects";
import useWallet from "lib/wallets/useWallet";
import { ContractsChainId } from "sdk/configs/chains";
@@ -26,6 +26,7 @@ import { getAcceptablePriceInfo, getMarkPrice } from "../trade";
import { PositionsData, PositionsInfoData } from "./types";
import { usePositionsConstantsRequest } from "./usePositionsConstants";
import { getLeverage, getLiquidationPrice, getPositionNetValue, getPositionPendingFeesUsd } from "./utils";
+import { bigMath } from "sdk/utils/bigmath";
export type PositionsInfoResult = {
positionsInfoData?: PositionsInfoData;
@@ -210,13 +211,10 @@ export function usePositionsInfoRequest(
pendingFundingFeesUsd: pendingFundingFeesUsd,
});
- const leverageWithPnl = getLeverage({
- sizeInUsd: position.sizeInUsd,
- collateralUsd: collateralUsd,
- pnl,
- pendingBorrowingFeesUsd: position.pendingBorrowingFeesUsd,
- pendingFundingFeesUsd: pendingFundingFeesUsd,
- });
+ const leverageWithPnl =
+ netValue !== undefined && netValue !== 0n
+ ? bigMath.mulDiv(position.sizeInUsd, BASIS_POINTS_DIVISOR_BIGINT, netValue)
+ : leverage;
const maxAllowedLeverage = marketInfo
? getMaxAllowedLeverageByMinCollateralFactor(marketInfo.minCollateralFactor)
From e0a76421fb9f9f0551a681a6565a5cbc9dac4e4f Mon Sep 17 00:00:00 2001
From: Divhead <110596516+divhead@users.noreply.github.com>
Date: Sun, 24 Aug 2025 20:35:37 -0700
Subject: [PATCH 40/55] leverage with pnl
---
src/domain/synthetics/positions/usePositionsInfo.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/domain/synthetics/positions/usePositionsInfo.ts b/src/domain/synthetics/positions/usePositionsInfo.ts
index 5f8e78d64e..64572e0568 100644
--- a/src/domain/synthetics/positions/usePositionsInfo.ts
+++ b/src/domain/synthetics/positions/usePositionsInfo.ts
@@ -13,6 +13,7 @@ import {
getPositionPnlUsd,
} from "sdk/utils/positions";
+import { bigMath } from "sdk/utils/bigmath";
import useUiFeeFactorRequest from "../fees/utils/useUiFeeFactor";
import {
MarketsData,
@@ -26,7 +27,6 @@ import { getAcceptablePriceInfo, getMarkPrice } from "../trade";
import { PositionsData, PositionsInfoData } from "./types";
import { usePositionsConstantsRequest } from "./usePositionsConstants";
import { getLeverage, getLiquidationPrice, getPositionNetValue, getPositionPendingFeesUsd } from "./utils";
-import { bigMath } from "sdk/utils/bigmath";
export type PositionsInfoResult = {
positionsInfoData?: PositionsInfoData;
From 06f90f10a89483bba039a77cc0823e0f7138692d Mon Sep 17 00:00:00 2001
From: Divhead <110596516+divhead@users.noreply.github.com>
Date: Mon, 25 Aug 2025 03:41:13 -0700
Subject: [PATCH 41/55] add squid types
---
sdk/src/types/subsquid.ts | 14660 +++++++++-------
sdk/src/utils/tradeHistory.ts | 4 +-
sdk/subsquid-codegen.ts | 2 +-
src/typechain-types/ArbitrumNodeInterface.ts | 189 +-
src/typechain-types/ClaimHandler.ts | 193 +-
src/typechain-types/CustomErrors.ts | 38 +-
src/typechain-types/DataStore.ts | 1216 +-
src/typechain-types/ERC20PermitInterface.ts | 84 +-
src/typechain-types/ERC721.ts | 327 +-
src/typechain-types/EventEmitter.ts | 246 +-
src/typechain-types/ExchangeRouter.ts | 612 +-
src/typechain-types/GMT.ts | 421 +-
src/typechain-types/GelatoRelayRouter.ts | 289 +-
src/typechain-types/GlpManager.ts | 339 +-
src/typechain-types/GlvReader.ts | 302 +-
src/typechain-types/GlvRouter.ts | 288 +-
src/typechain-types/GmxMigrator.ts | 390 +-
src/typechain-types/GovToken.ts | 461 +-
src/typechain-types/LayerZeroProvider.ts | 146 +-
src/typechain-types/MintableBaseToken.ts | 528 +-
src/typechain-types/Multicall.ts | 245 +-
src/typechain-types/MultichainClaimsRouter.ts | 263 +-
src/typechain-types/MultichainGlvRouter.ts | 286 +-
src/typechain-types/MultichainGmRouter.ts | 350 +-
src/typechain-types/MultichainOrderRouter.ts | 323 +-
.../MultichainSubaccountRouter.ts | 308 +-
.../MultichainTransferRouter.ts | 324 +-
src/typechain-types/MultichainUtils.ts | 82 +-
src/typechain-types/MultichainVault.ts | 136 +-
src/typechain-types/OrderBook.ts | 756 +-
src/typechain-types/OrderBookReader.ts | 92 +-
src/typechain-types/OrderExecutor.ts | 93 +-
src/typechain-types/PositionManager.ts | 699 +-
src/typechain-types/PositionRouter.ts | 1019 +-
src/typechain-types/Reader.ts | 252 +-
src/typechain-types/ReaderV2.ts | 446 +-
src/typechain-types/ReferralStorage.ts | 401 +-
src/typechain-types/RelayParams.ts | 38 +-
src/typechain-types/RewardReader.ts | 90 +-
src/typechain-types/RewardRouter.ts | 740 +-
src/typechain-types/RewardTracker.ts | 738 +-
src/typechain-types/Router.ts | 350 +-
src/typechain-types/RouterV2.ts | 350 +-
src/typechain-types/StBTC.ts | 739 +-
src/typechain-types/SubaccountApproval.ts | 38 +-
.../SubaccountGelatoRelayRouter.ts | 292 +-
src/typechain-types/SubaccountRouter.ts | 298 +-
src/typechain-types/SyntheticsReader.ts | 604 +-
src/typechain-types/SyntheticsRouter.ts | 49 +-
src/typechain-types/Timelock.ts | 1193 +-
src/typechain-types/Token.ts | 244 +-
src/typechain-types/Treasury.ts | 371 +-
src/typechain-types/UniPool.ts | 61 +-
src/typechain-types/UniswapV2.ts | 446 +-
src/typechain-types/Vault.ts | 2002 ++-
src/typechain-types/VaultReader.ts | 44 +-
src/typechain-types/VaultV2.ts | 1888 +-
src/typechain-types/VaultV2b.ts | 2002 ++-
src/typechain-types/Vester.ts | 791 +-
src/typechain-types/WETH.ts | 211 +-
src/typechain-types/YieldFarm.ts | 433 +-
src/typechain-types/YieldToken.ts | 406 +-
src/typechain-types/common.ts | 91 +-
.../ArbitrumNodeInterface__factory.ts | 16 +-
.../factories/ClaimHandler__factory.ts | 5 +-
.../factories/CustomErrors__factory.ts | 5 +-
.../ERC20PermitInterface__factory.ts | 16 +-
.../factories/EventEmitter__factory.ts | 5 +-
.../factories/ExchangeRouter__factory.ts | 16 +-
.../factories/GelatoRelayRouter__factory.ts | 13 +-
.../factories/GlvRouter__factory.ts | 6 +-
.../factories/LayerZeroProvider__factory.ts | 10 +-
.../factories/MintableBaseToken__factory.ts | 10 +-
.../MultichainClaimsRouter__factory.ts | 11 +-
.../factories/MultichainGlvRouter__factory.ts | 23 +-
.../factories/MultichainGmRouter__factory.ts | 14 +-
.../MultichainOrderRouter__factory.ts | 20 +-
.../MultichainSubaccountRouter__factory.ts | 14 +-
.../MultichainTransferRouter__factory.ts | 11 +-
.../factories/MultichainUtils__factory.ts | 10 +-
.../factories/MultichainVault__factory.ts | 10 +-
.../factories/OrderBookReader__factory.ts | 10 +-
.../factories/OrderExecutor__factory.ts | 5 +-
.../factories/PositionManager__factory.ts | 10 +-
.../factories/PositionRouter__factory.ts | 10 +-
.../factories/ReferralStorage__factory.ts | 10 +-
.../factories/RewardReader__factory.ts | 5 +-
.../factories/RewardRouter__factory.ts | 5 +-
.../factories/RewardTracker__factory.ts | 5 +-
.../factories/SubaccountApproval__factory.ts | 10 +-
.../SubaccountGelatoRelayRouter__factory.ts | 19 +-
.../factories/SubaccountRouter__factory.ts | 10 +-
.../factories/SyntheticsReader__factory.ts | 43 +-
.../factories/SyntheticsRouter__factory.ts | 10 +-
94 files changed, 29310 insertions(+), 12376 deletions(-)
diff --git a/sdk/src/types/subsquid.ts b/sdk/src/types/subsquid.ts
index 40440c5e9a..a74d7baf20 100644
--- a/sdk/src/types/subsquid.ts
+++ b/sdk/src/types/subsquid.ts
@@ -4,6024 +4,7070 @@ export type Exact
= { [K in keyof T]: T[K]
export type MakeOptional = Omit & { [SubKey in K]?: Maybe };
export type MakeMaybe = Omit & { [SubKey in K]: Maybe };
export type MakeEmpty = { [_ in K]?: never };
-export type Incremental = T | { [P in keyof T]?: P extends " $fragmentName" | "__typename" ? T[P] : never };
+export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };
/** All built-in and custom scalars, mapped to their actual values */
export interface Scalars {
- ID: { input: string; output: string };
- String: { input: string; output: string };
- Boolean: { input: boolean; output: boolean };
- Int: { input: number; output: number };
- Float: { input: number; output: number };
- BigInt: { input: number; output: string };
+ ID: { input: string; output: string; }
+ String: { input: string; output: string; }
+ Boolean: { input: boolean; output: boolean; }
+ Int: { input: number; output: number; }
+ Float: { input: number; output: number; }
+ BigInt: { input: number; output: string; }
}
export interface AccountPnlHistoryPointObject {
- __typename?: "AccountPnlHistoryPointObject";
- account: Scalars["String"]["output"];
- cumulativePnl: Scalars["BigInt"]["output"];
+ __typename?: 'AccountPnlHistoryPointObject';
+ account: Scalars['String']['output'];
+ cumulativePnl: Scalars['BigInt']['output'];
/** Field for debug */
- cumulativeRealizedFees: Scalars["BigInt"]["output"];
+ cumulativeRealizedFees: Scalars['BigInt']['output'];
/** Field for debug */
- cumulativeRealizedPnl: Scalars["BigInt"]["output"];
+ cumulativeRealizedPnl: Scalars['BigInt']['output'];
/** Field for debug */
- cumulativeRealizedPriceImpact: Scalars["BigInt"]["output"];
- pnl: Scalars["BigInt"]["output"];
+ cumulativeRealizedPriceImpact: Scalars['BigInt']['output'];
+ pnl: Scalars['BigInt']['output'];
/** Field for debug */
- realizedFees: Scalars["BigInt"]["output"];
+ realizedFees: Scalars['BigInt']['output'];
/** Field for debug */
- realizedPnl: Scalars["BigInt"]["output"];
+ realizedPnl: Scalars['BigInt']['output'];
/** Field for debug */
- realizedPriceImpact: Scalars["BigInt"]["output"];
+ realizedPriceImpact: Scalars['BigInt']['output'];
/** Field for debug */
- startUnrealizedFees: Scalars["BigInt"]["output"];
+ startUnrealizedFees: Scalars['BigInt']['output'];
/** Field for debug */
- startUnrealizedPnl: Scalars["BigInt"]["output"];
- timestamp: Scalars["Int"]["output"];
+ startUnrealizedPnl: Scalars['BigInt']['output'];
+ timestamp: Scalars['Int']['output'];
/** Field for debug */
- unrealizedFees: Scalars["BigInt"]["output"];
+ unrealizedFees: Scalars['BigInt']['output'];
/** Field for debug */
- unrealizedPnl: Scalars["BigInt"]["output"];
+ unrealizedPnl: Scalars['BigInt']['output'];
}
export interface AccountPnlSummaryBucketObject {
- __typename?: "AccountPnlSummaryBucketObject";
- bucketLabel: Scalars["String"]["output"];
- losses: Scalars["Int"]["output"];
- pnlBps: Scalars["BigInt"]["output"];
- pnlUsd: Scalars["BigInt"]["output"];
+ __typename?: 'AccountPnlSummaryBucketObject';
+ bucketLabel: Scalars['String']['output'];
+ losses: Scalars['Int']['output'];
+ pnlBps: Scalars['BigInt']['output'];
+ pnlUsd: Scalars['BigInt']['output'];
/** Field for debug */
- realizedBasePnlUsd: Scalars["BigInt"]["output"];
+ realizedBasePnlUsd: Scalars['BigInt']['output'];
/** Field for debug */
- realizedFeesUsd: Scalars["BigInt"]["output"];
- realizedPnlUsd: Scalars["BigInt"]["output"];
+ realizedFeesUsd: Scalars['BigInt']['output'];
+ realizedPnlUsd: Scalars['BigInt']['output'];
/** Field for debug */
- realizedPriceImpactUsd: Scalars["BigInt"]["output"];
+ realizedPriceImpactUsd: Scalars['BigInt']['output'];
/** Field for debug */
- startUnrealizedBasePnlUsd: Scalars["BigInt"]["output"];
+ startUnrealizedBasePnlUsd: Scalars['BigInt']['output'];
/** Field for debug */
- startUnrealizedFeesUsd: Scalars["BigInt"]["output"];
- startUnrealizedPnlUsd: Scalars["BigInt"]["output"];
+ startUnrealizedFeesUsd: Scalars['BigInt']['output'];
+ startUnrealizedPnlUsd: Scalars['BigInt']['output'];
/** Field for debug */
- unrealizedBasePnlUsd: Scalars["BigInt"]["output"];
+ unrealizedBasePnlUsd: Scalars['BigInt']['output'];
/** Field for debug */
- unrealizedFeesUsd: Scalars["BigInt"]["output"];
- unrealizedPnlUsd: Scalars["BigInt"]["output"];
- usedCapitalUsd: Scalars["BigInt"]["output"];
- volume: Scalars["BigInt"]["output"];
- wins: Scalars["Int"]["output"];
+ unrealizedFeesUsd: Scalars['BigInt']['output'];
+ unrealizedPnlUsd: Scalars['BigInt']['output'];
+ usedCapitalUsd: Scalars['BigInt']['output'];
+ volume: Scalars['BigInt']['output'];
+ wins: Scalars['Int']['output'];
/** Null when no losses and no wins */
- winsLossesRatioBps?: Maybe;
+ winsLossesRatioBps?: Maybe;
}
export interface AccountStat {
- __typename?: "AccountStat";
- closedCount: Scalars["Int"]["output"];
- cumsumCollateral: Scalars["BigInt"]["output"];
- cumsumSize: Scalars["BigInt"]["output"];
- id: Scalars["String"]["output"];
- losses: Scalars["Int"]["output"];
- maxCapital: Scalars["BigInt"]["output"];
- netCapital: Scalars["BigInt"]["output"];
+ __typename?: 'AccountStat';
+ closedCount: Scalars['Int']['output'];
+ cumsumCollateral: Scalars['BigInt']['output'];
+ cumsumSize: Scalars['BigInt']['output'];
+ id: Scalars['String']['output'];
+ losses: Scalars['Int']['output'];
+ maxCapital: Scalars['BigInt']['output'];
+ netCapital: Scalars['BigInt']['output'];
positions: Array;
- realizedFees: Scalars["BigInt"]["output"];
- realizedPnl: Scalars["BigInt"]["output"];
- realizedPriceImpact: Scalars["BigInt"]["output"];
- sumMaxSize: Scalars["BigInt"]["output"];
- volume: Scalars["BigInt"]["output"];
- wins: Scalars["Int"]["output"];
+ realizedFees: Scalars['BigInt']['output'];
+ realizedPnl: Scalars['BigInt']['output'];
+ realizedPriceImpact: Scalars['BigInt']['output'];
+ sumMaxSize: Scalars['BigInt']['output'];
+ volume: Scalars['BigInt']['output'];
+ wins: Scalars['Int']['output'];
}
+
export interface AccountStatpositionsArgs {
- limit?: InputMaybe;
- offset?: InputMaybe;
+ limit?: InputMaybe;
+ offset?: InputMaybe;
orderBy?: InputMaybe>;
where?: InputMaybe;
}
export interface AccountStatEdge {
- __typename?: "AccountStatEdge";
- cursor: Scalars["String"]["output"];
+ __typename?: 'AccountStatEdge';
+ cursor: Scalars['String']['output'];
node: AccountStat;
}
export enum AccountStatOrderByInput {
- closedCount_ASC = "closedCount_ASC",
- closedCount_ASC_NULLS_FIRST = "closedCount_ASC_NULLS_FIRST",
- closedCount_ASC_NULLS_LAST = "closedCount_ASC_NULLS_LAST",
- closedCount_DESC = "closedCount_DESC",
- closedCount_DESC_NULLS_FIRST = "closedCount_DESC_NULLS_FIRST",
- closedCount_DESC_NULLS_LAST = "closedCount_DESC_NULLS_LAST",
- cumsumCollateral_ASC = "cumsumCollateral_ASC",
- cumsumCollateral_ASC_NULLS_FIRST = "cumsumCollateral_ASC_NULLS_FIRST",
- cumsumCollateral_ASC_NULLS_LAST = "cumsumCollateral_ASC_NULLS_LAST",
- cumsumCollateral_DESC = "cumsumCollateral_DESC",
- cumsumCollateral_DESC_NULLS_FIRST = "cumsumCollateral_DESC_NULLS_FIRST",
- cumsumCollateral_DESC_NULLS_LAST = "cumsumCollateral_DESC_NULLS_LAST",
- cumsumSize_ASC = "cumsumSize_ASC",
- cumsumSize_ASC_NULLS_FIRST = "cumsumSize_ASC_NULLS_FIRST",
- cumsumSize_ASC_NULLS_LAST = "cumsumSize_ASC_NULLS_LAST",
- cumsumSize_DESC = "cumsumSize_DESC",
- cumsumSize_DESC_NULLS_FIRST = "cumsumSize_DESC_NULLS_FIRST",
- cumsumSize_DESC_NULLS_LAST = "cumsumSize_DESC_NULLS_LAST",
- id_ASC = "id_ASC",
- id_ASC_NULLS_FIRST = "id_ASC_NULLS_FIRST",
- id_ASC_NULLS_LAST = "id_ASC_NULLS_LAST",
- id_DESC = "id_DESC",
- id_DESC_NULLS_FIRST = "id_DESC_NULLS_FIRST",
- id_DESC_NULLS_LAST = "id_DESC_NULLS_LAST",
- losses_ASC = "losses_ASC",
- losses_ASC_NULLS_FIRST = "losses_ASC_NULLS_FIRST",
- losses_ASC_NULLS_LAST = "losses_ASC_NULLS_LAST",
- losses_DESC = "losses_DESC",
- losses_DESC_NULLS_FIRST = "losses_DESC_NULLS_FIRST",
- losses_DESC_NULLS_LAST = "losses_DESC_NULLS_LAST",
- maxCapital_ASC = "maxCapital_ASC",
- maxCapital_ASC_NULLS_FIRST = "maxCapital_ASC_NULLS_FIRST",
- maxCapital_ASC_NULLS_LAST = "maxCapital_ASC_NULLS_LAST",
- maxCapital_DESC = "maxCapital_DESC",
- maxCapital_DESC_NULLS_FIRST = "maxCapital_DESC_NULLS_FIRST",
- maxCapital_DESC_NULLS_LAST = "maxCapital_DESC_NULLS_LAST",
- netCapital_ASC = "netCapital_ASC",
- netCapital_ASC_NULLS_FIRST = "netCapital_ASC_NULLS_FIRST",
- netCapital_ASC_NULLS_LAST = "netCapital_ASC_NULLS_LAST",
- netCapital_DESC = "netCapital_DESC",
- netCapital_DESC_NULLS_FIRST = "netCapital_DESC_NULLS_FIRST",
- netCapital_DESC_NULLS_LAST = "netCapital_DESC_NULLS_LAST",
- realizedFees_ASC = "realizedFees_ASC",
- realizedFees_ASC_NULLS_FIRST = "realizedFees_ASC_NULLS_FIRST",
- realizedFees_ASC_NULLS_LAST = "realizedFees_ASC_NULLS_LAST",
- realizedFees_DESC = "realizedFees_DESC",
- realizedFees_DESC_NULLS_FIRST = "realizedFees_DESC_NULLS_FIRST",
- realizedFees_DESC_NULLS_LAST = "realizedFees_DESC_NULLS_LAST",
- realizedPnl_ASC = "realizedPnl_ASC",
- realizedPnl_ASC_NULLS_FIRST = "realizedPnl_ASC_NULLS_FIRST",
- realizedPnl_ASC_NULLS_LAST = "realizedPnl_ASC_NULLS_LAST",
- realizedPnl_DESC = "realizedPnl_DESC",
- realizedPnl_DESC_NULLS_FIRST = "realizedPnl_DESC_NULLS_FIRST",
- realizedPnl_DESC_NULLS_LAST = "realizedPnl_DESC_NULLS_LAST",
- realizedPriceImpact_ASC = "realizedPriceImpact_ASC",
- realizedPriceImpact_ASC_NULLS_FIRST = "realizedPriceImpact_ASC_NULLS_FIRST",
- realizedPriceImpact_ASC_NULLS_LAST = "realizedPriceImpact_ASC_NULLS_LAST",
- realizedPriceImpact_DESC = "realizedPriceImpact_DESC",
- realizedPriceImpact_DESC_NULLS_FIRST = "realizedPriceImpact_DESC_NULLS_FIRST",
- realizedPriceImpact_DESC_NULLS_LAST = "realizedPriceImpact_DESC_NULLS_LAST",
- sumMaxSize_ASC = "sumMaxSize_ASC",
- sumMaxSize_ASC_NULLS_FIRST = "sumMaxSize_ASC_NULLS_FIRST",
- sumMaxSize_ASC_NULLS_LAST = "sumMaxSize_ASC_NULLS_LAST",
- sumMaxSize_DESC = "sumMaxSize_DESC",
- sumMaxSize_DESC_NULLS_FIRST = "sumMaxSize_DESC_NULLS_FIRST",
- sumMaxSize_DESC_NULLS_LAST = "sumMaxSize_DESC_NULLS_LAST",
- volume_ASC = "volume_ASC",
- volume_ASC_NULLS_FIRST = "volume_ASC_NULLS_FIRST",
- volume_ASC_NULLS_LAST = "volume_ASC_NULLS_LAST",
- volume_DESC = "volume_DESC",
- volume_DESC_NULLS_FIRST = "volume_DESC_NULLS_FIRST",
- volume_DESC_NULLS_LAST = "volume_DESC_NULLS_LAST",
- wins_ASC = "wins_ASC",
- wins_ASC_NULLS_FIRST = "wins_ASC_NULLS_FIRST",
- wins_ASC_NULLS_LAST = "wins_ASC_NULLS_LAST",
- wins_DESC = "wins_DESC",
- wins_DESC_NULLS_FIRST = "wins_DESC_NULLS_FIRST",
- wins_DESC_NULLS_LAST = "wins_DESC_NULLS_LAST",
+ closedCount_ASC = 'closedCount_ASC',
+ closedCount_ASC_NULLS_FIRST = 'closedCount_ASC_NULLS_FIRST',
+ closedCount_ASC_NULLS_LAST = 'closedCount_ASC_NULLS_LAST',
+ closedCount_DESC = 'closedCount_DESC',
+ closedCount_DESC_NULLS_FIRST = 'closedCount_DESC_NULLS_FIRST',
+ closedCount_DESC_NULLS_LAST = 'closedCount_DESC_NULLS_LAST',
+ cumsumCollateral_ASC = 'cumsumCollateral_ASC',
+ cumsumCollateral_ASC_NULLS_FIRST = 'cumsumCollateral_ASC_NULLS_FIRST',
+ cumsumCollateral_ASC_NULLS_LAST = 'cumsumCollateral_ASC_NULLS_LAST',
+ cumsumCollateral_DESC = 'cumsumCollateral_DESC',
+ cumsumCollateral_DESC_NULLS_FIRST = 'cumsumCollateral_DESC_NULLS_FIRST',
+ cumsumCollateral_DESC_NULLS_LAST = 'cumsumCollateral_DESC_NULLS_LAST',
+ cumsumSize_ASC = 'cumsumSize_ASC',
+ cumsumSize_ASC_NULLS_FIRST = 'cumsumSize_ASC_NULLS_FIRST',
+ cumsumSize_ASC_NULLS_LAST = 'cumsumSize_ASC_NULLS_LAST',
+ cumsumSize_DESC = 'cumsumSize_DESC',
+ cumsumSize_DESC_NULLS_FIRST = 'cumsumSize_DESC_NULLS_FIRST',
+ cumsumSize_DESC_NULLS_LAST = 'cumsumSize_DESC_NULLS_LAST',
+ id_ASC = 'id_ASC',
+ id_ASC_NULLS_FIRST = 'id_ASC_NULLS_FIRST',
+ id_ASC_NULLS_LAST = 'id_ASC_NULLS_LAST',
+ id_DESC = 'id_DESC',
+ id_DESC_NULLS_FIRST = 'id_DESC_NULLS_FIRST',
+ id_DESC_NULLS_LAST = 'id_DESC_NULLS_LAST',
+ losses_ASC = 'losses_ASC',
+ losses_ASC_NULLS_FIRST = 'losses_ASC_NULLS_FIRST',
+ losses_ASC_NULLS_LAST = 'losses_ASC_NULLS_LAST',
+ losses_DESC = 'losses_DESC',
+ losses_DESC_NULLS_FIRST = 'losses_DESC_NULLS_FIRST',
+ losses_DESC_NULLS_LAST = 'losses_DESC_NULLS_LAST',
+ maxCapital_ASC = 'maxCapital_ASC',
+ maxCapital_ASC_NULLS_FIRST = 'maxCapital_ASC_NULLS_FIRST',
+ maxCapital_ASC_NULLS_LAST = 'maxCapital_ASC_NULLS_LAST',
+ maxCapital_DESC = 'maxCapital_DESC',
+ maxCapital_DESC_NULLS_FIRST = 'maxCapital_DESC_NULLS_FIRST',
+ maxCapital_DESC_NULLS_LAST = 'maxCapital_DESC_NULLS_LAST',
+ netCapital_ASC = 'netCapital_ASC',
+ netCapital_ASC_NULLS_FIRST = 'netCapital_ASC_NULLS_FIRST',
+ netCapital_ASC_NULLS_LAST = 'netCapital_ASC_NULLS_LAST',
+ netCapital_DESC = 'netCapital_DESC',
+ netCapital_DESC_NULLS_FIRST = 'netCapital_DESC_NULLS_FIRST',
+ netCapital_DESC_NULLS_LAST = 'netCapital_DESC_NULLS_LAST',
+ realizedFees_ASC = 'realizedFees_ASC',
+ realizedFees_ASC_NULLS_FIRST = 'realizedFees_ASC_NULLS_FIRST',
+ realizedFees_ASC_NULLS_LAST = 'realizedFees_ASC_NULLS_LAST',
+ realizedFees_DESC = 'realizedFees_DESC',
+ realizedFees_DESC_NULLS_FIRST = 'realizedFees_DESC_NULLS_FIRST',
+ realizedFees_DESC_NULLS_LAST = 'realizedFees_DESC_NULLS_LAST',
+ realizedPnl_ASC = 'realizedPnl_ASC',
+ realizedPnl_ASC_NULLS_FIRST = 'realizedPnl_ASC_NULLS_FIRST',
+ realizedPnl_ASC_NULLS_LAST = 'realizedPnl_ASC_NULLS_LAST',
+ realizedPnl_DESC = 'realizedPnl_DESC',
+ realizedPnl_DESC_NULLS_FIRST = 'realizedPnl_DESC_NULLS_FIRST',
+ realizedPnl_DESC_NULLS_LAST = 'realizedPnl_DESC_NULLS_LAST',
+ realizedPriceImpact_ASC = 'realizedPriceImpact_ASC',
+ realizedPriceImpact_ASC_NULLS_FIRST = 'realizedPriceImpact_ASC_NULLS_FIRST',
+ realizedPriceImpact_ASC_NULLS_LAST = 'realizedPriceImpact_ASC_NULLS_LAST',
+ realizedPriceImpact_DESC = 'realizedPriceImpact_DESC',
+ realizedPriceImpact_DESC_NULLS_FIRST = 'realizedPriceImpact_DESC_NULLS_FIRST',
+ realizedPriceImpact_DESC_NULLS_LAST = 'realizedPriceImpact_DESC_NULLS_LAST',
+ sumMaxSize_ASC = 'sumMaxSize_ASC',
+ sumMaxSize_ASC_NULLS_FIRST = 'sumMaxSize_ASC_NULLS_FIRST',
+ sumMaxSize_ASC_NULLS_LAST = 'sumMaxSize_ASC_NULLS_LAST',
+ sumMaxSize_DESC = 'sumMaxSize_DESC',
+ sumMaxSize_DESC_NULLS_FIRST = 'sumMaxSize_DESC_NULLS_FIRST',
+ sumMaxSize_DESC_NULLS_LAST = 'sumMaxSize_DESC_NULLS_LAST',
+ volume_ASC = 'volume_ASC',
+ volume_ASC_NULLS_FIRST = 'volume_ASC_NULLS_FIRST',
+ volume_ASC_NULLS_LAST = 'volume_ASC_NULLS_LAST',
+ volume_DESC = 'volume_DESC',
+ volume_DESC_NULLS_FIRST = 'volume_DESC_NULLS_FIRST',
+ volume_DESC_NULLS_LAST = 'volume_DESC_NULLS_LAST',
+ wins_ASC = 'wins_ASC',
+ wins_ASC_NULLS_FIRST = 'wins_ASC_NULLS_FIRST',
+ wins_ASC_NULLS_LAST = 'wins_ASC_NULLS_LAST',
+ wins_DESC = 'wins_DESC',
+ wins_DESC_NULLS_FIRST = 'wins_DESC_NULLS_FIRST',
+ wins_DESC_NULLS_LAST = 'wins_DESC_NULLS_LAST'
}
export interface AccountStatWhereInput {
AND?: InputMaybe>;
OR?: InputMaybe>;
- closedCount_eq?: InputMaybe;
- closedCount_gt?: InputMaybe;
- closedCount_gte?: InputMaybe;
- closedCount_in?: InputMaybe>;
- closedCount_isNull?: InputMaybe;
- closedCount_lt?: InputMaybe;
- closedCount_lte?: InputMaybe;
- closedCount_not_eq?: InputMaybe;
- closedCount_not_in?: InputMaybe>;
- cumsumCollateral_eq?: InputMaybe;
- cumsumCollateral_gt?: InputMaybe;
- cumsumCollateral_gte?: InputMaybe;
- cumsumCollateral_in?: InputMaybe>;
- cumsumCollateral_isNull?: InputMaybe;
- cumsumCollateral_lt?: InputMaybe;
- cumsumCollateral_lte?: InputMaybe;
- cumsumCollateral_not_eq?: InputMaybe;
- cumsumCollateral_not_in?: InputMaybe>;
- cumsumSize_eq?: InputMaybe;
- cumsumSize_gt?: InputMaybe;
- cumsumSize_gte?: InputMaybe;
- cumsumSize_in?: InputMaybe>;
- cumsumSize_isNull?: InputMaybe;
- cumsumSize_lt?: InputMaybe;
- cumsumSize_lte?: InputMaybe;
- cumsumSize_not_eq?: InputMaybe;
- cumsumSize_not_in?: InputMaybe>;
- id_contains?: InputMaybe;
- id_containsInsensitive?: InputMaybe;
- id_endsWith?: InputMaybe;
- id_eq?: InputMaybe;
- id_gt?: InputMaybe;
- id_gte?: InputMaybe;
- id_in?: InputMaybe>;
- id_isNull?: InputMaybe;
- id_lt?: InputMaybe;
- id_lte?: InputMaybe;
- id_not_contains?: InputMaybe;
- id_not_containsInsensitive?: InputMaybe;
- id_not_endsWith?: InputMaybe;
- id_not_eq?: InputMaybe;
- id_not_in?: InputMaybe>;
- id_not_startsWith?: InputMaybe;
- id_startsWith?: InputMaybe;
- losses_eq?: InputMaybe;
- losses_gt?: InputMaybe;
- losses_gte?: InputMaybe;
- losses_in?: InputMaybe>;
- losses_isNull?: InputMaybe;
- losses_lt?: InputMaybe;
- losses_lte?: InputMaybe;
- losses_not_eq?: InputMaybe;
- losses_not_in?: InputMaybe>;
- maxCapital_eq?: InputMaybe;
- maxCapital_gt?: InputMaybe;
- maxCapital_gte?: InputMaybe;
- maxCapital_in?: InputMaybe>;
- maxCapital_isNull?: InputMaybe;
- maxCapital_lt?: InputMaybe;
- maxCapital_lte?: InputMaybe;
- maxCapital_not_eq?: InputMaybe;
- maxCapital_not_in?: InputMaybe>;
- netCapital_eq?: InputMaybe;
- netCapital_gt?: InputMaybe;
- netCapital_gte?: InputMaybe;
- netCapital_in?: InputMaybe>;
- netCapital_isNull?: InputMaybe;
- netCapital_lt?: InputMaybe;
- netCapital_lte?: InputMaybe;
- netCapital_not_eq?: InputMaybe;
- netCapital_not_in?: InputMaybe>;
+ closedCount_eq?: InputMaybe;
+ closedCount_gt?: InputMaybe;
+ closedCount_gte?: InputMaybe;
+ closedCount_in?: InputMaybe>;
+ closedCount_isNull?: InputMaybe;
+ closedCount_lt?: InputMaybe;
+ closedCount_lte?: InputMaybe;
+ closedCount_not_eq?: InputMaybe;
+ closedCount_not_in?: InputMaybe>;
+ cumsumCollateral_eq?: InputMaybe;
+ cumsumCollateral_gt?: InputMaybe;
+ cumsumCollateral_gte?: InputMaybe;
+ cumsumCollateral_in?: InputMaybe>;
+ cumsumCollateral_isNull?: InputMaybe;
+ cumsumCollateral_lt?: InputMaybe;
+ cumsumCollateral_lte?: InputMaybe;
+ cumsumCollateral_not_eq?: InputMaybe;
+ cumsumCollateral_not_in?: InputMaybe>;
+ cumsumSize_eq?: InputMaybe;
+ cumsumSize_gt?: InputMaybe;
+ cumsumSize_gte?: InputMaybe;
+ cumsumSize_in?: InputMaybe>;
+ cumsumSize_isNull?: InputMaybe;
+ cumsumSize_lt?: InputMaybe;
+ cumsumSize_lte?: InputMaybe;
+ cumsumSize_not_eq?: InputMaybe;
+ cumsumSize_not_in?: InputMaybe>;
+ id_contains?: InputMaybe;
+ id_containsInsensitive?: InputMaybe;
+ id_endsWith?: InputMaybe;
+ id_eq?: InputMaybe;
+ id_gt?: InputMaybe;
+ id_gte?: InputMaybe;
+ id_in?: InputMaybe>;
+ id_isNull?: InputMaybe;
+ id_lt?: InputMaybe;
+ id_lte?: InputMaybe;
+ id_not_contains?: InputMaybe;
+ id_not_containsInsensitive?: InputMaybe;
+ id_not_endsWith?: InputMaybe;
+ id_not_eq?: InputMaybe;
+ id_not_in?: InputMaybe>;
+ id_not_startsWith?: InputMaybe;
+ id_startsWith?: InputMaybe;
+ losses_eq?: InputMaybe;
+ losses_gt?: InputMaybe;
+ losses_gte?: InputMaybe;
+ losses_in?: InputMaybe>;
+ losses_isNull?: InputMaybe;
+ losses_lt?: InputMaybe;
+ losses_lte?: InputMaybe;
+ losses_not_eq?: InputMaybe;
+ losses_not_in?: InputMaybe>;
+ maxCapital_eq?: InputMaybe;
+ maxCapital_gt?: InputMaybe;
+ maxCapital_gte?: InputMaybe;
+ maxCapital_in?: InputMaybe>;
+ maxCapital_isNull?: InputMaybe;
+ maxCapital_lt?: InputMaybe;
+ maxCapital_lte?: InputMaybe;
+ maxCapital_not_eq?: InputMaybe;
+ maxCapital_not_in?: InputMaybe>;
+ netCapital_eq?: InputMaybe;
+ netCapital_gt?: InputMaybe;
+ netCapital_gte?: InputMaybe;
+ netCapital_in?: InputMaybe>;
+ netCapital_isNull?: InputMaybe;
+ netCapital_lt?: InputMaybe;
+ netCapital_lte?: InputMaybe;
+ netCapital_not_eq?: InputMaybe;
+ netCapital_not_in?: InputMaybe>;
positions_every?: InputMaybe;
positions_none?: InputMaybe;
positions_some?: InputMaybe;
- realizedFees_eq?: InputMaybe;
- realizedFees_gt?: InputMaybe;
- realizedFees_gte?: InputMaybe;
- realizedFees_in?: InputMaybe>;
- realizedFees_isNull?: InputMaybe;
- realizedFees_lt?: InputMaybe;
- realizedFees_lte?: InputMaybe;
- realizedFees_not_eq?: InputMaybe;
- realizedFees_not_in?: InputMaybe>;
- realizedPnl_eq?: InputMaybe;
- realizedPnl_gt?: InputMaybe;
- realizedPnl_gte?: InputMaybe;
- realizedPnl_in?: InputMaybe>;
- realizedPnl_isNull?: InputMaybe;
- realizedPnl_lt?: InputMaybe;
- realizedPnl_lte?: InputMaybe;
- realizedPnl_not_eq?: InputMaybe;
- realizedPnl_not_in?: InputMaybe>;
- realizedPriceImpact_eq?: InputMaybe;
- realizedPriceImpact_gt?: InputMaybe;
- realizedPriceImpact_gte?: InputMaybe;
- realizedPriceImpact_in?: InputMaybe>;
- realizedPriceImpact_isNull?: InputMaybe;
- realizedPriceImpact_lt?: InputMaybe;
- realizedPriceImpact_lte?: InputMaybe;
- realizedPriceImpact_not_eq?: InputMaybe;
- realizedPriceImpact_not_in?: InputMaybe>;
- sumMaxSize_eq?: InputMaybe;
- sumMaxSize_gt?: InputMaybe;
- sumMaxSize_gte?: InputMaybe;
- sumMaxSize_in?: InputMaybe>;
- sumMaxSize_isNull?: InputMaybe;
- sumMaxSize_lt?: InputMaybe;
- sumMaxSize_lte?: InputMaybe;
- sumMaxSize_not_eq?: InputMaybe;
- sumMaxSize_not_in?: InputMaybe>;
- volume_eq?: InputMaybe;
- volume_gt?: InputMaybe;
- volume_gte?: InputMaybe;
- volume_in?: InputMaybe>;
- volume_isNull?: InputMaybe;
- volume_lt?: InputMaybe;
- volume_lte?: InputMaybe;
- volume_not_eq?: InputMaybe;
- volume_not_in?: InputMaybe>;
- wins_eq?: InputMaybe;
- wins_gt?: InputMaybe;
- wins_gte?: InputMaybe;
- wins_in?: InputMaybe>;
- wins_isNull?: InputMaybe;
- wins_lt?: InputMaybe;
- wins_lte?: InputMaybe;
- wins_not_eq?: InputMaybe;
- wins_not_in?: InputMaybe>;
+ realizedFees_eq?: InputMaybe;
+ realizedFees_gt?: InputMaybe;
+ realizedFees_gte?: InputMaybe;
+ realizedFees_in?: InputMaybe>;
+ realizedFees_isNull?: InputMaybe;
+ realizedFees_lt?: InputMaybe;
+ realizedFees_lte?: InputMaybe;
+ realizedFees_not_eq?: InputMaybe;
+ realizedFees_not_in?: InputMaybe>;
+ realizedPnl_eq?: InputMaybe;
+ realizedPnl_gt?: InputMaybe;
+ realizedPnl_gte?: InputMaybe;
+ realizedPnl_in?: InputMaybe>;
+ realizedPnl_isNull?: InputMaybe;
+ realizedPnl_lt?: InputMaybe;
+ realizedPnl_lte?: InputMaybe;
+ realizedPnl_not_eq?: InputMaybe;
+ realizedPnl_not_in?: InputMaybe>;
+ realizedPriceImpact_eq?: InputMaybe;
+ realizedPriceImpact_gt?: InputMaybe;
+ realizedPriceImpact_gte?: InputMaybe;
+ realizedPriceImpact_in?: InputMaybe>;
+ realizedPriceImpact_isNull?: InputMaybe;
+ realizedPriceImpact_lt?: InputMaybe;
+ realizedPriceImpact_lte?: InputMaybe;
+ realizedPriceImpact_not_eq?: InputMaybe;
+ realizedPriceImpact_not_in?: InputMaybe>;
+ sumMaxSize_eq?: InputMaybe;
+ sumMaxSize_gt?: InputMaybe