From 6d64af7c0135f3fd424d0949321952fbf453c806 Mon Sep 17 00:00:00 2001 From: Oda <102867384+CryptoOda@users.noreply.github.com> Date: Thu, 18 Dec 2025 21:45:54 +0700 Subject: [PATCH] Update sdk (#39) * Update .DS_Store files and remove obsolete ABI JSON files from Managing.Web3Proxy; enhance bun.lock and package.json for dependency consistency. * Update import statements in TypeScript files to include .js extensions for consistency across the gmxsdk module. --- .DS_Store | Bin 10244 -> 10244 bytes src/.DS_Store | Bin 14340 -> 12292 bytes src/Managing.Web3Proxy/.DS_Store | Bin 6148 -> 8196 bytes src/Managing.Web3Proxy/bun.lock | 36 +- src/Managing.Web3Proxy/package.json | 2 + src/Managing.Web3Proxy/src/.DS_Store | Bin 6148 -> 6148 bytes .../src/generated/.DS_Store | Bin 6148 -> 6148 bytes .../src/generated/gmxsdk/.DS_Store | Bin 0 -> 6148 bytes .../gmxsdk/abis/ArbitrumNodeInterface.json | 105 - .../gmxsdk/abis/ArbitrumNodeInterface.ts | 103 + .../generated/gmxsdk/abis/ClaimHandler.json | 424 -- .../src/generated/gmxsdk/abis/ClaimHandler.ts | 422 ++ .../generated/gmxsdk/abis/CustomErrors.json | 4432 --------------- .../src/generated/gmxsdk/abis/CustomErrors.ts | 1882 +++++++ .../src/generated/gmxsdk/abis/DataStore.json | 1459 ----- .../src/generated/gmxsdk/abis/DataStore.ts | 637 +++ .../gmxsdk/abis/ERC20PermitInterface.json | 118 - .../gmxsdk/abis/ERC20PermitInterface.ts | 52 + .../src/generated/gmxsdk/abis/ERC721.json | 442 -- .../src/generated/gmxsdk/abis/ERC721.ts | 194 + .../generated/gmxsdk/abis/EventEmitter.json | 2060 ------- .../src/generated/gmxsdk/abis/EventEmitter.ts | 1226 ++++ .../generated/gmxsdk/abis/ExchangeRouter.json | 1706 ------ .../generated/gmxsdk/abis/ExchangeRouter.ts | 1588 ++++++ .../src/generated/gmxsdk/abis/GMT.json | 522 -- .../gmxsdk/abis/GelatoRelayRouter.json | 1579 ------ .../gmxsdk/abis/GelatoRelayRouter.ts | 1577 ++++++ .../src/generated/gmxsdk/abis/GlpManager.json | 592 -- .../src/generated/gmxsdk/abis/GlpManager.ts | 244 + .../src/generated/gmxsdk/abis/GlvReader.json | 1471 ----- .../src/generated/gmxsdk/abis/GlvReader.ts | 1469 +++++ .../src/generated/gmxsdk/abis/GlvRouter.json | 764 --- .../src/generated/gmxsdk/abis/GlvRouter.ts | 762 +++ .../generated/gmxsdk/abis/GmxMigrator.json | 657 --- .../src/generated/gmxsdk/abis/GmxMigrator.ts | 267 + .../src/generated/gmxsdk/abis/GovToken.json | 768 --- .../src/generated/gmxsdk/abis/GovToken.ts | 323 ++ .../src/generated/gmxsdk/abis/IStargate.ts | 601 ++ .../gmxsdk/abis/LayerZeroProvider.json | 372 -- .../gmxsdk/abis/LayerZeroProvider.ts | 386 ++ .../gmxsdk/abis/MintableBaseToken.json | 696 --- .../gmxsdk/abis/MintableBaseToken.ts | 321 ++ .../src/generated/gmxsdk/abis/Multicall.json | 429 -- .../src/generated/gmxsdk/abis/Multicall.ts | 229 + .../gmxsdk/abis/MultichainClaimsRouter.json | 1266 ----- .../gmxsdk/abis/MultichainClaimsRouter.ts | 1264 +++++ .../gmxsdk/abis/MultichainGlvRouter.json | 1150 ---- .../gmxsdk/abis/MultichainGlvRouter.ts | 1148 ++++ .../gmxsdk/abis/MultichainGmRouter.json | 1449 ----- .../gmxsdk/abis/MultichainGmRouter.ts | 1447 +++++ .../gmxsdk/abis/MultichainOrderRouter.json | 1820 ------ .../gmxsdk/abis/MultichainOrderRouter.ts | 2007 +++++++ .../abis/MultichainSubaccountRouter.json | 2069 ------- .../gmxsdk/abis/MultichainSubaccountRouter.ts | 2067 +++++++ .../gmxsdk/abis/MultichainTransferRouter.json | 915 --- .../gmxsdk/abis/MultichainTransferRouter.ts | 913 +++ .../gmxsdk/abis/MultichainUtils.json | 133 - .../gmxsdk/abis/MultichainVault.json | 275 - .../generated/gmxsdk/abis/MultichainVault.ts | 273 + .../src/generated/gmxsdk/abis/OrderBook.json | 1997 ------- .../gmxsdk/abis/OrderBookReader.json | 111 - .../generated/gmxsdk/abis/OrderExecutor.json | 122 - .../gmxsdk/abis/PositionManager.json | 1165 ---- .../generated/gmxsdk/abis/PositionRouter.json | 2030 ------- .../src/generated/gmxsdk/abis/Reader.json | 355 -- .../src/generated/gmxsdk/abis/Reader.ts | 138 + .../src/generated/gmxsdk/abis/ReaderV2.json | 630 --- .../src/generated/gmxsdk/abis/ReaderV2.ts | 257 + .../gmxsdk/abis/ReferralStorage.json | 557 -- .../generated/gmxsdk/abis/ReferralStorage.ts | 259 + .../generated/gmxsdk/abis/RelayParams.json | 147 - .../src/generated/gmxsdk/abis/RelayParams.ts | 53 + .../generated/gmxsdk/abis/RewardReader.json | 86 - .../src/generated/gmxsdk/abis/RewardReader.ts | 33 + .../generated/gmxsdk/abis/RewardRouter.json | 1024 ---- .../src/generated/gmxsdk/abis/RewardRouter.ts | 458 ++ .../generated/gmxsdk/abis/RewardTracker.json | 918 --- .../generated/gmxsdk/abis/RewardTracker.ts | 413 ++ .../src/generated/gmxsdk/abis/Router-v2.json | 605 -- .../src/generated/gmxsdk/abis/Router.json | 605 -- .../generated/gmxsdk/abis/SmartAccount.json | 28 - .../src/generated/gmxsdk/abis/SmartAccount.ts | 12 + .../src/generated/gmxsdk/abis/StBTC.json | 1225 ---- .../src/generated/gmxsdk/abis/StBTC.ts | 511 ++ .../gmxsdk/abis/SubaccountApproval.json | 17 - .../gmxsdk/abis/SubaccountApproval.ts | 15 + .../abis/SubaccountGelatoRelayRouter.json | 2019 ------- .../abis/SubaccountGelatoRelayRouter.ts | 2017 +++++++ .../gmxsdk/abis/SubaccountRouter.json | 602 -- .../generated/gmxsdk/abis/SubaccountRouter.ts | 600 ++ .../gmxsdk/abis/SyntheticsReader.json | 4905 ----------------- .../generated/gmxsdk/abis/SyntheticsReader.ts | 4903 ++++++++++++++++ .../gmxsdk/abis/SyntheticsRouter.json | 72 - .../generated/gmxsdk/abis/SyntheticsRouter.ts | 70 + .../src/generated/gmxsdk/abis/Timelock.json | 1737 ------ .../src/generated/gmxsdk/abis/Timelock.ts | 776 +++ .../src/generated/gmxsdk/abis/Token.json | 345 -- .../src/generated/gmxsdk/abis/Token.ts | 148 + .../src/generated/gmxsdk/abis/Treasury.json | 411 -- .../src/generated/gmxsdk/abis/Treasury.ts | 204 + .../src/generated/gmxsdk/abis/UniPool.json | 89 - .../src/generated/gmxsdk/abis/UniPool.ts | 34 + .../src/generated/gmxsdk/abis/UniswapV2.json | 1 - .../src/generated/gmxsdk/abis/UniswapV2.ts | 285 + .../generated/gmxsdk/abis/UniswapV3Factory.ts | 198 + .../generated/gmxsdk/abis/UniswapV3Pool.ts | 983 ++++ .../gmxsdk/abis/UniswapV3PositionManager.ts | 989 ++++ .../src/generated/gmxsdk/abis/Vault.json | 3220 ----------- .../src/generated/gmxsdk/abis/Vault.ts | 1306 +++++ .../generated/gmxsdk/abis/VaultReader.json | 87 - .../src/generated/gmxsdk/abis/VaultReader.ts | 28 + .../src/generated/gmxsdk/abis/VaultV2.json | 3019 ---------- .../src/generated/gmxsdk/abis/VaultV2.ts | 1220 ++++ .../src/generated/gmxsdk/abis/VaultV2b.json | 3220 ----------- .../src/generated/gmxsdk/abis/VaultV2b.ts | 1306 +++++ .../src/generated/gmxsdk/abis/VenusVToken.ts | 47 + .../src/generated/gmxsdk/abis/Vester.json | 1031 ---- .../src/generated/gmxsdk/abis/Vester.ts | 454 ++ .../src/generated/gmxsdk/abis/WETH.json | 320 -- .../src/generated/gmxsdk/abis/WETH.ts | 135 + .../src/generated/gmxsdk/abis/YieldFarm.json | 599 -- .../src/generated/gmxsdk/abis/YieldToken.json | 560 -- .../gmxsdk/abis/__tests__/abis.spec.ts | 46 - .../src/generated/gmxsdk/abis/index.ts | 319 +- .../src/generated/gmxsdk/configs/batch.ts | 98 +- .../src/generated/gmxsdk/configs/chainIds.ts | 14 + .../src/generated/gmxsdk/configs/chains.ts | 83 +- .../src/generated/gmxsdk/configs/contracts.ts | 154 +- .../src/generated/gmxsdk/configs/dataStore.ts | 11 +- .../src/generated/gmxsdk/configs/express.ts | 61 + .../src/generated/gmxsdk/configs/factors.ts | 8 +- .../src/generated/gmxsdk/configs/markets.ts | 467 +- .../generated/gmxsdk/configs/multichain.ts | 35 + .../generated/gmxsdk/configs/oracleKeeper.ts | 56 + .../src/generated/gmxsdk/configs/tokens.ts | 174 +- .../src/generated/gmxsdk/configs/twap.ts | 8 + .../src/generated/gmxsdk/configs/ui.ts | 27 - .../src/generated/gmxsdk/configs/uniswapV3.ts | 21 + .../src/generated/gmxsdk/configs/venus.ts | 71 + .../generated/gmxsdk/modules/markets/index.ts | 113 +- .../gmxsdk/modules/markets/query-builders.ts | 359 +- .../generated/gmxsdk/modules/markets/types.ts | 76 +- .../src/generated/gmxsdk/modules/oracle.ts | 16 +- .../gmxsdk/modules/orders/helpers.ts | 755 ++- .../gmxsdk/modules/orders/orders.spec.ts | 5 +- .../generated/gmxsdk/modules/orders/orders.ts | 70 +- .../transactions/createDecreaseOrderTxn.ts | 45 +- .../transactions/createIncreaseOrderTxn.ts | 22 +- .../orders/transactions/createSwapOrderTxn.ts | 29 +- .../transactions/createWrapOrUnwrapTxn.ts | 2 +- .../orders/transactions/updateOrderTxn.ts | 9 +- .../generated/gmxsdk/modules/orders/utils.ts | 44 +- .../gmxsdk/modules/positions/positions.ts | 84 +- .../generated/gmxsdk/modules/tokens/tokens.ts | 67 +- .../gmxsdk/modules/trades/trades.spec.ts | 1 + .../generated/gmxsdk/modules/trades/trades.ts | 34 +- .../generated/gmxsdk/modules/utils/utils.ts | 69 +- .../hashedKinkModelMarketRatesKeys.json | 88 + .../prebuilt/hashedMarketConfigKeys.json | 1686 ++++-- .../prebuilt/hashedMarketValuesKeys.json | 165 + .../src/generated/gmxsdk/prebuilt/index.ts | 12 +- .../src/generated/gmxsdk/types/fees.ts | 5 +- .../src/generated/gmxsdk/types/markets.ts | 33 +- .../src/generated/gmxsdk/types/orders.ts | 20 +- .../src/generated/gmxsdk/types/positions.ts | 5 +- .../src/generated/gmxsdk/types/sdk.ts | 56 +- .../src/generated/gmxsdk/types/subsquid.ts | 956 ++-- .../generated/gmxsdk/types/swapStrategy.ts | 83 +- .../src/generated/gmxsdk/types/tokens.ts | 40 +- .../src/generated/gmxsdk/types/trade.ts | 16 +- .../generated/gmxsdk/types/tradeHistory.ts | 17 +- .../src/generated/gmxsdk/types/twap.ts | 13 + .../src/generated/gmxsdk/utils/LruCache.ts | 43 +- .../gmxsdk/utils/__tests__/LruCache.spec.ts | 32 + .../{subgraph.spec.ts => indexers.spec.ts} | 4 +- .../gmxsdk/utils/__tests__/markets.spec.ts | 35 +- .../gmxsdk/utils/__tests__/numbers.spec.ts | 441 +- .../gmxsdk/utils/__tests__/objects.spec.ts | 90 +- .../gmxsdk/utils/__tests__/parseError.spec.ts | 340 ++ .../gmxsdk/utils/__tests__/positions.spec.ts | 70 +- .../gmxsdk/utils/__tests__/prices.spec.ts | 18 +- .../gmxsdk/utils/__tests__/referrals.spec.ts | 6 +- .../gmxsdk/utils/__tests__/trade.spec.ts | 4 +- .../src/generated/gmxsdk/utils/bigmath.ts | 3 + .../src/generated/gmxsdk/utils/buildUrl.ts | 2 + .../generated/gmxsdk/utils/errors/index.ts | 2 + .../gmxsdk/utils/errors/parseError.ts | 271 + .../transactionsErrors.ts} | 51 +- .../utils/fees/estimateOraclePriceCount.ts | 4 +- .../gmxsdk/utils/fees/executionFee.ts | 194 +- .../src/generated/gmxsdk/utils/fees/index.ts | 53 +- .../gmxsdk/utils/fees/priceImpact.ts | 77 +- .../src/generated/gmxsdk/utils/gelatoRelay.ts | 5 + .../gmxsdk/utils/{subgraph.ts => indexers.ts} | 55 +- .../gmxsdk/utils/marketKeysAndConfigs.ts | 135 +- .../src/generated/gmxsdk/utils/markets.ts | 18 + .../src/generated/gmxsdk/utils/multicall.ts | 37 +- .../src/generated/gmxsdk/utils/numbers.ts | 41 +- .../gmxsdk/utils/numbers/formatting.spec.ts | 152 - .../gmxsdk/utils/numbers/formatting.ts | 414 -- .../generated/gmxsdk/utils/numbers/index.ts | 290 - .../gmxsdk/utils/numbers/numbers.spec.ts | 153 - .../gmxsdk/utils/orderTransactions.ts | 971 ++++ .../src/generated/gmxsdk/utils/orders.ts | 86 +- .../src/generated/gmxsdk/utils/positions.ts | 33 +- .../src/generated/gmxsdk/utils/prices.ts | 21 +- .../gmxsdk/utils/simulateExecuteOrder.ts | 48 +- .../gmxsdk/utils/swap/botanixStaking.ts | 28 +- .../gmxsdk/utils/swap/buildSwapStrategy.ts | 55 +- .../utils/swap/externalSwapQuoteByPath.ts | 9 +- .../gmxsdk/utils/swap/preparedSwapData.ts | 10 +- .../generated/gmxsdk/utils/swap/swapPath.ts | 67 +- .../gmxsdk/utils/swap/swapRouting.ts | 56 +- .../generated/gmxsdk/utils/swap/swapStats.ts | 34 +- .../generated/gmxsdk/utils/swap/swapValues.ts | 66 +- .../src/generated/gmxsdk/utils/testUtil.ts | 14 +- .../src/generated/gmxsdk/utils/time.ts | 29 + .../src/generated/gmxsdk/utils/tokens.ts | 48 +- .../generated/gmxsdk/utils/trade/decrease.ts | 56 +- .../generated/gmxsdk/utils/trade/increase.ts | 58 +- .../src/generated/gmxsdk/utils/trade/trade.ts | 20 +- .../generated/gmxsdk/utils/tradeHistory.ts | 23 +- .../src/generated/gmxsdk/utils/twap/index.ts | 78 + .../gmxsdk/utils/twap/uiFeeReceiver.ts | 58 + .../src/generated/gmxsdk/utils/types.ts | 14 + .../src/plugins/custom/gmx.ts | 5 +- .../src/plugins/custom/privy.ts | 10 +- src/Managing.WebApp/bun.lock | 78 +- src/Managing.WebApp/package.json | 2 + 229 files changed, 47114 insertions(+), 65375 deletions(-) create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/.DS_Store delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/ArbitrumNodeInterface.json create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/ArbitrumNodeInterface.ts delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/ClaimHandler.json create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/ClaimHandler.ts delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/CustomErrors.json create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/CustomErrors.ts delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/DataStore.json create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/DataStore.ts delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/ERC20PermitInterface.json create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/ERC20PermitInterface.ts delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/ERC721.json create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/ERC721.ts delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/EventEmitter.json create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/EventEmitter.ts delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/ExchangeRouter.json create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/ExchangeRouter.ts delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/GMT.json delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/GelatoRelayRouter.json create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/GelatoRelayRouter.ts delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/GlpManager.json create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/GlpManager.ts delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/GlvReader.json create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/GlvReader.ts delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/GlvRouter.json create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/GlvRouter.ts delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/GmxMigrator.json create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/GmxMigrator.ts delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/GovToken.json create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/GovToken.ts create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/IStargate.ts delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/LayerZeroProvider.json create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/LayerZeroProvider.ts delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/MintableBaseToken.json create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/MintableBaseToken.ts delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/Multicall.json create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/Multicall.ts delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/MultichainClaimsRouter.json create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/MultichainClaimsRouter.ts delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/MultichainGlvRouter.json create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/MultichainGlvRouter.ts delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/MultichainGmRouter.json create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/MultichainGmRouter.ts delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/MultichainOrderRouter.json create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/MultichainOrderRouter.ts delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/MultichainSubaccountRouter.json create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/MultichainSubaccountRouter.ts delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/MultichainTransferRouter.json create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/MultichainTransferRouter.ts delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/MultichainUtils.json delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/MultichainVault.json create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/MultichainVault.ts delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/OrderBook.json delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/OrderBookReader.json delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/OrderExecutor.json delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/PositionManager.json delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/PositionRouter.json delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/Reader.json create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/Reader.ts delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/ReaderV2.json create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/ReaderV2.ts delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/ReferralStorage.json create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/ReferralStorage.ts delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/RelayParams.json create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/RelayParams.ts delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/RewardReader.json create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/RewardReader.ts delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/RewardRouter.json create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/RewardRouter.ts delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/RewardTracker.json create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/RewardTracker.ts delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/Router-v2.json delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/Router.json delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/SmartAccount.json create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/SmartAccount.ts delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/StBTC.json create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/StBTC.ts delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/SubaccountApproval.json create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/SubaccountApproval.ts delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/SubaccountGelatoRelayRouter.json create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/SubaccountGelatoRelayRouter.ts delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/SubaccountRouter.json create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/SubaccountRouter.ts delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/SyntheticsReader.json create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/SyntheticsReader.ts delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/SyntheticsRouter.json create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/SyntheticsRouter.ts delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/Timelock.json create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/Timelock.ts delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/Token.json create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/Token.ts delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/Treasury.json create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/Treasury.ts delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/UniPool.json create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/UniPool.ts delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/UniswapV2.json create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/UniswapV2.ts create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/UniswapV3Factory.ts create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/UniswapV3Pool.ts create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/UniswapV3PositionManager.ts delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/Vault.json create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/Vault.ts delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/VaultReader.json create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/VaultReader.ts delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/VaultV2.json create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/VaultV2.ts delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/VaultV2b.json create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/VaultV2b.ts create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/VenusVToken.ts delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/Vester.json create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/Vester.ts delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/WETH.json create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/WETH.ts delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/YieldFarm.json delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/YieldToken.json delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/abis/__tests__/abis.spec.ts create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/configs/chainIds.ts create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/configs/express.ts create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/configs/multichain.ts create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/configs/oracleKeeper.ts create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/configs/twap.ts delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/configs/ui.ts create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/configs/uniswapV3.ts create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/configs/venus.ts create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/types/twap.ts rename src/Managing.Web3Proxy/src/generated/gmxsdk/utils/__tests__/{subgraph.spec.ts => indexers.spec.ts} (97%) create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/utils/__tests__/parseError.spec.ts create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/utils/errors/index.ts create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/utils/errors/parseError.ts rename src/Managing.Web3Proxy/src/generated/gmxsdk/utils/{contracts.ts => errors/transactionsErrors.ts} (70%) create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/utils/gelatoRelay.ts rename src/Managing.Web3Proxy/src/generated/gmxsdk/utils/{subgraph.ts => indexers.ts} (65%) delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/utils/numbers/formatting.spec.ts delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/utils/numbers/formatting.ts delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/utils/numbers/index.ts delete mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/utils/numbers/numbers.spec.ts create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/utils/orderTransactions.ts create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/utils/time.ts create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/utils/twap/index.ts create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/utils/twap/uiFeeReceiver.ts create mode 100644 src/Managing.Web3Proxy/src/generated/gmxsdk/utils/types.ts diff --git a/.DS_Store b/.DS_Store index d5499c0e775bb8fface35849a71ad1d72a0efaf0..e9601c7b827ca1e9a1c240e9b1c0c94ed2c0e7eb 100644 GIT binary patch delta 847 zcmZn(XbG6$FRH-6z`)4BAi%&-%8Y02Hwr=94s95AQkKkdJM@7 zISh%&s`8V7GC++?SAn$Ne=q>DV5&iK*c-SL59Hg2J294E_wh3;{qgl);a|g~1a@x--NxxB*!aKqurfq@X&KVLi~&y3I)fvdoOTCN~Hd zYD!gC8ycD!=qQ*Q7}V-0R2v#tn&>E)85-Bta&m|&>strKXXoVR<@ZdM5Rqr>oopdu z&m<)?xl-hgbi4q6aYlZ*XL5dCKv8O0W@>pvCXgMRS(Q4uKvaV%Ct>m|QCTidWrqMz zIsm%*ps1pxB%>0eHlqonEu%f72V)>(5Mwf924f~;*5==$4s6Qo3?V@8xBxL0=QGNJ boo^uXka07+!Y`J|*1|4>&L5M1i#h@T_rcrR delta 349 zcmZn(XbG6$FDk~sz`)4BAi%&-!cgp)lb@WFlb^J)a2or>2Hwr=94s7+Vw3v>6E_Cgvdq--$rj=onyo;m00D;x zgocxhA$j?Eshr9V0T3b1$(`bgk^+oMjM|JQjJAySj2?`Ej6saaj2VoXj76Idi#xDw bHk7-@xUu0I<7Re+Uo4YPiiOb8dQK()K<-i} diff --git a/src/.DS_Store b/src/.DS_Store index 720babe60c2706722bd50fb48e72ed91fdb7515e..e50394b86a36ac6ad54a6450c7668756bc38b893 100644 GIT binary patch delta 982 zcmcIj&rcIU6rL$RLIW*3?QXk*u-kUq#fZ>iQ$&acv$1J&_-_5N9uA2k606u?^_Z3F%1e%kWjqLIR%lalmy=E&`ijFwF%)MS zPD>1vtQSut32Q8YG-G%r%hr)$mv_!rir376xsZ(CE*&c_H$pDa&8c#$KF{Wk6>AB% zp^$giP#fvQlH7+?zH?EL(W+>Ox`iLajN-&IS@>bPg!jsgeKk{4kw`4usJDj0*+zXT z5^jq&>aobdY}Q_(1e)8=Umh8~HkO&e8?Q$1L07zZsW3eEbd=LygxLBETb{EN7ZpZ5 zoC0OPpml`PI?jo0+99}SG&49bni=3!N&Fb6&(@C%Y6oWg43AXBYJ-QC)hK>?SiwW@ zl+hYg=?Ac3Na)e`AfYl$=sp`EnAf|6d8fAs^ov5 z5Hg(b1Q_DRIh^5k!H8o%z;ckWY^cZv?f4Mj6K4GuvcXGKsC&q8SU|Qy8s-fKyI00- zvlJ&xrKqqIDKl!-rOsV-nLt>1+#2H)=XnTCK^==8y_OKG1%6v9Io9~@8&hC(vjo-A XL=`PwD8g+RSEH-=@(<~MgQooj28a`Q delta 825 zcmb_a&ubGw7@gTPYo&3!v)OF2DQPy@O_oAht7&VM5c_DL|u}$FrZChAmzuJR>o#fg$Pba(lpA!qRa*v zlP=&@@GMRm0ttN_cL+E27#`}1EKSp;`P#ZZ#3jCjZ=s^Zf8wrTqiV#lXbL3HEpaLq{}<_bJ@M$m5w zJX0I`d}=>#sS4h>3ZAH8FSa(HnrwK&Z`95FosJ`?ie>1y={Dhn8^QxsVAk!xCr|D~ zpCE{!B=(_;l6?&|A+NPyjf%cvntSE1VfyJEXmq#GGV=d-r6>5}Lu+OtAT@q-zZZv@ L%-cQdjF0^V#ogq0 diff --git a/src/Managing.Web3Proxy/.DS_Store b/src/Managing.Web3Proxy/.DS_Store index 3c3bb3aa0d83e073f86de99a71ff656267877fd9..c526cd96eb7c0d1be367b6a4701aac3f22caa869 100644 GIT binary patch literal 8196 zcmeHM&2G~`5T0#9>(CY=R8WOf$%t!P5)~C8E+Ib>l?p|5`KbVfI5DlMYe%uuw5lrQ z4!i=dz@7Jici{xztewj1v{G+?x+{5ScRkTr4Yz9L7>^9jN3H05XqZSrfUG2P7)y+xh!_ePLq&4L5Xs3w#BkiN zB>KZx#&8nSGwdXuMRGzB$-zUIQk_I4mb%sqXa>d^;In(4mdPQX4%GAe#1GtC{w<3H z&W!Y=Jfs%wQ!QFy>NC7;ws7Gxe0_sx-qh0g^)DC1sE@Y_MqHnPEH8qDx z><1AYNlaGvamKGfHvIVT!yenTr`i_3GPd)WlZ%-~s-B!fnui z@OFfrr`iw;nYqnTJ!Rtq{DMbXq5*1~RuX0o=}5Ih9Alb~BJ@LGUBnr|H_yc7yHU&VPYraVFo$@7;~rzG`IRP z)+~-!TRO5CaM0qcq22*nM#CO6b7W@IxI6TmHW14iZQe9m*Xl7hoOReC7f<6bKL^OpA zx52p!Mxrd=oTH3=Ls_UbU>92gCeCW%mF)cM4|f0t==ZI zCf^l~m@F--F?p`26+b&eDNr9sWgQiWDht diff --git a/src/Managing.Web3Proxy/bun.lock b/src/Managing.Web3Proxy/bun.lock index d9e48501..8b7ec2e7 100644 --- a/src/Managing.Web3Proxy/bun.lock +++ b/src/Managing.Web3Proxy/bun.lock @@ -19,6 +19,7 @@ "@fastify/swagger-ui": "^5.0.1", "@fastify/type-provider-typebox": "^5.0.0", "@fastify/under-pressure": "^9.0.1", + "@gelatonetwork/relay-sdk": "^5.6.0", "@infisical/sdk": "^4.0.6", "@privy-io/server-auth": "^1.18.12", "@sentry/node": "^8.55.0", @@ -26,6 +27,7 @@ "canonicalize": "^2.0.0", "concurrently": "^9.2.1", "cross-fetch": "^4.1.0", + "crypto-js": "^4.2.0", "csv-stringify": "^6.5.2", "ethers": "^6.13.5", "fastify": "^5.0.0", @@ -252,6 +254,8 @@ "@fastify/under-pressure": ["@fastify/under-pressure@9.0.3", "", { "dependencies": { "@fastify/error": "^4.0.0", "fastify-plugin": "^5.0.0" } }, "sha512-uWzyFn9ThgGgynxyoX/kqgLtPtNBXXvQgN3U8fSRPNBS1y5mEZC/uCBRx03hXm9PDsQwTGN7qt83ItsHVQ0L4A=="], + "@gelatonetwork/relay-sdk": ["@gelatonetwork/relay-sdk@5.6.0", "", { "dependencies": { "axios": "0.29.0", "ethers": "6.7.0", "isomorphic-ws": "^5.0.0", "ws": "^8.18.0" } }, "sha512-pSXE9xdPj6wmdcmoT7ETlbEjpvQvyFIZT1CoyzcUEupPplugm59ieUiX5E41oLeByQ7M1dliq2b96d/iIIA3kw=="], + "@hpke/chacha20poly1305": ["@hpke/chacha20poly1305@1.7.1", "", { "dependencies": { "@hpke/common": "^1.8.1" } }, "sha512-Zp8IwRIkdCucu877wCNqDp3B8yOhAnAah/YDDkO94pPr/KKV7IGnBbpwIjDB3BsAySWBMrhhdE0JKYw3N4FCag=="], "@hpke/common": ["@hpke/common@1.8.1", "", {}, "sha512-PSI4QSxH8XDli0TqAsWycVfrLLCM/bBe+hVlJwtuJJiKIvCaFS3CXX/WtRfJceLJye9NHc2J7GvHVCY9B1BEbA=="], @@ -294,6 +298,8 @@ "@noble/hashes": ["@noble/hashes@1.8.0", "", {}, "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A=="], + "@noble/secp256k1": ["@noble/secp256k1@1.7.1", "", {}, "sha512-hOUk6AyBFmqVrv7k5WAw/LpszxVbj9gGN4JRkIX52fdFAj1UA61KXmZDvqVEm+pOyec3+fIeZB02LYa/pWOArw=="], + "@nolyfill/is-core-module": ["@nolyfill/is-core-module@1.0.39", "", {}, "sha512-nn5ozdjYQpUCZlWGuxcJY/KpxkWQs4DcbMCmKojjyrYDEAGy4Ce19NN4v5MduafTwJlbKc99UA8YhSVqq9yPZA=="], "@opentelemetry/api": ["@opentelemetry/api@1.9.0", "", {}, "sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg=="], @@ -696,7 +702,7 @@ "aws-ssl-profiles": ["aws-ssl-profiles@1.1.2", "", {}, "sha512-NZKeq9AfyQvEeNlN0zSYAaWrmBffJh3IELMZfRpJVWgrpEbtEpnjvzqBPf+mxoI287JohRDoa+/nsfqqiZmF6g=="], - "axios": ["axios@1.13.2", "", { "dependencies": { "follow-redirects": "^1.15.6", "form-data": "^4.0.4", "proxy-from-env": "^1.1.0" } }, "sha512-VPk9ebNqPcy5lRGuSlKx752IlDatOjT9paPlm8A7yOuW2Fbvp4X3JznJtT4f0GzGLLiWE9W8onz51SqLYwzGaA=="], + "axios": ["axios@0.29.0", "", { "dependencies": { "follow-redirects": "^1.15.4", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" } }, "sha512-Kjsq1xisgO5DjjNQwZFsy0gpcU1P2j36dZeQDXVhpIU26GVgkDUnROaHLSuluhMqtDE7aKA2hbKXG5yu5DN8Tg=="], "balanced-match": ["balanced-match@1.0.2", "", {}, "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="], @@ -778,6 +784,8 @@ "cross-spawn": ["cross-spawn@7.0.6", "", { "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", "which": "^2.0.1" } }, "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA=="], + "crypto-js": ["crypto-js@4.2.0", "", {}, "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q=="], + "csv-stringify": ["csv-stringify@6.6.0", "", {}, "sha512-YW32lKOmIBgbxtu3g5SaiqWNwa/9ISQt2EcgOq0+RAIFufFp9is6tqNnKahqE5kuKvrnYAzs28r+s6pXJR8Vcw=="], "data-view-buffer": ["data-view-buffer@1.0.2", "", { "dependencies": { "call-bound": "^1.0.3", "es-errors": "^1.3.0", "is-data-view": "^1.0.2" } }, "sha512-EmKO5V3OLXh1rtK2wgXRansaK1/mtVdTUEiEI0W8RkvgT05kfxaH29PliLnpLP73yYO6142Q72QNa8Wx/A5CqQ=="], @@ -1110,7 +1118,7 @@ "isexe": ["isexe@2.0.0", "", {}, "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw=="], - "isomorphic-ws": ["isomorphic-ws@4.0.1", "", { "peerDependencies": { "ws": "*" } }, "sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w=="], + "isomorphic-ws": ["isomorphic-ws@5.0.0", "", { "peerDependencies": { "ws": "*" } }, "sha512-muId7Zzn9ywDsyXgTIafTry2sV3nySZeUDe6YedVd1Hvuuep5AsIlqK+XefWpYTyJG5e503F2xIuT2lcU6rCSw=="], "isows": ["isows@1.0.7", "", { "peerDependencies": { "ws": "*" } }, "sha512-I1fSfDCZL5P0v33sVqeTDSpcstAg/N+wF5HS033mogOVIp4B+oHC7oOCsA3axAbBSGTJ8QubbNmnIRN/h8U7hg=="], @@ -1586,7 +1594,7 @@ "wrappy": ["wrappy@1.0.2", "", {}, "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="], - "ws": ["ws@8.17.1", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ=="], + "ws": ["ws@8.18.3", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg=="], "xtend": ["xtend@4.0.2", "", {}, "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ=="], @@ -1756,6 +1764,10 @@ "@fastify/ajv-compiler/ajv": ["ajv@8.17.1", "", { "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", "json-schema-traverse": "^1.0.0", "require-from-string": "^2.0.2" } }, "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g=="], + "@gelatonetwork/relay-sdk/ethers": ["ethers@6.7.0", "", { "dependencies": { "@adraffy/ens-normalize": "1.9.2", "@noble/hashes": "1.1.2", "@noble/secp256k1": "1.7.1", "@types/node": "18.15.13", "aes-js": "4.0.0-beta.5", "tslib": "2.4.0", "ws": "8.5.0" } }, "sha512-pxt5hK82RNwcTX2gOZP81t6qVPVspnkpeivwEgQuK9XUvbNtghBnT8GNIb/gPh+WnVSfi8cXC9XlfT8sqc6D6w=="], + + "@infisical/sdk/axios": ["axios@1.13.2", "", { "dependencies": { "follow-redirects": "^1.15.6", "form-data": "^4.0.4", "proxy-from-env": "^1.1.0" } }, "sha512-VPk9ebNqPcy5lRGuSlKx752IlDatOjT9paPlm8A7yOuW2Fbvp4X3JznJtT4f0GzGLLiWE9W8onz51SqLYwzGaA=="], + "@isaacs/cliui/string-width": ["string-width@5.1.2", "", { "dependencies": { "eastasianwidth": "^0.2.0", "emoji-regex": "^9.2.2", "strip-ansi": "^7.0.1" } }, "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA=="], "@isaacs/cliui/strip-ansi": ["strip-ansi@7.1.2", "", { "dependencies": { "ansi-regex": "^6.0.1" } }, "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA=="], @@ -1934,6 +1946,8 @@ "ethers/@types/node": ["@types/node@22.7.5", "", { "dependencies": { "undici-types": "~6.19.2" } }, "sha512-jML7s2NAzMWc//QSJ1a3prpk78cOPchGvXJsC3C6R6PSMoooztvRVQEz89gmBTBY1SPMaqo5teB4uNHPdetShQ=="], + "ethers/ws": ["ws@8.17.1", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ=="], + "fast-json-stringify/ajv": ["ajv@8.17.1", "", { "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", "json-schema-traverse": "^1.0.0", "require-from-string": "^2.0.2" } }, "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g=="], "fastify-cli/yargs-parser": ["yargs-parser@22.0.0", "", {}, "sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw=="], @@ -1950,6 +1964,8 @@ "jayson/commander": ["commander@2.20.3", "", {}, "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ=="], + "jayson/isomorphic-ws": ["isomorphic-ws@4.0.1", "", { "peerDependencies": { "ws": "*" } }, "sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w=="], + "jayson/uuid": ["uuid@8.3.2", "", { "bin": { "uuid": "dist/bin/uuid" } }, "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg=="], "jayson/ws": ["ws@7.5.10", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": "^5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ=="], @@ -1980,16 +1996,12 @@ "rpc-websockets/uuid": ["uuid@8.3.2", "", { "bin": { "uuid": "dist/bin/uuid" } }, "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg=="], - "rpc-websockets/ws": ["ws@8.18.3", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg=="], - "test-exclude/glob": ["glob@10.5.0", "", { "dependencies": { "foreground-child": "^3.1.0", "jackspeak": "^3.1.2", "minimatch": "^9.0.4", "minipass": "^7.1.2", "package-json-from-dist": "^1.0.0", "path-scurry": "^1.11.1" }, "bin": { "glob": "dist/esm/bin.mjs" } }, "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg=="], "test-exclude/minimatch": ["minimatch@9.0.5", "", { "dependencies": { "brace-expansion": "^2.0.1" } }, "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow=="], "type-is/mime-types": ["mime-types@3.0.2", "", { "dependencies": { "mime-db": "^1.54.0" } }, "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A=="], - "viem/ws": ["ws@8.18.3", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg=="], - "vite/esbuild": ["esbuild@0.25.12", "", { "optionalDependencies": { "@esbuild/aix-ppc64": "0.25.12", "@esbuild/android-arm": "0.25.12", "@esbuild/android-arm64": "0.25.12", "@esbuild/android-x64": "0.25.12", "@esbuild/darwin-arm64": "0.25.12", "@esbuild/darwin-x64": "0.25.12", "@esbuild/freebsd-arm64": "0.25.12", "@esbuild/freebsd-x64": "0.25.12", "@esbuild/linux-arm": "0.25.12", "@esbuild/linux-arm64": "0.25.12", "@esbuild/linux-ia32": "0.25.12", "@esbuild/linux-loong64": "0.25.12", "@esbuild/linux-mips64el": "0.25.12", "@esbuild/linux-ppc64": "0.25.12", "@esbuild/linux-riscv64": "0.25.12", "@esbuild/linux-s390x": "0.25.12", "@esbuild/linux-x64": "0.25.12", "@esbuild/netbsd-arm64": "0.25.12", "@esbuild/netbsd-x64": "0.25.12", "@esbuild/openbsd-arm64": "0.25.12", "@esbuild/openbsd-x64": "0.25.12", "@esbuild/openharmony-arm64": "0.25.12", "@esbuild/sunos-x64": "0.25.12", "@esbuild/win32-arm64": "0.25.12", "@esbuild/win32-ia32": "0.25.12", "@esbuild/win32-x64": "0.25.12" }, "bin": { "esbuild": "bin/esbuild" } }, "sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg=="], "@aws-sdk/client-cognito-identity/@smithy/util-utf8/@smithy/util-buffer-from": ["@smithy/util-buffer-from@3.0.0", "", { "dependencies": { "@smithy/is-array-buffer": "^3.0.0", "tslib": "^2.6.2" } }, "sha512-aEOHCgq5RWFbP+UDPvPot26EJHjOC+bRgse5A8V3FSShqd5E5UN4qc7zkwsvJPPAVsf73QwYcHN1/gt/rtLwQA=="], @@ -2010,6 +2022,16 @@ "@fastify/ajv-compiler/ajv/json-schema-traverse": ["json-schema-traverse@1.0.0", "", {}, "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug=="], + "@gelatonetwork/relay-sdk/ethers/@adraffy/ens-normalize": ["@adraffy/ens-normalize@1.9.2", "", {}, "sha512-0h+FrQDqe2Wn+IIGFkTCd4aAwTJ+7834Ek1COohCyV26AXhwQ7WQaz+4F/nLOeVl/3BtWHOHLPsq46V8YB46Eg=="], + + "@gelatonetwork/relay-sdk/ethers/@noble/hashes": ["@noble/hashes@1.1.2", "", {}, "sha512-KYRCASVTv6aeUi1tsF8/vpyR7zpfs3FUzy2Jqm+MU+LmUKhQ0y2FpfwqkCcxSg2ua4GALJd8k2R76WxwZGbQpA=="], + + "@gelatonetwork/relay-sdk/ethers/@types/node": ["@types/node@18.15.13", "", {}, "sha512-N+0kuo9KgrUQ1Sn/ifDXsvg0TTleP7rIy4zOBGECxAljqvqfqpTfzx0Q1NUedOixRMBfe2Whhb056a42cWs26Q=="], + + "@gelatonetwork/relay-sdk/ethers/tslib": ["tslib@2.4.0", "", {}, "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ=="], + + "@gelatonetwork/relay-sdk/ethers/ws": ["ws@8.5.0", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": "^5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg=="], + "@isaacs/cliui/string-width/emoji-regex": ["emoji-regex@9.2.2", "", {}, "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg=="], "@isaacs/cliui/strip-ansi/ansi-regex": ["ansi-regex@6.2.2", "", {}, "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg=="], diff --git a/src/Managing.Web3Proxy/package.json b/src/Managing.Web3Proxy/package.json index 8c5ea4d1..f23f6f1e 100644 --- a/src/Managing.Web3Proxy/package.json +++ b/src/Managing.Web3Proxy/package.json @@ -43,6 +43,7 @@ "@fastify/swagger-ui": "^5.0.1", "@fastify/type-provider-typebox": "^5.0.0", "@fastify/under-pressure": "^9.0.1", + "@gelatonetwork/relay-sdk": "^5.6.0", "@infisical/sdk": "^4.0.6", "@privy-io/server-auth": "^1.18.12", "@sentry/node": "^8.55.0", @@ -50,6 +51,7 @@ "canonicalize": "^2.0.0", "concurrently": "^9.2.1", "cross-fetch": "^4.1.0", + "crypto-js": "^4.2.0", "csv-stringify": "^6.5.2", "ethers": "^6.13.5", "fastify": "^5.0.0", diff --git a/src/Managing.Web3Proxy/src/.DS_Store b/src/Managing.Web3Proxy/src/.DS_Store index 182df8f1e06ae01bfd70d2aa66028e5854333de1..f273f7b17c9f98d906f50eef2a79a1a248a31d82 100644 GIT binary patch literal 6148 zcmeHK&u`N(6n<{IHeo{Q0VITk6p3p!5`l&gm(Yy^SAyUGs3c3ZMPzZ+r0b!ol>5ft z!kzyE{ufU0J=>GoWQZG^kYDut`N#Vl=W}AmL?p(GG$0xhkppM!-9mDOaXWjyHOfax|vJoq~!S(Y=is(edkc~(}w|3h@Ty`BERahzS}V{{^yQ59E< zavaa!bLowgd2*SLlegJ)IT_wLkVO?|#dNL+Svp0?hj&?#%H>!tinLVRNH;jH>rRIE zSF0e{_eb7S-(QcsRp38+GV=C=$LqE0+j`(fQtB?5J^M7=5Gf?m;6GMQhitfO$`y-D@9-9e`E9Dsa;j;Pt_S zGlm9hjcVyYqK*K-9;%fg&p!do@eGCrYmI1u2~7oRsxU_kq3NjiOk8NN)~M+u%;7_r zI}39{5$f*f-&5fvLX9@H3RnfU73k{XkoW(We?I?jlWfTd;G75JwL{05XCJzu~2NHo}wrt0|NsP3otMgF(fjSFr+f1lm$;LRA*$IT*0ckS%gEF qWn+Ug^JaDqeh#3n&4L`?nJ4p$=yHNI9spv7$u>OFn`1I&Zc84&zg~I4EdCJzu~2NHo}wrt0|NsP3otOGFl46`C+8&P=jTi;RA*$I%*QOVc?xqe r%jN~lZE!`H@ diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/.DS_Store b/src/Managing.Web3Proxy/src/generated/gmxsdk/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..3885ad077a499de9deab52222767ca7104fb34b6 GIT binary patch literal 6148 zcmeHKK~BRk5S$G`3F6Wt7o@zP5 { - const abiDir = path.join(__dirname, ".."); - const abiFiles = fs.readdirSync(abiDir).filter((file) => file.endsWith(".json")); - - it.each(abiFiles)("validates %s doesn't contain metadata or bytecode", (fileName) => { - const filePath = path.join(abiDir, fileName); - const fileContent = JSON.parse(fs.readFileSync(filePath, "utf-8")); - - const abiContent = Array.isArray(fileContent) ? fileContent : fileContent.abi; - - expect(abiContent).toBeDefined(); - expect(Array.isArray(abiContent)).toBe(true); - - const unnecessaryFields = [ - "metadata", - "bytecode", - "deployedBytecode", - "sourceMap", - "deployedSourceMap", - "source", - "ast", - "schemaVersion", - "updatedAt", - ]; - - const foundFields = unnecessaryFields.filter((field) => !isEmptyValue(fileContent[field])); - - expect(foundFields).toHaveLength(0); - }); -}); diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/index.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/index.ts index 00c238c9..544a9100 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/index.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/index.ts @@ -1,151 +1,58 @@ -import {Abi, erc20Abi} from "viem"; +import { erc20Abi } from "viem"; -import ArbitrumNodeInterface from "./ArbitrumNodeInterface.json" with {type: "json"}; -import ClaimHandler from "./ClaimHandler.json" with {type: "json"}; -import CustomErrors from "./CustomErrors.json" with {type: "json"}; -import DataStore from "./DataStore.json" with {type: "json"}; -import ERC20PermitInterface from "./ERC20PermitInterface.json" with {type: "json"}; -import ERC721 from "./ERC721.json" with {type: "json"}; -import EventEmitter from "./EventEmitter.json" with {type: "json"}; -import ExchangeRouter from "./ExchangeRouter.json" with {type: "json"}; -import GelatoRelayRouter from "./GelatoRelayRouter.json" with {type: "json"}; -import GlpManager from "./GlpManager.json" with {type: "json"}; -import GlvReader from "./GlvReader.json" with {type: "json"}; -import GlvRouter from "./GlvRouter.json" with {type: "json"}; -import GMT from "./GMT.json" with {type: "json"}; -import GmxMigrator from "./GmxMigrator.json" with {type: "json"}; -import GovToken from "./GovToken.json" with {type: "json"}; -import LayerZeroProvider from "./LayerZeroProvider.json" with {type: "json"}; -import MintableBaseToken from "./MintableBaseToken.json" with {type: "json"}; -import Multicall from "./Multicall.json" with {type: "json"}; -import MultichainClaimsRouter from "./MultichainClaimsRouter.json" with {type: "json"}; -import MultichainGlvRouter from "./MultichainGlvRouter.json" with {type: "json"}; -import MultichainGmRouter from "./MultichainGmRouter.json" with {type: "json"}; -import MultichainOrderRouter from "./MultichainOrderRouter.json" with {type: "json"}; -import MultichainSubaccountRouter from "./MultichainSubaccountRouter.json" with {type: "json"}; -import MultichainTransferRouter from "./MultichainTransferRouter.json" with {type: "json"}; -import MultichainUtils from "./MultichainUtils.json" with {type: "json"}; -import MultichainVault from "./MultichainVault.json" with {type: "json"}; -import OrderBook from "./OrderBook.json" with {type: "json"}; -import OrderBookReader from "./OrderBookReader.json" with {type: "json"}; -import OrderExecutor from "./OrderExecutor.json" with {type: "json"}; -import PositionManager from "./PositionManager.json" with {type: "json"}; -import PositionRouter from "./PositionRouter.json" with {type: "json"}; -import Reader from "./Reader.json" with {type: "json"}; -import ReaderV2 from "./ReaderV2.json" with {type: "json"}; -import ReferralStorage from "./ReferralStorage.json" with {type: "json"}; -import RelayParams from "./RelayParams.json" with {type: "json"}; -import RewardReader from "./RewardReader.json" with {type: "json"}; -import RewardRouter from "./RewardRouter.json" with {type: "json"}; -import RewardTracker from "./RewardTracker.json" with {type: "json"}; -import RouterV2 from "./Router-v2.json" with {type: "json"}; -import Router from "./Router.json" with {type: "json"}; -import SmartAccount from "./SmartAccount.json" with {type: "json"}; -import StBTC from "./StBTC.json" with {type: "json"}; -import SubaccountGelatoRelayRouter from "./SubaccountGelatoRelayRouter.json" with {type: "json"}; -import SubaccountRouter from "./SubaccountRouter.json" with {type: "json"}; -import SyntheticsReader from "./SyntheticsReader.json" with {type: "json"}; -import SyntheticsRouter from "./SyntheticsRouter.json" with {type: "json"}; -import Timelock from "./Timelock.json" with {type: "json"}; -import Token from "./Token.json" with {type: "json"}; -import Treasury from "./Treasury.json" with {type: "json"}; -import UniPool from "./UniPool.json" with {type: "json"}; -import UniswapV2 from "./UniswapV2.json" with {type: "json"}; -import Vault from "./Vault.json" with {type: "json"}; -import VaultReader from "./VaultReader.json" with {type: "json"}; -import VaultV2 from "./VaultV2.json" with {type: "json"}; -import VaultV2b from "./VaultV2b.json" with {type: "json"}; -import Vester from "./Vester.json" with {type: "json"}; -import WETH from "./WETH.json" with {type: "json"}; -import YieldFarm from "./YieldFarm.json" with {type: "json"}; -import YieldToken from "./YieldToken.json" with {type: "json"}; - -export type AbiId = - | "AbstractSubaccountApprovalNonceable" - | "ArbitrumNodeInterface" - | "ClaimHandler" - | "CustomErrors" - | "DataStore" - | "ERC20" - | "ERC20PermitInterface" - | "ERC20PermitInterface" - | "ERC721" - | "EventEmitter" - | "ExchangeRouter" - | "GelatoRelayRouter" - | "GelatoRelayRouter" - | "GlpManager" - | "GlvReader" - | "GlvRouter" - | "GMT" - | "GmxMigrator" - | "GovToken" - | "LayerZeroProvider" - | "MintableBaseToken" - | "Multicall" - | "MultichainClaimsRouter" - | "MultichainGlvRouter" - | "MultichainGmRouter" - | "MultichainOrderRouter" - | "MultichainSubaccountRouter" - | "MultichainTransferRouter" - | "MultichainUtils" - | "MultichainVault" - | "OrderBook" - | "OrderBookReader" - | "OrderExecutor" - | "PositionManager" - | "PositionRouter" - | "Reader" - | "ReaderV2" - | "ReferralStorage" - | "RelayParams" - | "RewardReader" - | "RewardRouter" - | "RewardTracker" - | "Router" - | "RouterV2" - | "SmartAccount" - | "StBTC" - | "SubaccountGelatoRelayRouter" - | "SubaccountGelatoRelayRouter" - | "SubaccountRouter" - | "SyntheticsReader" - | "SyntheticsRouter" - | "Timelock" - | "Token" - | "Treasury" - | "UniPool" - | "UniswapV2" - | "Vault" - | "VaultReader" - | "VaultV2" - | "VaultV2b" - | "Vester" - | "WETH" - | "YieldFarm" - | "YieldToken"; - -/** Copied from ethers to enable compatibility with GMX UI */ -interface JsonFragmentType { - readonly name?: string; - readonly indexed?: boolean; - readonly type?: string; - readonly internalType?: string; - readonly components?: ReadonlyArray; -} - -interface JsonFragment { - readonly name?: string; - readonly type?: string; - readonly anonymous?: boolean; - readonly payable?: boolean; - readonly constant?: boolean; - readonly stateMutability?: string; - readonly inputs?: ReadonlyArray; - readonly outputs?: ReadonlyArray; - readonly gas?: string; -} +import ArbitrumNodeInterface from "./ArbitrumNodeInterface.js"; +import ClaimHandler from "./ClaimHandler.js"; +import CustomErrors from "./CustomErrors.js"; +import DataStore from "./DataStore.js"; +import ERC20PermitInterface from "./ERC20PermitInterface.js"; +import ERC721 from "./ERC721.js"; +import EventEmitter from "./EventEmitter.js"; +import ExchangeRouter from "./ExchangeRouter.js"; +import GelatoRelayRouter from "./GelatoRelayRouter.js"; +import GlpManager from "./GlpManager.js"; +import GlvReader from "./GlvReader.js"; +import GlvRouter from "./GlvRouter.js"; +import GmxMigrator from "./GmxMigrator.js"; +import GovToken from "./GovToken.js"; +import IStargate from "./IStargate.js"; +import LayerZeroProvider from "./LayerZeroProvider.js"; +import MintableBaseToken from "./MintableBaseToken.js"; +import Multicall from "./Multicall.js"; +import MultichainClaimsRouter from "./MultichainClaimsRouter.js"; +import MultichainGlvRouter from "./MultichainGlvRouter.js"; +import MultichainGmRouter from "./MultichainGmRouter.js"; +import MultichainOrderRouter from "./MultichainOrderRouter.js"; +import MultichainSubaccountRouter from "./MultichainSubaccountRouter.js"; +import MultichainTransferRouter from "./MultichainTransferRouter.js"; +import MultichainVault from "./MultichainVault.js"; +import Reader from "./Reader.js"; +import ReaderV2 from "./ReaderV2.js"; +import ReferralStorage from "./ReferralStorage.js"; +import RelayParams from "./RelayParams.js"; +import RewardReader from "./RewardReader.js"; +import RewardRouter from "./RewardRouter.js"; +import RewardTracker from "./RewardTracker.js"; +import SmartAccount from "./SmartAccount.js"; +import StBTC from "./StBTC.js"; +import SubaccountGelatoRelayRouter from "./SubaccountGelatoRelayRouter.js"; +import SubaccountRouter from "./SubaccountRouter.js"; +import SyntheticsReader from "./SyntheticsReader.js"; +import SyntheticsRouter from "./SyntheticsRouter.js"; +import Timelock from "./Timelock.js"; +import Token from "./Token.js"; +import Treasury from "./Treasury.js"; +import UniPool from "./UniPool.js"; +import UniswapV2 from "./UniswapV2.js"; +import UniswapV3Factory from "./UniswapV3Factory.js"; +import UniswapV3Pool from "./UniswapV3Pool.js"; +import UniswapV3PositionManager from "./UniswapV3PositionManager.js"; +import Vault from "./Vault.js"; +import VaultReader from "./VaultReader.js"; +import VaultV2 from "./VaultV2.js"; +import VaultV2b from "./VaultV2b.js"; +import VenusVToken from "./VenusVToken.js"; +import Vester from "./Vester.js"; +import WETH from "./WETH.js"; const AbstractSubaccountApprovalNonceable = [ { @@ -169,66 +76,62 @@ const AbstractSubaccountApprovalNonceable = [ }, ] as const; -export const abis: Record = { +export const abis = { AbstractSubaccountApprovalNonceable, - ArbitrumNodeInterface: ArbitrumNodeInterface.abi, - ClaimHandler: ClaimHandler.abi, - CustomErrors: CustomErrors.abi, - DataStore: DataStore.abi, + ArbitrumNodeInterface, + ClaimHandler, + CustomErrors, + DataStore, ERC20: erc20Abi, - ERC20PermitInterface: ERC20PermitInterface.abi, - ERC721: ERC721.abi, - EventEmitter: EventEmitter.abi, - ExchangeRouter: ExchangeRouter.abi, - GelatoRelayRouter: GelatoRelayRouter.abi, - GlpManager: GlpManager.abi, - GlvReader: GlvReader.abi, - GlvRouter: GlvRouter.abi, - GMT: GMT.abi, - GmxMigrator: GmxMigrator.abi, - GovToken: GovToken.abi, - LayerZeroProvider: LayerZeroProvider.abi, - MintableBaseToken: MintableBaseToken.abi, - Multicall: Multicall.abi, - MultichainClaimsRouter: MultichainClaimsRouter.abi, - MultichainGlvRouter: MultichainGlvRouter.abi, - MultichainGmRouter: MultichainGmRouter.abi, - MultichainOrderRouter: MultichainOrderRouter.abi, - MultichainSubaccountRouter: MultichainSubaccountRouter.abi, - MultichainTransferRouter: MultichainTransferRouter.abi, - MultichainUtils: MultichainUtils.abi, - MultichainVault: MultichainVault.abi, - OrderBook: OrderBook.abi, - OrderBookReader: OrderBookReader.abi, - OrderExecutor: OrderExecutor.abi, - PositionManager: PositionManager.abi, - PositionRouter: PositionRouter.abi, - Reader: Reader.abi, - ReaderV2: ReaderV2.abi, - ReferralStorage: ReferralStorage.abi, - RelayParams: RelayParams.abi, - RewardReader: RewardReader.abi, - RewardRouter: RewardRouter.abi, - RewardTracker: RewardTracker.abi, - Router: Router.abi, - RouterV2: RouterV2.abi, - SmartAccount: SmartAccount.abi, - StBTC: StBTC.abi, - SubaccountGelatoRelayRouter: SubaccountGelatoRelayRouter.abi, - SubaccountRouter: SubaccountRouter.abi, - SyntheticsReader: SyntheticsReader.abi, - SyntheticsRouter: SyntheticsRouter.abi, - Timelock: Timelock.abi, - Token: Token.abi, - Treasury: Treasury.abi, - UniPool: UniPool.abi, - UniswapV2: UniswapV2.abi, - Vault: Vault.abi, - VaultReader: VaultReader.abi, - VaultV2: VaultV2.abi, - VaultV2b: VaultV2b.abi, - Vester: Vester.abi, - WETH: WETH.abi, - YieldFarm: YieldFarm.abi, - YieldToken: YieldToken.abi, -} satisfies Record as any; + ERC20PermitInterface, + ERC721: ERC721, + EventEmitter, + ExchangeRouter, + GelatoRelayRouter, + GlpManager, + GlvReader, + GlvRouter, + GmxMigrator, + GovToken, + LayerZeroProvider, + MintableBaseToken, + Multicall, + MultichainClaimsRouter, + MultichainGlvRouter, + MultichainGmRouter, + MultichainOrderRouter, + MultichainSubaccountRouter, + MultichainTransferRouter, + MultichainVault, + ReferralStorage, + RelayParams, + RewardReader, + RewardRouter, + RewardTracker, + SmartAccount, + StBTC, + SubaccountGelatoRelayRouter, + SubaccountRouter, + SyntheticsReader, + SyntheticsRouter, + Timelock, + Token, + Reader, + ReaderV2, + Treasury, + UniPool, + UniswapV2, + UniswapV3Factory, + UniswapV3Pool, + UniswapV3PositionManager, + Vault, + VaultReader, + VaultV2, + VaultV2b, + VenusVToken, + Vester, + WETH, + IStargate, +} satisfies Record; + +export type AbiId = keyof typeof abis; diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/configs/batch.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/configs/batch.ts index 9395de7b..59971381 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/configs/batch.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/configs/batch.ts @@ -1,8 +1,20 @@ -import {ClientConfig, MulticallBatchOptions} from "viem"; -import {ARBITRUM, AVALANCHE, AVALANCHE_FUJI} from "./chains.js"; +import { ClientConfig, MulticallBatchOptions } from "viem"; + +import { + AnyChainId, + ARBITRUM, + ARBITRUM_SEPOLIA, + AVALANCHE, + AVALANCHE_FUJI, + BOTANIX, + SOURCE_BASE_MAINNET, + SOURCE_BSC_MAINNET, + SOURCE_OPTIMISM_SEPOLIA, + SOURCE_SEPOLIA, +} from "./chains.js"; export const BATCH_CONFIGS: Record< - number, + AnyChainId, { http: MulticallBatchOptions; client: ClientConfig["batch"]; @@ -10,8 +22,8 @@ export const BATCH_CONFIGS: Record< > = { [ARBITRUM]: { http: { - batchSize: 10, // Enable batching with up to 10 eth_calls per batch - wait: 16, // 16ms wait time to allow batching + batchSize: 0, // disable batches, here batchSize is the number of eth_calls in a batch + wait: 0, // keep this setting in case batches are enabled in future }, client: { multicall: { @@ -32,6 +44,32 @@ export const BATCH_CONFIGS: Record< }, }, }, + + [SOURCE_BASE_MAINNET]: { + http: { + batchSize: 0, + wait: 0, + }, + client: { + multicall: { + batchSize: 1024 * 1024, + wait: 0, + }, + }, + }, + [SOURCE_BSC_MAINNET]: { + http: { + batchSize: 0, + wait: 0, + }, + client: { + multicall: { + batchSize: 1024 * 1024, + wait: 0, + }, + }, + }, + [AVALANCHE_FUJI]: { http: { batchSize: 40, @@ -44,4 +82,54 @@ export const BATCH_CONFIGS: Record< }, }, }, + [BOTANIX]: { + http: { + batchSize: 0, + wait: 0, + }, + client: { + multicall: { + batchSize: 1024 * 1024, + wait: 0, + }, + }, + }, + [ARBITRUM_SEPOLIA]: { + http: { + batchSize: 40, + wait: 100, + }, + client: { + multicall: { + batchSize: 1024 * 1024, + wait: 100, + }, + }, + }, + [SOURCE_OPTIMISM_SEPOLIA]: { + http: { + batchSize: 40, + wait: 100, + }, + client: { + multicall: { + batchSize: 1024 * 1024, + wait: 100, + }, + }, + }, + [SOURCE_SEPOLIA]: { + http: { + batchSize: 40, + wait: 100, + }, + client: { + multicall: { + batchSize: 1024 * 1024, + wait: 100, + }, + }, + }, }; + +export const SUBSQUID_PAGINATION_LIMIT = 500; diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/configs/chainIds.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/configs/chainIds.ts new file mode 100644 index 00000000..e0eb96b7 --- /dev/null +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/configs/chainIds.ts @@ -0,0 +1,14 @@ +export const ETH_MAINNET = 1; +// Production +export const AVALANCHE = 43114; +export const ARBITRUM = 42161; +export const BOTANIX = 3637; +// Production source +export const SOURCE_BASE_MAINNET = 8453; +export const SOURCE_BSC_MAINNET = 56; +// Testnets +export const AVALANCHE_FUJI = 43113; +export const ARBITRUM_SEPOLIA = 421614; +// Testnet source +export const SOURCE_OPTIMISM_SEPOLIA = 11155420; +export const SOURCE_SEPOLIA = 11155111; diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/configs/chains.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/configs/chains.ts index edf98d86..966e3be3 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/configs/chains.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/configs/chains.ts @@ -1,21 +1,42 @@ -import {arbitrum, arbitrumSepolia, avalanche, avalancheFuji, base, Chain, optimismSepolia, sepolia} from "viem/chains"; -import {defineChain} from "viem/utils"; -import {GasLimitsConfig} from "../types/fees"; +import { defineChain } from "viem"; +import { + arbitrum, + arbitrumSepolia, + avalanche, + avalancheFuji, + base, + Chain, + optimismSepolia, + sepolia, + bsc, +} from "viem/chains"; -export const ETH_MAINNET = 1; -// Production -export const AVALANCHE = 43114; -export const ARBITRUM = 42161; -export const BOTANIX = 3637; -export const BASE = 8453; -// Production source -export const SOURCE_BASE_MAINNET = 8453; -// Testnets -export const AVALANCHE_FUJI = 43113; -export const ARBITRUM_SEPOLIA = 421614; -// Testnet source -export const SOURCE_OPTIMISM_SEPOLIA = 11155420; -export const SOURCE_SEPOLIA = 11155111; +import type { GasLimitsConfig } from "../types/fees.js"; + +import { + AVALANCHE, + AVALANCHE_FUJI, + ARBITRUM, + BOTANIX, + ETH_MAINNET, + ARBITRUM_SEPOLIA, + SOURCE_OPTIMISM_SEPOLIA, + SOURCE_SEPOLIA, + SOURCE_BASE_MAINNET, + SOURCE_BSC_MAINNET, +} from "./chainIds.js"; +export { + AVALANCHE, + AVALANCHE_FUJI, + ARBITRUM, + BOTANIX, + ETH_MAINNET, + ARBITRUM_SEPOLIA, + SOURCE_OPTIMISM_SEPOLIA, + SOURCE_SEPOLIA, + SOURCE_BASE_MAINNET, + SOURCE_BSC_MAINNET, +}; export const CONTRACTS_CHAIN_IDS: ContractsChainId[] = [ARBITRUM, AVALANCHE, BOTANIX]; export const CONTRACTS_CHAIN_IDS_DEV: ContractsChainId[] = [...CONTRACTS_CHAIN_IDS, AVALANCHE_FUJI, ARBITRUM_SEPOLIA]; @@ -26,9 +47,16 @@ export type ContractsChainId = | typeof AVALANCHE_FUJI | typeof BOTANIX | typeof ARBITRUM_SEPOLIA; +export type ContractsChainIdProduction = Exclude; +export const GMX_ACCOUNT_PSEUDO_CHAIN_ID = 0; +export type GmxAccountPseudoChainId = typeof GMX_ACCOUNT_PSEUDO_CHAIN_ID; 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 SourceChainId = + | typeof SOURCE_OPTIMISM_SEPOLIA + | typeof SOURCE_SEPOLIA + | typeof SOURCE_BASE_MAINNET + | typeof SOURCE_BSC_MAINNET; export type AnyChainId = ContractsChainId | SettlementChainId | SourceChainId; export type ChainName = @@ -39,7 +67,8 @@ export type ChainName = | "Optimism Sepolia" | "Sepolia" | "Botanix" - | "Base"; + | "Base" + | "BNB"; export const CHAIN_NAMES_MAP: Record = { [ARBITRUM]: "Arbitrum", @@ -50,6 +79,15 @@ export const CHAIN_NAMES_MAP: Record = { [SOURCE_OPTIMISM_SEPOLIA]: "Optimism Sepolia", [SOURCE_SEPOLIA]: "Sepolia", [SOURCE_BASE_MAINNET]: "Base", + [SOURCE_BSC_MAINNET]: "BNB", +}; + +export const CHAIN_SLUGS_MAP: Record = { + [ARBITRUM]: "arbitrum", + [AVALANCHE]: "avalanche", + [AVALANCHE_FUJI]: "fuji", + [ARBITRUM_SEPOLIA]: "arbitrum-sepolia", + [BOTANIX]: "botanix", }; export const HIGH_EXECUTION_FEES_MAP: Record = { @@ -155,7 +193,7 @@ export const botanix: Chain = defineChain({ }, }); -const VIEM_CHAIN_BY_CHAIN_ID: Record = { +export const VIEM_CHAIN_BY_CHAIN_ID: Record = { [AVALANCHE_FUJI]: avalancheFuji, [ARBITRUM]: arbitrum, [AVALANCHE]: avalanche, @@ -164,6 +202,7 @@ const VIEM_CHAIN_BY_CHAIN_ID: Record = { [SOURCE_OPTIMISM_SEPOLIA]: optimismSepolia, [SOURCE_SEPOLIA]: sepolia, [SOURCE_BASE_MAINNET]: base, + [SOURCE_BSC_MAINNET]: bsc, }; export function getChainName(chainId: number): ChainName { @@ -186,6 +225,10 @@ export function isContractsChain(chainId: number, dev = false): chainId is Contr return (dev ? CONTRACTS_CHAIN_IDS_DEV : CONTRACTS_CHAIN_IDS).includes(chainId as ContractsChainId); } +export function isTestnetChain(chainId: number): boolean { + return [AVALANCHE_FUJI, ARBITRUM_SEPOLIA, SOURCE_SEPOLIA, SOURCE_OPTIMISM_SEPOLIA].includes(chainId); +} + export const EXECUTION_FEE_CONFIG_V2: { [chainId in ContractsChainId]: { shouldUseMaxPriorityFeePerGas: boolean; diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/configs/contracts.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/configs/contracts.ts index 385f3915..59158907 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/configs/contracts.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/configs/contracts.ts @@ -1,12 +1,11 @@ -import {type Address, zeroAddress} from "viem"; -import {ARBITRUM, ARBITRUM_SEPOLIA, AVALANCHE, AVALANCHE_FUJI, BOTANIX, ContractsChainId} from "./chains.js"; +import { type Address, zeroAddress } from "viem"; +import { ARBITRUM, ARBITRUM_SEPOLIA, AVALANCHE, AVALANCHE_FUJI, BOTANIX, ContractsChainId } from "./chains.js"; export const CONTRACTS = { [ARBITRUM]: { // V1 Vault: "0x489ee077994B6658eAfA855C308275EAd8097C4A", - Router: "0xaBBc5F99639c9B6bCb58544ddf04EFA6802F4064", VaultReader: "0xfebB9f4CAC4cD523598fE1C5771181440143F24A", Reader: "0x2b43c90D1B727cEe1Df34925bcd5Ace52Ec37694", GlpManager: "0x3963FfC9dff443c2A94f21b129D429891E32ec18", @@ -35,48 +34,41 @@ export const CONTRACTS = { GlpVester: "0xA75287d2f8b217273E7FCD7E86eF07D33972042E", AffiliateVester: "0x7c100c0F55A15221A4c1C5a25Db8C98A81df49B2", - OrderBook: "0x09f77E8A13De9a35a7231028187e9fD5DB8a2ACB", - OrderExecutor: "0x7257ac5D0a0aaC04AA7bA2AC0A6Eb742E332c3fB", - OrderBookReader: "0xa27C20A7CF0e1C68C0460706bB674f98F362Bc21", - PositionRouter: "0xb87a436B93fFE9D75c5cFA7bAcFff96430b09868", - PositionManager: "0x75E42e6f01baf1D6022bEa862A28774a9f8a4A0C", UniswapGmxEthPool: "0x80A9ae39310abf666A87C743d6ebBD0E8C42158E", ReferralStorage: "0xe6fab3f0c7199b0d34d7fbe83394fc0e0d06e99d", - ReferralReader: "0x8Aa382760BCdCe8644C33e6C2D52f6304A76F5c8", - Timelock: "0xaa50bD556CE0Fe61D4A57718BA43177a3aB6A597", // Synthetics DataStore: "0xFD70de6b91282D8017aA4E741e9Ae325CAb992d8", EventEmitter: "0xC8ee91A54287DB53897056e12D9819156D3822Fb", - SubaccountRouter: "0x5b9A353F18d543B9F8a57B2AE50a4FBc80033EC1", - ExchangeRouter: "0x87d66368cD08a7Ca42252f5ab44B2fb6d1Fb8d15", + SubaccountRouter: "0xdD00F639725E19a209880A44962Bc93b51B1B161", + ExchangeRouter: "0x1C3fa76e6E1088bCE750f23a5BFcffa1efEF6A41", DepositVault: "0xF89e77e8Dc11691C9e8757e84aaFbCD8A67d7A55", WithdrawalVault: "0x0628D46b5D145f183AdB6Ef1f2c97eD1C4701C55", OrderVault: "0x31eF83a530Fde1B38EE9A18093A333D8Bbbc40D5", ShiftVault: "0xfe99609C4AA83ff6816b64563Bdffd7fa68753Ab", - SyntheticsReader: "0x65A6CC451BAfF7e7B4FDAb4157763aB4b6b44D0E", + SyntheticsReader: "0x470fbC46bcC0f16532691Df360A07d8Bf5ee0789", SyntheticsRouter: "0x7452c558d45f8afC8c83dAe62C3f8A5BE19c71f6", - GlvReader: "0xb51e34dc3A7c80E4ABbC3800aD0e487b7b878339", - GlvRouter: "0x10Fa5Bd343373101654E896B43Ca38Fd8f3789F9", + GlvReader: "0x2C670A23f1E798184647288072e84054938B5497", + GlvRouter: "0x7EAdEE2ca1b4D06a0d82fDF03D715550c26AA12F", GlvVault: "0x393053B58f9678C9c28c2cE941fF6cac49C3F8f9", - GelatoRelayRouter: "0x0C08518C41755C6907135266dCCf09d51aE53CC4", - SubaccountGelatoRelayRouter: "0xA1D94802EcD642051B677dBF37c8E78ce6dd3784", + GelatoRelayRouter: "0xa9090E2fd6cD8Ee397cF3106189A7E1CFAE6C59C", + SubaccountGelatoRelayRouter: "0x517602BaC704B72993997820981603f5E4901273", - MultichainClaimsRouter: "0x2A7244EE5373D2F161cE99F0D144c12860D651Af", - MultichainGlvRouter: "0xFdaFa6fbd4B480017FD37205Cb3A24AE93823956", - MultichainGmRouter: "0xF53e30CE07f148fdE6e531Be7dC0b6ad670E8C6e", - MultichainOrderRouter: "0x3c796504d47013Ea0552CCa57373B59DF03D34a0", - MultichainSubaccountRouter: "0x99CD306B777C5aAb842bA65e4f7FF0554ECDe808", - MultichainTransferRouter: "0xC1D1354A948bf717d6d873e5c0bE614359AF954D", + MultichainClaimsRouter: "0x277B4c0e8A76Fa927C9881967a4475Fd6E234e95", + MultichainGlvRouter: "0xabcBbe23BD8E0dDD344Ff5fd1439b785B828cD2d", + MultichainGmRouter: "0xC6782854A8639cC3b40f9497797d6B33797CA592", + MultichainOrderRouter: "0xD38111f8aF1A7Cd809457C8A2303e15aE2170724", + MultichainSubaccountRouter: "0x70AaAd50d53732b2D5534bb57332D00aE20cAd36", + MultichainTransferRouter: "0xfaBEb65bB877600be3A2C2a03aA56a95F9f845B9", MultichainVault: "0xCeaadFAf6A8C489B250e407987877c5fDfcDBE6E", - LayerZeroProvider: "0x7129Ea01F0826c705d6F7ab01Cf3C06bb83E9397", + LayerZeroProvider: "0xB6DE222dAef5029f31b8fABE498D34f3c491Ef85", ChainlinkPriceFeedProvider: "0x38B8dB61b724b51e42A88Cb8eC564CD685a0f53B", - ClaimHandler: "0x28f1F4AA95F49FAB62464536A269437B13d48976", + ClaimHandler: "0x8a83F2a71A53d3860a60C9F2E68AB2C46Ff9624e", // External ExternalHandler: "0x389CEf541397e872dC04421f166B5Bc2E0b374a5", @@ -89,7 +81,6 @@ export const CONTRACTS = { [AVALANCHE]: { // V1 Vault: "0x9ab2De34A33fB459b538c43f251eB825645e8595", - Router: "0x5F719c2F1095F7B9fc68a68e35B51194f4b6abe8", VaultReader: "0x66eC8fc33A26feAEAe156afA3Cb46923651F6f0D", Reader: "0x2eFEE1950ededC65De687b40Fd30a7B5f4544aBd", GlpManager: "0xD152c7F25db7F4B95b7658323c5F33d176818EE4", @@ -119,48 +110,41 @@ export const CONTRACTS = { GlpVester: "0x62331A7Bd1dfB3A7642B7db50B5509E57CA3154A", AffiliateVester: "0x754eC029EF9926184b4CFDeA7756FbBAE7f326f7", - OrderBook: "0x4296e307f108B2f583FF2F7B7270ee7831574Ae5", - OrderExecutor: "0x4296e307f108B2f583FF2F7B7270ee7831574Ae5", - OrderBookReader: "0xccFE3E576f8145403d3ce8f3c2f6519Dae40683B", - PositionRouter: "0xffF6D276Bc37c61A23f06410Dce4A400f66420f8", - PositionManager: "0xA21B83E579f4315951bA658654c371520BDcB866", TraderJoeGmxAvaxPool: "0x0c91a070f862666bbcce281346be45766d874d98", ReferralStorage: "0x827ed045002ecdabeb6e2b0d1604cf5fc3d322f8", - ReferralReader: "0x505Ce16D3017be7D76a7C2631C0590E71A975083", - Timelock: "0x8A68a039D555599Fd745f9343e8dE20C9eaFca75", // Synthetics DataStore: "0x2F0b22339414ADeD7D5F06f9D604c7fF5b2fe3f6", EventEmitter: "0xDb17B211c34240B014ab6d61d4A31FA0C0e20c26", - SubaccountRouter: "0x88a5c6D94634Abd7745f5348e5D8C42868ed4AC3", - ExchangeRouter: "0xF0864BE1C39C0AB28a8f1918BC8321beF8F7C317", + SubaccountRouter: "0xf43F559774d2cF7882e6E846fCb87BDe183a6Da7", + ExchangeRouter: "0x8f550E53DFe96C055D5Bdb267c21F268fCAF63B2", DepositVault: "0x90c670825d0C62ede1c5ee9571d6d9a17A722DFF", WithdrawalVault: "0xf5F30B10141E1F63FC11eD772931A8294a591996", OrderVault: "0xD3D60D22d415aD43b7e64b510D86A30f19B1B12C", ShiftVault: "0x7fC46CCb386e9bbBFB49A2639002734C3Ec52b39", - SyntheticsReader: "0x1EC018d2b6ACCA20a0bEDb86450b7E27D1D8355B", + SyntheticsReader: "0x62Cb8740E6986B29dC671B2EB596676f60590A5B", SyntheticsRouter: "0x820F5FfC5b525cD4d88Cd91aCf2c28F16530Cc68", - GlvReader: "0x12Ac77003B3D11b0853d1FD12E5AF22a9060eC4b", - GlvRouter: "0x4729D9f61c0159F5e02D2C2e5937B3225e55442C", + GlvReader: "0x5C6905A3002f989E1625910ba1793d40a031f947", + GlvRouter: "0x7E425c47b2Ff0bE67228c842B9C792D0BCe58ae6", GlvVault: "0x527FB0bCfF63C47761039bB386cFE181A92a4701", - GelatoRelayRouter: "0xa61f92ab63cc5C3d60574d40A6e73861c37aaC95", - SubaccountGelatoRelayRouter: "0x58b09FD12863218F2ca156808C2Ae48aaCD0c072", + GelatoRelayRouter: "0xEE2d3339CbcE7A42573C96ACc1298A79a5C996Df", + SubaccountGelatoRelayRouter: "0xfaBEb65bB877600be3A2C2a03aA56a95F9f845B9", - MultichainClaimsRouter: "0x9080f8A35Da53F4200a68533FB1dC1cA05357bDB", - MultichainGlvRouter: "0x2A7244EE5373D2F161cE99F0D144c12860D651Af", - MultichainGmRouter: "0x10Fa5Bd343373101654E896B43Ca38Fd8f3789F9", - MultichainOrderRouter: "0x99CD306B777C5aAb842bA65e4f7FF0554ECDe808", - MultichainSubaccountRouter: "0xB36a4c6cDeDea3f31b3d16F33553F93b96b178F4", - MultichainTransferRouter: "0x8c6e20A2211D1b70cD7c0789EcE44fDB19567621", + MultichainClaimsRouter: "0xd10B10b816030347ff4E6767d340371B40b9F03D", + MultichainGlvRouter: "0xEEE61742bC4cf361c60Cd65826864560Bf2D0bB6", + MultichainGmRouter: "0xA191Bc0B72332e4c2022dB50a9d619079cc6c4fD", + MultichainOrderRouter: "0xd099565957046a2d2CF41B0CC9F95e14a8afD13b", + MultichainSubaccountRouter: "0x5872E84e5ea23292b40183BE86D25fb428621fC1", + MultichainTransferRouter: "0x5A44a3b026d50EC039582fDb3aFDD88e2092E211", MultichainVault: "0x6D5F3c723002847B009D07Fe8e17d6958F153E4e", - LayerZeroProvider: "0xA1D94802EcD642051B677dBF37c8E78ce6dd3784", + LayerZeroProvider: "0xF85Fd576bBe22Bce785B68922C1c9849d62737c0", ChainlinkPriceFeedProvider: "0x05d97cee050bfb81FB3EaD4A9368584F8e72C88e", - ClaimHandler: "0x7FfedCAC2eCb2C29dDc027B60D6F8107295Ff2eA", + ClaimHandler: "0xefCAdA759241D10B45d9Cb6265B19ADec97ceced", // External ExternalHandler: "0xD149573a098223a9185433290a5A5CDbFa54a8A9", @@ -174,34 +158,34 @@ export const CONTRACTS = { // Synthetics DataStore: "0xA23B81a89Ab9D7D89fF8fc1b5d8508fB75Cc094d", EventEmitter: "0xAf2E131d483cedE068e21a9228aD91E623a989C2", - SubaccountRouter: "0x11E590f6092D557bF71BaDEd50D81521674F8275", - ExchangeRouter: "0x72fa3978E2E330C7B2debc23CB676A3ae63333F6", + SubaccountRouter: "0xa1793126B6Dc2f7F254a6c0E2F8013D2180C0D10", + ExchangeRouter: "0xBCB5eA3a84886Ce45FBBf09eBF0e883071cB2Dc8", DepositVault: "0x4D12C3D3e750e051e87a2F3f7750fBd94767742c", WithdrawalVault: "0x46BAeAEdbF90Ce46310173A04942e2B3B781Bf0e", OrderVault: "0xe52B3700D17B45dE9de7205DEe4685B4B9EC612D", ShiftVault: "0xa7EE2737249e0099906cB079BCEe85f0bbd837d4", - SyntheticsReader: "0xa254B60cbB85a92F6151B10E1233639F601f2F0F", + SyntheticsReader: "0x922766ca6234cD49A483b5ee8D86cA3590D0Fb0E", SyntheticsRouter: "0x3d472afcd66F954Fe4909EEcDd5c940e9a99290c", - GlvReader: "0x490d660A21fB75701b7781E191cB888D1FE38315", - GlvRouter: "0x348Eca94e7c6F35430aF1cAccE27C29E9Bef9ae3", + GlvReader: "0x955Aa50d2ecCeffa59084BE5e875eb676FfAFa98", + GlvRouter: "0xC92741F0a0D20A95529873cBB3480b1f8c228d9F", GlvVault: "0xd336087512BeF8Df32AF605b492f452Fd6436CD8", - GelatoRelayRouter: "0x7f8eF83C92B48a4B5B954A24D98a6cD0Ed4D160a", - SubaccountGelatoRelayRouter: "0xfbb9C41046E27405224a911f44602C3667f9D8f6", + GelatoRelayRouter: "0x98e86155abf8bCbA566b4a909be8cF4e3F227FAf", + SubaccountGelatoRelayRouter: "0xd6b16f5ceE328310B1cf6d8C0401C23dCd3c40d4", - MultichainClaimsRouter: "0x790Ee987b9B253374d700b07F16347a7d4C4ff2e", - MultichainGlvRouter: "0xEE027373517a6D96Fe62f70E9A0A395cB5a39Eee", - MultichainGmRouter: "0x4ef8394CD5DD7E3EE6D30824689eF461783a3360", - MultichainOrderRouter: "0x5c5DBbcDf420B5d81d4FfDBa5b26Eb24E6E60d52", - MultichainSubaccountRouter: "0xd3B6E962f135634C43415d57A28E688Fb4f15A58", - MultichainTransferRouter: "0x901f26a57edCe65Ef3FBcCD260433De9B2279852", + MultichainClaimsRouter: "0x421eB756B8f887f036e7332801288BC2bbA600aC", + MultichainGlvRouter: "0x9C11DFa4DAFA9227Ef172cc1d87D4D5008804C47", + MultichainGmRouter: "0x6a960F397eB8F2300F9FfA746F11375A613C5027", + MultichainOrderRouter: "0xbC074fF8b85f9b66884E1EdDcE3410fde96bd798", + MultichainSubaccountRouter: "0x8138Ce254Bc0AfE40369FDC2D1e46cE90944406d", + MultichainTransferRouter: "0x844D38f2c3875b8351feB4764718E1c64bD55c46", MultichainVault: "0x9a535f9343434D96c4a39fF1d90cC685A4F6Fb20", - LayerZeroProvider: "0x61af99b07995cb7Ee8c2FACF6D8fb6042FeAA0d9", + LayerZeroProvider: "0x9E721ef9b908B4814Aa18502692E4c5666d1942e", ChainlinkPriceFeedProvider: "0xDc613305e9267f0770072dEaB8c03162e0554b2d", - ClaimHandler: "0x3ca0f3ad78a9d0b2a0c060fe86d1141118a285c4", + ClaimHandler: "0x162e3a5B47C9a45ff762E5b4b23D048D6780C14e", // External ExternalHandler: "0x36b906eA6AE7c74aeEE8cDE66D01B3f1f8843872", @@ -215,7 +199,6 @@ export const CONTRACTS = { Reader: zeroAddress, PositionRouter: zeroAddress, ReferralStorage: zeroAddress, - ReferralReader: zeroAddress, VaultReader: zeroAddress, GlpManager: zeroAddress, RewardRouter: zeroAddress, @@ -241,9 +224,7 @@ export const CONTRACTS = { GovToken: zeroAddress, ES_GMX_IOU: zeroAddress, OrderBook: zeroAddress, - OrderExecutor: zeroAddress, - OrderBookReader: zeroAddress, - PositionManager: zeroAddress, + UniswapGmxEthPool: zeroAddress, // botanix specific @@ -284,16 +265,10 @@ export const CONTRACTS = { GlpVester: zeroAddress, AffiliateVester: zeroAddress, - OrderBook: zeroAddress, - OrderExecutor: zeroAddress, - OrderBookReader: zeroAddress, - PositionRouter: zeroAddress, - PositionManager: zeroAddress, TraderJoeGmxAvaxPool: zeroAddress, ReferralStorage: "0x192e82A18a4ab446dD9968f055431b60640B155D", - ReferralReader: zeroAddress, // Synthetics DataStore: "0xEA1BFb4Ea9A412dCCd63454AbC127431eBB0F0d4", @@ -306,7 +281,6 @@ export const CONTRACTS = { ShiftVault: "0x257D0EA0B040E2Cd1D456fB4C66d7814102aD346", SyntheticsReader: "0xf82Cc6EB57F8FF86bc5c5e90B8BA83DbBFB517eE", SyntheticsRouter: "0x5e7d61e4C52123ADF651961e4833aCc349b61491", - Timelock: zeroAddress, GlvReader: "0xdeaC9ea3c72C102f2a9654b8E1A14Ef86Cdd3146", GlvRouter: "0x6B6595389A0196F882C0f66CB1F401f1D24afEdC", @@ -339,34 +313,34 @@ export const CONTRACTS = { // Synthetics DataStore: "0xCF4c2C4c53157BcC01A596e3788fFF69cBBCD201", EventEmitter: "0xa973c2692C1556E1a3d478e745e9a75624AEDc73", - ExchangeRouter: "0x657F9215FA1e839FbA15cF44B1C00D95cF71ed10", - SubaccountRouter: "0x7d4dD31B32F6Ae51893B6cffCAb15E75eA30D69b", + ExchangeRouter: "0xEd50B2A1eF0C35DAaF08Da6486971180237909c3", + SubaccountRouter: "0xCF45A7E8bB46738f454eC6766631E5612DA90836", DepositVault: "0x809Ea82C394beB993c2b6B0d73b8FD07ab92DE5A", WithdrawalVault: "0x7601c9dBbDCf1f5ED1E7Adba4EFd9f2cADa037A5", OrderVault: "0x1b8AC606de71686fd2a1AEDEcb6E0EFba28909a2", ShiftVault: "0x6b6F9B7B9a6b69942DAE74FB95E694ec277117af", - SyntheticsReader: "0x37a0A165389B2f959a04685aC8fc126739e86926", + SyntheticsReader: "0x4750376b9378294138Cf7B7D69a2d243f4940f71", SyntheticsRouter: "0x72F13a44C8ba16a678CAD549F17bc9e06d2B8bD2", - GlvReader: "0x4843D570c726cFb44574c1769f721a49c7e9c350", - GlvRouter: "0x7F8af0741e8925C132E84147762902EBBc485d11", + GlvReader: "0x9B7D08AB020D9c180E4bAc370fB545317124Cf22", + GlvRouter: "0x21b044Bb4a2Ba667723aA3d15ba7b4bCc628084D", GlvVault: "0x40bD50de0977c68ecB958ED4A065E14E1091ce64", - GelatoRelayRouter: "0x44904137A4d8734a5AB13B32083FFd6B93664491", - SubaccountGelatoRelayRouter: "0x209E4408D68EE049957dBba7Ac62177f10ee00ab", + GelatoRelayRouter: "0xD2f52a70224d3453ea17944ABC12772793987FA6", + SubaccountGelatoRelayRouter: "0x43947140EEE26b82155baA18FDB746A05C700DCE", - MultichainClaimsRouter: "0xe06534c26c90AE8c3241BC90dDB69d4Af438f17f", - MultichainGlvRouter: "0x29b9a624a29327b1c76317bfF08373281c582B79", - MultichainGmRouter: "0x9868Ab73D1cB4DcEEd74e5eB9f86346C935488F3", - MultichainOrderRouter: "0x2B977188b3Bf8fbCa2Ca5D6e00DC8542b7690C9E", - MultichainSubaccountRouter: "0xf8fbE9411f90618B3c68A8826555Ab54dE090ED7", - MultichainTransferRouter: "0xeCfcA6af46B9d20793f82b28bc749dfFC6DEE535", + MultichainClaimsRouter: "0x0896f77B7dcE6923c58Ab1a1A91fFF617606E30b", + MultichainGlvRouter: "0x10f3D7c30cabe91Cdd2785E5af37374842a1089C", + MultichainGmRouter: "0x94dB1F9CAa86E86cD90F231411D31E5a3815bced", + MultichainOrderRouter: "0xc9670CCD86d150C91f1f154813786f1Ec809Ae08", + MultichainSubaccountRouter: "0x2E883D945AB36DC8491693c8870648a232b540a1", + MultichainTransferRouter: "0xEaba39494d17e722f2Ef49929656b82d561b4460", MultichainVault: "0xCd46EF5ed7d08B345c47b5a193A719861Aa2CD91", - LayerZeroProvider: "0x3f85e237E950A7FB7cfb6DD4C262353A82588d51", + LayerZeroProvider: "0x2E3d6B4c471C50983F21b54d3Ed8e3dAC7dAFF2e", ChainlinkPriceFeedProvider: "0xa76BF7f977E80ac0bff49BDC98a27b7b070a937d", ReferralStorage: "0xBbCdA58c228Bb29B5769778181c81Ac8aC546c11", - ClaimHandler: "0x96FE82b9C6FE46af537cE465B3befBD7b076C982", + ClaimHandler: "0xdB980712cCB142A11296c1b9cf70C24E1e90002A", // External Multicall: "0xD84793ae65842fFac5C20Ab8eaBD699ea1FC79F3", @@ -403,7 +377,6 @@ export const CONTRACTS = { GlpManager: zeroAddress, RewardReader: zeroAddress, GlpRewardRouter: zeroAddress, - Timelock: zeroAddress, }, }; @@ -424,4 +397,3 @@ export function getContract(chainId: ContractsChainId, name: ContractName): Addr return CONTRACTS[chainId][name]; } - diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/configs/dataStore.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/configs/dataStore.ts index 6504a5a5..e9808873 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/configs/dataStore.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/configs/dataStore.ts @@ -8,6 +8,7 @@ export const SWAP_IMPACT_FACTOR_KEY = hashString("SWAP_IMPACT_FACTOR"); export const SWAP_IMPACT_EXPONENT_FACTOR_KEY = hashString("SWAP_IMPACT_EXPONENT_FACTOR"); export const SWAP_FEE_FACTOR_KEY = hashString("SWAP_FEE_FACTOR"); export const ATOMIC_SWAP_FEE_FACTOR_KEY = hashString("ATOMIC_SWAP_FEE_FACTOR"); +export const WITHDRAWAL_FEE_FACTOR_KEY = hashString("WITHDRAWAL_FEE_FACTOR"); export const FEE_RECEIVER_DEPOSIT_FACTOR_KEY = hashString("FEE_RECEIVER_DEPOSIT_FACTOR"); export const BORROWING_FEE_RECEIVER_FACTOR_KEY = hashString("BORROWING_FEE_RECEIVER_FACTOR"); export const FEE_RECEIVER_WITHDRAWAL_FACTOR_KEY = hashString("FEE_RECEIVER_WITHDRAWAL_FACTOR"); @@ -81,7 +82,6 @@ export const VIRTUAL_TOKEN_ID_KEY = hashString("VIRTUAL_TOKEN_ID"); export const VIRTUAL_MARKET_ID_KEY = hashString("VIRTUAL_MARKET_ID"); export const VIRTUAL_INVENTORY_FOR_POSITIONS_KEY = hashString("VIRTUAL_INVENTORY_FOR_POSITIONS"); export const VIRTUAL_INVENTORY_FOR_SWAPS_KEY = hashString("VIRTUAL_INVENTORY_FOR_SWAPS"); -export const POOL_AMOUNT_ADJUSTMENT_KEY = hashString("POOL_AMOUNT_ADJUSTMENT"); export const AFFILIATE_REWARD_KEY = hashString("AFFILIATE_REWARD"); export const IS_MARKET_DISABLED_KEY = hashString("IS_MARKET_DISABLED"); export const UI_FEE_FACTOR = hashString("UI_FEE_FACTOR"); @@ -114,6 +114,7 @@ export const REQUEST_EXPIRATION_TIME_KEY = hashString("REQUEST_EXPIRATION_TIME") export const GMX_SIMULATION_ORIGIN = "0x" + keccakString("GMX SIMULATION ORIGIN").slice(-40); export const CLAIM_TERMS_KEY = hashString("CLAIM_TERMS"); export const GENERAL_CLAIM_FEATURE_DISABLED = hashString("GENERAL_CLAIM_FEATURE_DISABLED"); +export const USE_OPEN_INTEREST_IN_TOKENS_FOR_BALANCE = hashString("USE_OPEN_INTEREST_IN_TOKENS_FOR_BALANCE"); export function subaccountExpiresAtKey(account: string, subaccount: string, actionType: string) { return hashData( @@ -146,8 +147,8 @@ export function positionImpactFactorKey(market: string, isPositive: boolean) { return hashData(["bytes32", "address", "bool"], [POSITION_IMPACT_FACTOR_KEY, market, isPositive]); } -export function positionImpactExponentFactorKey(market: string) { - return hashData(["bytes32", "address"], [POSITION_IMPACT_EXPONENT_FACTOR_KEY, market]); +export function positionImpactExponentFactorKey(market: string, isPositive: boolean) { + return hashData(["bytes32", "address", "bool"], [POSITION_IMPACT_EXPONENT_FACTOR_KEY, market, isPositive]); } export function maxPositionImpactFactorKey(market: string, isPositive: boolean) { @@ -347,10 +348,6 @@ export function virtualInventoryForPositionsKey(virtualTokenId: string) { return hashData(["bytes32", "bytes32"], [VIRTUAL_INVENTORY_FOR_POSITIONS_KEY, virtualTokenId]); } -export function poolAmountAdjustmentKey(market: string, token: string) { - return hashData(["bytes32", "address", "address"], [POOL_AMOUNT_ADJUSTMENT_KEY, market, token]); -} - export function affiliateRewardKey(market: string, token: string, account: string) { return hashData(["bytes32", "address", "address", "address"], [AFFILIATE_REWARD_KEY, market, token, account]); } diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/configs/express.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/configs/express.ts new file mode 100644 index 00000000..119a39fb --- /dev/null +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/configs/express.ts @@ -0,0 +1,61 @@ +import { Token, TokenData } from "../types/tokens.js"; +import { expandDecimals, USD_DECIMALS } from "../utils/numbers.js"; +import { periodToSeconds } from "../utils/time.js"; + +import { ARBITRUM, ARBITRUM_SEPOLIA, AVALANCHE, AVALANCHE_FUJI, BOTANIX, ContractsChainId } from "./chains.js"; +import { getTokenBySymbol, getWrappedToken } from "./tokens.js"; + +export const SUBACCOUNT_MESSAGE = + "Generate a GMX 1CT (One-Click Trading) session. Only sign this message on a trusted website."; +export const SUBACCOUNT_DOCS_URL = "https://docs.gmx.io/docs/trading/v2/#one-click-trading"; + +export const DEFAULT_SUBACCOUNT_EXPIRY_DURATION = periodToSeconds(7, "1d"); // 1 week +export const DEFAULT_SUBACCOUNT_MAX_ALLOWED_COUNT = 90; + +export const DEFAULT_PERMIT_DEADLINE_DURATION = periodToSeconds(1, "1h"); +export const DEFAULT_EXPRESS_ORDER_DEADLINE_DURATION = periodToSeconds(1, "1h"); + +export const MIN_GELATO_USD_BALANCE_FOR_SPONSORED_CALL = expandDecimals(100, USD_DECIMALS); // 100$ +export const MIN_RELAYER_FEE_USD = 5n ** BigInt(USD_DECIMALS - 1); // 0.5$ + +export const EXPRESS_EXTRA_EXECUTION_FEE_BUFFER_BPS = 1000; + +export const EXPRESS_DEFAULT_MIN_RESIDUAL_USD_NUMBER = 20; +export const EXPRESS_DEFAULT_MIN_RESIDUAL_USD = expandDecimals(EXPRESS_DEFAULT_MIN_RESIDUAL_USD_NUMBER, USD_DECIMALS); +const EXPRESS_DEFAULT_MAX_RESIDUAL_USD_NUMBER = 40; +export const EXPRESS_DEFAULT_MAX_RESIDUAL_USD = expandDecimals(EXPRESS_DEFAULT_MAX_RESIDUAL_USD_NUMBER, USD_DECIMALS); +export const EXPRESS_RESIDUAL_AMOUNT_MULTIPLIER = 20n; + +const GAS_PAYMENT_TOKENS: Record = { + [ARBITRUM]: [ + getTokenBySymbol(ARBITRUM, "USDC").address, + getTokenBySymbol(ARBITRUM, "WETH").address, + getTokenBySymbol(ARBITRUM, "USDT").address, + ], + [AVALANCHE]: [ + getTokenBySymbol(AVALANCHE, "USDC").address, + getTokenBySymbol(AVALANCHE, "WAVAX").address, + getTokenBySymbol(AVALANCHE, "USDT").address, + ], + [AVALANCHE_FUJI]: [ + getTokenBySymbol(AVALANCHE_FUJI, "USDC").address, + getTokenBySymbol(AVALANCHE_FUJI, "WAVAX").address, + ], + [ARBITRUM_SEPOLIA]: [ + getTokenBySymbol(ARBITRUM_SEPOLIA, "USDC.SG").address, + getTokenBySymbol(ARBITRUM_SEPOLIA, "WETH").address, + ], + [BOTANIX]: [getTokenBySymbol(BOTANIX, "pBTC").address], +}; + +export function getGasPaymentTokens(chainId: number): string[] { + return GAS_PAYMENT_TOKENS[chainId]; +} + +export function getDefaultGasPaymentToken(chainId: number): string { + return GAS_PAYMENT_TOKENS[chainId][0]; +} + +export function getRelayerFeeToken(chainId: number): Token { + return getWrappedToken(chainId); +} diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/configs/factors.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/configs/factors.ts index 9459da28..3ded2125 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/configs/factors.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/configs/factors.ts @@ -1,12 +1,8 @@ -export const USD_DECIMALS = 30; - -export const BASIS_POINTS_DIVISOR = 10000; -export const BASIS_POINTS_DIVISOR_BIGINT = 10000n; +export { USD_DECIMALS, BASIS_POINTS_DIVISOR, BASIS_POINTS_DIVISOR_BIGINT, BASIS_POINTS_DECIMALS } from "../utils/numbers.js"; // 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 = 2500; // 25% 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/Managing.Web3Proxy/src/generated/gmxsdk/configs/markets.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/configs/markets.ts index 4f8f96d1..8409bbe8 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/configs/markets.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/configs/markets.ts @@ -2,7 +2,12 @@ This files is used to pre-build data during the build process. Avoid adding client-side code here, as it can break the build process. */ -import {ARBITRUM, AVALANCHE, AVALANCHE_FUJI} from "./chains.js"; +import { zeroAddress } from "viem"; + +import type { ERC20Address, NativeTokenSupportedAddress, Token } from "../types/tokens.js"; + +import { ARBITRUM, ARBITRUM_SEPOLIA, AVALANCHE, AVALANCHE_FUJI, BOTANIX, ContractsChainId } from "./chains.js"; +import { convertTokenAddress, getToken, getTokenBySymbol } from "./tokens.js"; export const SWAP_GRAPH_MAX_MARKETS_PER_TOKEN = 5; @@ -13,11 +18,13 @@ export type MarketConfig = { shortTokenAddress: string; }; +export type MarketsConfigMap = Record; + /* ATTENTION When adding new markets, please add them also to the end of the list in ./src/configs/static/sortedMarkets.ts */ -export const MARKETS: Record> = { +export const MARKETS: Record = { [ARBITRUM]: { // BTC/USD [WBTC.e-USDC] "0x47c031236e19d024b42f8AE6780E44A573170703": { @@ -586,6 +593,237 @@ export const MARKETS: Record> = { longTokenAddress: "0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f", shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", }, + // DOLO/USD [WETH-USDC] + "0x4D3Eb91efd36C2b74181F34B111bc1E91a0d0cb4": { + marketTokenAddress: "0x4D3Eb91efd36C2b74181F34B111bc1E91a0d0cb4", + indexTokenAddress: "0x97Ce1F309B949f7FBC4f58c5cb6aa417A5ff8964", + longTokenAddress: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // ZRO/USD [WETH-USDC] + "0x9e79146b3A022Af44E0708c6794F03Ef798381A5": { + marketTokenAddress: "0x9e79146b3A022Af44E0708c6794F03Ef798381A5", + indexTokenAddress: "0xa8193C55C34Ed22e1Dbe73FD5Adc668E51578a67", + longTokenAddress: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // CRV/USD - [WETH-USDC] + "0x0e46941F9bfF8d0784BFfa3d0D7883CDb82D7aE7": { + marketTokenAddress: "0x0e46941F9bfF8d0784BFfa3d0D7883CDb82D7aE7", + indexTokenAddress: "0xe5f01aeAcc8288E9838A60016AB00d7b6675900b", + longTokenAddress: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // MOODENG/USD [WBTC-USDC] + "0x2523B89298908FEf4c5e5bd6F55F20926e22058f": { + marketTokenAddress: "0x2523B89298908FEf4c5e5bd6F55F20926e22058f", + indexTokenAddress: "0xd3898c6570974AEca38a8ACf22fd60739e528A99", + longTokenAddress: "0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // XMR/USD [WBTC-USDC] + "0x7c54D547FAD72f8AFbf6E5b04403A0168b654C6f": { + marketTokenAddress: "0x7c54D547FAD72f8AFbf6E5b04403A0168b654C6f", + indexTokenAddress: "0x13674172E6E44D31d4bE489d5184f3457c40153A", + longTokenAddress: "0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // PI/USD [WBTC-USDC] + "0x39AC3C494950A4363D739201BA5A0861265C9ae5": { + marketTokenAddress: "0x39AC3C494950A4363D739201BA5A0861265C9ae5", + indexTokenAddress: "0xd1738d37401a0A71f7E382d2cFeCD3ab69687017", + longTokenAddress: "0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // PUMP/USD [WBTC-USDC] + "0x4C0Bb704529Fa49A26bD854802d70206982c6f1B": { + marketTokenAddress: "0x4C0Bb704529Fa49A26bD854802d70206982c6f1B", + indexTokenAddress: "0x9c060B2fA953b5f69879a8B7B81f62BFfEF360be", + longTokenAddress: "0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // SPX6900/USD [WETH-USDC] + "0x8263bC3766a09f6dD4Bab04b4bf8D45F2B0973FF": { + marketTokenAddress: "0x8263bC3766a09f6dD4Bab04b4bf8D45F2B0973FF", + indexTokenAddress: "0xb736be525A65326513351058427d1f47B0CfB045", + longTokenAddress: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // MNT/USD [WETH-USDC] + "0x40dAEAc02dCf6b3c51F9151f532C21DCEF2F7E63": { + marketTokenAddress: "0x40dAEAc02dCf6b3c51F9151f532C21DCEF2F7E63", + indexTokenAddress: "0x955cd91eEaE618F5a7b49E1e3c7482833B10DAb4", + longTokenAddress: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // ARB/USD [ARB-ARB] + "0x672fEA44f4583DdaD620d60C1Ac31021F47558Cb": { + marketTokenAddress: "0x672fEA44f4583DdaD620d60C1Ac31021F47558Cb", + indexTokenAddress: "0x912CE59144191C1204E64559FE8253a0e49E6548", + longTokenAddress: "0x912CE59144191C1204E64559FE8253a0e49E6548", + shortTokenAddress: "0x912CE59144191C1204E64559FE8253a0e49E6548", + }, + // ALGO/USD [WBTC-USDC] + "0x3B7f4e4Cf2fa43df013d2B32673e6A01d29ab2Ac": { + marketTokenAddress: "0x3B7f4e4Cf2fa43df013d2B32673e6A01d29ab2Ac", + indexTokenAddress: "0x72Cd3a21aA7A898028d9501868Fbe6dED0020434", + longTokenAddress: "0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // CRO/USD [WBTC-USDC] + "0xa29FfE4152B65A0347512Ae5c6A4Bbc7a3d6d51B": { + marketTokenAddress: "0xa29FfE4152B65A0347512Ae5c6A4Bbc7a3d6d51B", + indexTokenAddress: "0xB7EfE7c7f059E84Ab87A83A169c583Fb4A54fAc3", + longTokenAddress: "0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // HBAR/USD [WBTC-USDC] + "0x9f0849FB830679829d1FB759b11236D375D15C78": { + marketTokenAddress: "0x9f0849FB830679829d1FB759b11236D375D15C78", + indexTokenAddress: "0xEb2A83b973f4dbB9511D92dd40d2ba4C683f0971", + longTokenAddress: "0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // CVX/USD [WETH-USDC] + "0x41E3bC5B72384C8B26b559B7d16C2B81Fd36fbA2": { + marketTokenAddress: "0x41E3bC5B72384C8B26b559B7d16C2B81Fd36fbA2", + indexTokenAddress: "0x3B6f801C0052Dfe0Ac80287D611F31B7c47B9A6b", + longTokenAddress: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // KAS/USD [WBTC-USDC] + "0x4024418592450E4d62faB15e2f833FC03A3447dc": { + marketTokenAddress: "0x4024418592450E4d62faB15e2f833FC03A3447dc", + indexTokenAddress: "0x91c6a8F6aFAC036F4ABf1bA55f4E76892E865E4a", + longTokenAddress: "0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // OKB/USD [WETH-USDC] + "0x2a331e51a3D17211852d8625a1029898450e539B": { + marketTokenAddress: "0x2a331e51a3D17211852d8625a1029898450e539B", + indexTokenAddress: "0xd37F01A3379f052FEF70F63c0Be27931891aa2B9", + longTokenAddress: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // WIF/USD [WBTC-USDC] + "0x3f649eab7f4CE4945F125939C64429Be2C5d0cB4": { + marketTokenAddress: "0x3f649eab7f4CE4945F125939C64429Be2C5d0cB4", + indexTokenAddress: "0xA1b91fe9FD52141Ff8cac388Ce3F10BFDc1dE79d", + longTokenAddress: "0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // AERO/USD [WETH-USDC] + "0xfaEaE570B07618D3F10360608E43c241181c4614": { + marketTokenAddress: "0xfaEaE570B07618D3F10360608E43c241181c4614", + indexTokenAddress: "0xEcc5eb985Ddbb8335b175b0A2A1144E4c978F1f6", + longTokenAddress: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // BRETT/USD [WETH-USDC] + "0x6EeE8098dBC106aEde99763FA5F955A5bBc42C50": { + marketTokenAddress: "0x6EeE8098dBC106aEde99763FA5F955A5bBc42C50", + indexTokenAddress: "0x4249F6e0808bEfF7368AaAD3F7A3Fd511F61Ee60", + longTokenAddress: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // WLFI/USD [WETH-USDC] + "0xb3588455858a49D3244237CEe00880CcB84b91Dd": { + marketTokenAddress: "0xb3588455858a49D3244237CEe00880CcB84b91Dd", + indexTokenAddress: "0xC5799ab6E2818fD8d0788dB8D156B0c5db1Bf97b", + longTokenAddress: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // LINK/USD [WETH-USDC] + "0xF913B4748031EF569898ED91e5BA0d602bB93298": { + marketTokenAddress: "0xF913B4748031EF569898ED91e5BA0d602bB93298", + indexTokenAddress: "0xf97f4df75117a78c1A5a0DBb814Af92458539FB4", + longTokenAddress: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // MORPHO/USD [WETH-USDC] + "0x4De268aC68477f794C3eAC5A419Cbcffc2cD5e02": { + marketTokenAddress: "0x4De268aC68477f794C3eAC5A419Cbcffc2cD5e02", + indexTokenAddress: "0xF67b2a901D674B443Fa9f6DB2A689B37c07fD4fE", + longTokenAddress: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // VVV/USD [WETH-USDC] + "0x947C521E44f727219542B0f91a85182193c1D2ad": { + marketTokenAddress: "0x947C521E44f727219542B0f91a85182193c1D2ad", + indexTokenAddress: "0xB79Eb5BA64A167676694bB41bc1640F95d309a2F", + longTokenAddress: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // WELL/USD [WETH-USDC] + "0x2347EbB8645Cc2EA0Ba92D1EC59704031F2fCCf4": { + marketTokenAddress: "0x2347EbB8645Cc2EA0Ba92D1EC59704031F2fCCf4", + indexTokenAddress: "0x465A31E5bA29b8EAcC860d499D714a6f07e56E85", + longTokenAddress: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // KTA/USD [WETH-USDC] + "0x970b730b5dD18de53A230eE8F4af088dBC3a6F8d": { + marketTokenAddress: "0x970b730b5dD18de53A230eE8F4af088dBC3a6F8d", + indexTokenAddress: "0x96Ee343E36E8642627FAEa235D57a9FEC8a6e34f", + longTokenAddress: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // ZORA/USD [WETH-USDC] + "0xac484106d935f0f20F1485b631fA6F65AeEff550": { + marketTokenAddress: "0xac484106d935f0f20F1485b631fA6F65AeEff550", + indexTokenAddress: "0xc5ff0eB026dB972F95DF3dfF04e697d8b660092a", + longTokenAddress: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // XPL/USD [WBTC.e-USDC] + "0x4b67aa8F754b17b1029Ad2DB4fb6a276CCe350c4": { + marketTokenAddress: "0x4b67aa8F754b17b1029Ad2DB4fb6a276CCe350c4", + indexTokenAddress: "0x2e73bDBee83D91623736D514b0BB41f2afd9C7Fd", + longTokenAddress: "0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // ASTER/USD [WBTC-USDC] + "0x0164B6c847c65e07C9F6226149ADBFA7C1dE40Cf": { + marketTokenAddress: "0x0164B6c847c65e07C9F6226149ADBFA7C1dE40Cf", + indexTokenAddress: "0x2aAB60E62f05d17e58dEc982870bfAdc7F4e7ADF", + longTokenAddress: "0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // 0G/USD [WBTC-USDC] + "0xe024188850A822409F362209C1EF2cFdc7c4DE4C": { + marketTokenAddress: "0xe024188850A822409F362209C1EF2cFdc7c4DE4C", + indexTokenAddress: "0x95c317066CF214b2E6588B2685D949384504F51e", + longTokenAddress: "0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // AVNT/USD [WETH-USDC] + "0xCEff9D261A96Cb78Df35f9333ba9F2F4CFcb8a68": { + marketTokenAddress: "0xCEff9D261A96Cb78Df35f9333ba9F2F4CFcb8a68", + indexTokenAddress: "0xdB58EB7f408EbA2176eCb44A4696292605cCEB39", + longTokenAddress: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // LINEA/USD [WETH-USDC] + "0x6d9430A116ed4d4FC6FE1996A5493662d555b07E": { + marketTokenAddress: "0x6d9430A116ed4d4FC6FE1996A5493662d555b07E", + indexTokenAddress: "0xc4017CFe7D7eaBDE63d3252caBF26A286fE2B1E0", + longTokenAddress: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // SOL/USD [WBTC.e-USDC] + "0xcf083d35AD306A042d4Fb312fCdd8228b52b82f8": { + marketTokenAddress: "0xcf083d35AD306A042d4Fb312fCdd8228b52b82f8", + indexTokenAddress: "0x2bcC6D6CdBbDC0a4071e48bb3B969b06B3330c07", + longTokenAddress: "0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // BNB/USD [WBTC.e-USDC] + "0x065577D05c3D4C11505ed7bc97BBF85d462A6A6f": { + marketTokenAddress: "0x065577D05c3D4C11505ed7bc97BBF85d462A6A6f", + indexTokenAddress: "0xa9004A5421372E1D83fB1f85b0fc986c912f91f3", + longTokenAddress: "0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, }, [AVALANCHE]: { // BTC/USD [BTC-USDC] @@ -700,6 +938,34 @@ export const MARKETS: Record> = { longTokenAddress: "0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7", shortTokenAddress: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", }, + // PUMP/USD [WAVAX-USDC] + "0x94cE6F65188a92F297C7f0A5A7B3cAd9013450F8": { + marketTokenAddress: "0x94cE6F65188a92F297C7f0A5A7B3cAd9013450F8", + indexTokenAddress: "0xdA598795DfE56388ca3D35e2ccFA96EFf83eC306", + longTokenAddress: "0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7", + shortTokenAddress: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", + }, + // WLFI/USD [WAVAX-USDC] + "0x1cb9932CE322877A2B86489BD1aA3C3CfF879F0d": { + marketTokenAddress: "0x1cb9932CE322877A2B86489BD1aA3C3CfF879F0d", + indexTokenAddress: "0xbDF8a77ACB7A54597E7760b34D3E632912bB59b7", + longTokenAddress: "0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7", + shortTokenAddress: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", + }, + // XAUt0/USD [XAUt0-XAUt0] + "0x1635eF7FBdce68eC80A3672aB710A5a99044f5c9": { + marketTokenAddress: "0x1635eF7FBdce68eC80A3672aB710A5a99044f5c9", + indexTokenAddress: "0x2775d5105276781B4b85bA6eA6a6653bEeD1dd32", + longTokenAddress: "0x2775d5105276781B4b85bA6eA6a6653bEeD1dd32", + shortTokenAddress: "0x2775d5105276781B4b85bA6eA6a6653bEeD1dd32", + }, + // XAUt0/USD [XAUt0-USDT] + "0x92d3DA41E166A12e3Ede9e2Dd9A272C5c6FC55E1": { + marketTokenAddress: "0x92d3DA41E166A12e3Ede9e2Dd9A272C5c6FC55E1", + indexTokenAddress: "0x2775d5105276781B4b85bA6eA6a6653bEeD1dd32", + longTokenAddress: "0x2775d5105276781B4b85bA6eA6a6653bEeD1dd32", + shortTokenAddress: "0x9702230A8Ea53601f5cD2dc00fDBc13d4dF4A8c7", + }, }, [AVALANCHE_FUJI]: { // AVAX/USD [WAVAX-USDC] @@ -843,31 +1109,182 @@ export const MARKETS: Record> = { shortTokenAddress: "0x3Bd8e00c25B12E6E60fc8B6f1E1E2236102073Ca", }, }, + [ARBITRUM_SEPOLIA]: { + // ETH/USD [WETH-USDC] + "0x482Df3D320C964808579b585a8AC7Dd5D144eFaF": { + marketTokenAddress: "0x482Df3D320C964808579b585a8AC7Dd5D144eFaF", + indexTokenAddress: "0x980B62Da83eFf3D4576C647993b0c1D7faf17c73", + longTokenAddress: "0x980B62Da83eFf3D4576C647993b0c1D7faf17c73", + shortTokenAddress: "0x3321Fd36aEaB0d5CdfD26f4A3A93E2D2aAcCB99f", + }, + // BTC/USD [BTC-USDC] + "0xBb532Ab4923C23c2bfA455151B14fec177a34C0D": { + marketTokenAddress: "0xBb532Ab4923C23c2bfA455151B14fec177a34C0D", + indexTokenAddress: "0xF79cE1Cf38A09D572b021B4C5548b75A14082F12", + longTokenAddress: "0xF79cE1Cf38A09D572b021B4C5548b75A14082F12", + shortTokenAddress: "0x3321Fd36aEaB0d5CdfD26f4A3A93E2D2aAcCB99f", + }, + // ETH/USD [WETH-USDC.SG] + "0xb6fC4C9eB02C35A134044526C62bb15014Ac0Bcc": { + marketTokenAddress: "0xb6fC4C9eB02C35A134044526C62bb15014Ac0Bcc", + indexTokenAddress: "0x980B62Da83eFf3D4576C647993b0c1D7faf17c73", + longTokenAddress: "0x980B62Da83eFf3D4576C647993b0c1D7faf17c73", + shortTokenAddress: "0x3253a335E7bFfB4790Aa4C25C4250d206E9b9773", + }, + // BTC/USD [BTC-USDC.SG] + "0x3A83246bDDD60c4e71c91c10D9A66Fd64399bBCf": { + marketTokenAddress: "0x3A83246bDDD60c4e71c91c10D9A66Fd64399bBCf", + indexTokenAddress: "0xF79cE1Cf38A09D572b021B4C5548b75A14082F12", + longTokenAddress: "0xF79cE1Cf38A09D572b021B4C5548b75A14082F12", + shortTokenAddress: "0x3253a335E7bFfB4790Aa4C25C4250d206E9b9773", + }, + // CRV/USD [WETH-USDC] + "0xAde9D177B9E060D2064ee9F798125e6539fDaA1c": { + marketTokenAddress: "0xAde9D177B9E060D2064ee9F798125e6539fDaA1c", + indexTokenAddress: "0xD5DdAED48B09fa1D7944bd662CB05265FCD7077C", + longTokenAddress: "0x980B62Da83eFf3D4576C647993b0c1D7faf17c73", + shortTokenAddress: "0x3253a335E7bFfB4790Aa4C25C4250d206E9b9773", + }, + }, + [BOTANIX]: { + // BTC/USD [stBTC-stBTC] + "0x6682BB60590a045A956541B1433f016Ed22E361d": { + marketTokenAddress: "0x6682BB60590a045A956541B1433f016Ed22E361d", + indexTokenAddress: "0x1B9e25f54225bcdCf347569E38C41Ade9BB686e5", + longTokenAddress: "0xF4586028FFdA7Eca636864F80f8a3f2589E33795", + shortTokenAddress: "0xF4586028FFdA7Eca636864F80f8a3f2589E33795", + }, + // BTC/USD [stBTC-USDC.E] + "0x2f95a2529328E427d3204555F164B1102086690E": { + marketTokenAddress: "0x2f95a2529328E427d3204555F164B1102086690E", + indexTokenAddress: "0x1B9e25f54225bcdCf347569E38C41Ade9BB686e5", + longTokenAddress: "0xF4586028FFdA7Eca636864F80f8a3f2589E33795", + shortTokenAddress: "0x29eE6138DD4C9815f46D34a4A1ed48F46758A402", + }, + // BTC/USD [PBTC-PBTC] + "0x6bFDD025827F7CE130BcfC446927AEF34ae2a98d": { + marketTokenAddress: "0x6bFDD025827F7CE130BcfC446927AEF34ae2a98d", + indexTokenAddress: "0x1B9e25f54225bcdCf347569E38C41Ade9BB686e5", + longTokenAddress: "0x0D2437F93Fed6EA64Ef01cCde385FB1263910C56", + shortTokenAddress: "0x0D2437F93Fed6EA64Ef01cCde385FB1263910C56", + }, + }, }; -export function buildClaimParams(userAddress: string) { - const marketAddresses: string[] = []; - const tokenAddresses: string[] = []; - - for (const [marketAddress, marketConfig] of Object.entries(MARKETS[ARBITRUM])) { - // Skip swap-only markets (identified by zero indexTokenAddress) - if (marketConfig.indexTokenAddress === "0x0000000000000000000000000000000000000000") { - continue; - } - - // Add market address twice (for long and short positions) - marketAddresses.push(marketAddress, marketAddress); - - // Add long token and short token addresses - tokenAddresses.push(marketConfig.longTokenAddress, marketConfig.shortTokenAddress); +export type MarketLabel = `${string}/USD [${string}-${string}]`; + +export function getMarketByLabel(chainId: ContractsChainId, label: MarketLabel): MarketConfig { + const marketsByAddress = MARKETS[chainId]; + + if (!marketsByAddress) { + throw new Error(`Markets not found for chainId ${chainId}`); } - - return [ - marketAddresses, - tokenAddresses, - userAddress - ]; + + const labelMatch = label.match(/^(.+?)\/USD\s*\[([^\]]+)\]$/i); + + if (!labelMatch) { + throw new Error(`Invalid market label ${label}`); + } + + const [, indexSymbolRaw, tokensPart] = labelMatch; + + const separatorIndex = tokensPart.search(/[-/]/); + + if (separatorIndex === -1) { + throw new Error(`Invalid market label ${label}`); + } + + const longSymbolRaw = tokensPart.slice(0, separatorIndex).trim(); + const shortSymbolRaw = tokensPart.slice(separatorIndex + 1).trim(); + + if (!longSymbolRaw || !shortSymbolRaw) { + throw new Error(`Invalid market label ${label}`); + } + + const indexToken = getTokenBySymbol(chainId, fixTokenSymbolFromMarketLabel(chainId, indexSymbolRaw)); + const longToken = getTokenBySymbol(chainId, fixTokenSymbolFromMarketLabel(chainId, longSymbolRaw), { + isSynthetic: false, + }); + const shortToken = getTokenBySymbol(chainId, fixTokenSymbolFromMarketLabel(chainId, shortSymbolRaw), { + isSynthetic: false, + }); + + if (!longToken || !shortToken || !indexToken) { + throw new Error(`Invalid market label ${label}`); + } + + const market = Object.values(marketsByAddress).find( + (market) => + market.longTokenAddress === longToken.address && + market.shortTokenAddress === shortToken.address && + market.indexTokenAddress === indexToken.address + ); + + if (!market) { + throw new Error(`Market ${label} not found`); + } + + return market; } -// Example usage: -// const params = buildClaimParams("0x0AF60B5C1c349744Ef8fa8c4ed78Ee1A0d392Fe9"); +export const fixTokenSymbolFromMarketLabel = (chainId: ContractsChainId, symbol: string) => { + if (chainId === ARBITRUM && symbol === "WBTC") { + return "BTC"; + } + if (chainId === ARBITRUM && symbol === "ETH") { + return "WETH"; + } + return symbol; +}; + +export function isMarketTokenAddress(chainId: number, marketTokenAddress: string): boolean { + return Boolean(MARKETS[chainId]?.[marketTokenAddress]); +} + +export function getTokenAddressByMarket( + chainId: number, + marketTokenAddress: string, + tokenType: T +): T extends "index" ? NativeTokenSupportedAddress | ERC20Address : ERC20Address { + const market = MARKETS[chainId as ContractsChainId][marketTokenAddress]; + + if (tokenType === "index") { + return convertTokenAddress(chainId, market.indexTokenAddress, "native")! as T extends "index" + ? NativeTokenSupportedAddress | ERC20Address + : ERC20Address; + } + + if (tokenType === "long") { + return market.longTokenAddress as ERC20Address; + } + + return market.shortTokenAddress as ERC20Address; +} + +export function getMarketIndexToken(chainId: number, marketTokenAddress: string): Token { + const indexTokenAddress = getTokenAddressByMarket(chainId, marketTokenAddress, "index"); + + return getToken(chainId, indexTokenAddress); +} + +export function getTokenSymbolByMarket( + chainId: number, + marketTokenAddress: string, + tokenType: "long" | "short" | "index" +): string { + const tokenAddress = getTokenAddressByMarket(chainId, marketTokenAddress, tokenType); + return getToken(chainId, tokenAddress).symbol; +} + +export function getIsSpotOnlyMarket(chainId: number, marketTokenAddress: string): boolean { + return MARKETS[chainId as ContractsChainId][marketTokenAddress].indexTokenAddress === zeroAddress; +} + +export function getMarketIsSameCollaterals(chainId: number, marketTokenAddress: string): boolean { + const market = MARKETS[chainId][marketTokenAddress]; + if (!market) { + return false; + } + + return market.longTokenAddress === market.shortTokenAddress; +} diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/configs/multichain.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/configs/multichain.ts new file mode 100644 index 00000000..68acb4d7 --- /dev/null +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/configs/multichain.ts @@ -0,0 +1,35 @@ +import { + ARBITRUM_SEPOLIA, + ARBITRUM, + AVALANCHE, + SOURCE_OPTIMISM_SEPOLIA, + SOURCE_SEPOLIA, + SOURCE_BASE_MAINNET, + SOURCE_BSC_MAINNET, +} from "./chainIds.js"; +import { SettlementChainId, SourceChainId } from "./chains.js"; + +function ensureExhaustive(value: Record): T[] { + return Object.keys(value).map(Number) as T[]; +} + +export const SETTLEMENT_CHAINS: SettlementChainId[] = ensureExhaustive({ + [ARBITRUM_SEPOLIA]: true, + [ARBITRUM]: true, + [AVALANCHE]: true, +}); + +export const SOURCE_CHAINS: SourceChainId[] = ensureExhaustive({ + [SOURCE_OPTIMISM_SEPOLIA]: true, + [SOURCE_SEPOLIA]: true, + [SOURCE_BASE_MAINNET]: true, + [SOURCE_BSC_MAINNET]: true, +}); + +export function isSettlementChain(chainId: number): chainId is SettlementChainId { + return SETTLEMENT_CHAINS.includes(chainId as SettlementChainId); +} + +export function isSourceChain(chainId: number | undefined): chainId is SourceChainId { + return SOURCE_CHAINS.includes(chainId as SourceChainId); +} diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/configs/oracleKeeper.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/configs/oracleKeeper.ts new file mode 100644 index 00000000..a7db9caa --- /dev/null +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/configs/oracleKeeper.ts @@ -0,0 +1,56 @@ +import { ARBITRUM, ARBITRUM_SEPOLIA, AVALANCHE, AVALANCHE_FUJI, BOTANIX, ContractsChainId } from "./chains.js"; + +const ORACLE_KEEPER_URLS: Record = { + [ARBITRUM]: "https://arbitrum-api.gmxinfra.io", + + [AVALANCHE]: "https://avalanche-api.gmxinfra.io", + + [AVALANCHE_FUJI]: "https://synthetics-api-avax-fuji-upovm.ondigitalocean.app", + + [BOTANIX]: "https://botanix-api.gmxinfra.io", + + [ARBITRUM_SEPOLIA]: "https://dolphin-app-a2dup.ondigitalocean.app", +}; + +const ORACLE_KEEPER_FALLBACK_URLS: Record = { + [ARBITRUM]: [ + "https://arbitrum-api-fallback.gmxinfra.io", + "https://arbitrum-api-fallback.gmxinfra2.io", + "https://arbitrum-api.gmxinfra.io", + ], + + [AVALANCHE]: [ + "https://avalanche-api-fallback.gmxinfra.io", + "https://avalanche-api-fallback.gmxinfra2.io", + "https://avalanche-api.gmxinfra.io", + ], + + [AVALANCHE_FUJI]: [ + "https://synthetics-api-avax-fuji-upovm.ondigitalocean.app", + "https://synthetics-api-avax-fuji.gmxinfra.io", + ], + + [BOTANIX]: [ + "https://botanix-api-fallback.gmxinfra.io", + "https://botanix-api-fallback.gmxinfra2.io", + "https://botanix-api.gmxinfra.io", + ], + + [ARBITRUM_SEPOLIA]: ["https://dolphin-app-a2dup.ondigitalocean.app"], +}; + +export function getOracleKeeperUrl(chainId: number) { + if (!ORACLE_KEEPER_URLS[chainId]) { + throw new Error(`No oracle keeper url for chain ${chainId}`); + } + + return ORACLE_KEEPER_URLS[chainId]; +} + +export function getOracleKeeperFallbackUrls(chainId: number) { + if (!ORACLE_KEEPER_FALLBACK_URLS[chainId]) { + throw new Error(`No oracle keeper fallback urls for chain ${chainId}`); + } + + return ORACLE_KEEPER_FALLBACK_URLS[chainId]; +} diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/configs/tokens.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/configs/tokens.ts index ce5a6c66..08a42d11 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/configs/tokens.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/configs/tokens.ts @@ -1,13 +1,18 @@ -import {zeroAddress} from "viem"; +import { zeroAddress } from "viem"; +import type { Token, TokenAddressTypesMap, TokenCategory } from "../types/tokens.js"; -import {ARBITRUM, ARBITRUM_SEPOLIA, AVALANCHE, AVALANCHE_FUJI, BASE, BOTANIX} from "./chains.js"; -import {getContract} from "./contracts.js"; -import {Token, TokenAddressTypesMap, TokenCategory} from "../types/tokens.js"; - +import { ARBITRUM, ARBITRUM_SEPOLIA, AVALANCHE, AVALANCHE_FUJI, BOTANIX } from "./chains.js"; +import { getContract } from "./contracts.js"; export const NATIVE_TOKEN_ADDRESS = zeroAddress; +export const GM_STUB_ADDRESS = ""; +export const GLV_STUB_ADDRESS = ""; +const GMX_STUB_ADDRESS = ""; +const ESGMX_STUB_ADDRESS = ""; +const GLP_STUB_ADDRESS = ""; + export const TOKENS: { [chainId: number]: Token[] } = { [ARBITRUM]: [ { @@ -55,7 +60,7 @@ export const TOKENS: { [chainId: number]: Token[] } = { name: "Arbitrum", symbol: "ARB", decimals: 18, - priceDecimals: 4, + priceDecimals: 5, address: "0x912CE59144191C1204E64559FE8253a0e49E6548", categories: ["layer2", "defi"], imageUrl: "https://assets.coingecko.com/coins/images/16547/small/photo_2023-03-29_21.47.00.jpeg?1680097630", @@ -196,7 +201,8 @@ export const TOKENS: { [chainId: number]: Token[] } = { categories: ["layer1"], imageUrl: "https://assets.coingecko.com/coins/images/1/small/bitcoin.png?1547033579", coingeckoUrl: "https://www.coingecko.com/en/coins/bitcoin", - isPermitSupported: true, + isPermitSupported: false, + isPermitDisabled: true, }, { name: "Dogecoin", @@ -413,7 +419,7 @@ export const TOKENS: { [chainId: number]: Token[] } = { imageUrl: "https://assets.coingecko.com/coins/images/11224/standard/0x18084fba666a33d37592fa2633fd49a74dd93a88.png?1696511155", coingeckoUrl: "https://www.coingecko.com/en/coins/tbtc", - isPermitSupported: true, + isPermitSupported: false, contractVersion: "1", }, { @@ -424,7 +430,7 @@ export const TOKENS: { [chainId: number]: Token[] } = { categories: ["layer2"], imageUrl: "https://assets.coingecko.com/coins/images/37441/standard/eigen.jpg?1728023974", coingeckoUrl: "https://www.coingecko.com/en/coins/eigenlayer", - isPermitSupported: true, + isPermitSupported: false, contractVersion: "1", }, { @@ -1030,7 +1036,7 @@ export const TOKENS: { [chainId: number]: Token[] } = { { name: "GMX Market tokens", symbol: "GM", - address: "", + address: GM_STUB_ADDRESS, decimals: 18, imageUrl: "https://raw.githubusercontent.com/gmx-io/gmx-assets/main/GMX-Assets/PNG/GM_LOGO.png", isPlatformToken: true, @@ -1038,7 +1044,7 @@ export const TOKENS: { [chainId: number]: Token[] } = { { name: "GLV Market tokens", symbol: "GLV", - address: "", + address: GLV_STUB_ADDRESS, decimals: 18, imageUrl: "https://raw.githubusercontent.com/gmx-io/gmx-assets/main/GMX-Assets/PNG/GLV_LOGO.png", isPlatformToken: true, @@ -1175,6 +1181,84 @@ export const TOKENS: { [chainId: number]: Token[] } = { imageUrl: "https://assets.coingecko.com/coins/images/26133/standard/WELL.png?1696525221", coingeckoUrl: "https://www.coingecko.com/en/coins/moonwell", }, + { + name: "KTA", + symbol: "KTA", + decimals: 18, + address: "0x96Ee343E36E8642627FAEa235D57a9FEC8a6e34f", + isSynthetic: true, + priceDecimals: 5, + categories: ["layer1"], + imageUrl: "https://assets.coingecko.com/coins/images/54693/standard/zora.jpg?1741094751", + coingeckoUrl: "https://www.coingecko.com/en/coins/zora", + }, + { + name: "Zora", + symbol: "ZORA", + decimals: 18, + address: "0xc5ff0eB026dB972F95DF3dfF04e697d8b660092a", + isSynthetic: true, + priceDecimals: 6, + categories: ["layer2"], + imageUrl: "https://assets.coingecko.com/coins/images/54723/standard/2025-03-05_22.53.06.jpg?1741234207", + coingeckoUrl: "https://www.coingecko.com/en/coins/keeta", + }, + { + name: "Plasma", + symbol: "XPL", + address: "0x2e73bDBee83D91623736D514b0BB41f2afd9C7Fd", + decimals: 18, + priceDecimals: 4, + categories: ["layer1", "defi"], + imageUrl: "https://assets.coingecko.com/coins/images/66489/standard/Plasma-symbol-green-1.png?1755142558", + coingeckoUrl: "https://www.coingecko.com/en/coins/plasma", + isSynthetic: true, + }, + { + name: "Aster", + symbol: "ASTER", + address: "0x2aAB60E62f05d17e58dEc982870bfAdc7F4e7ADF", + decimals: 18, + priceDecimals: 4, + categories: ["defi"], + imageUrl: "https://assets.coingecko.com/coins/images/69040/standard/_ASTER.png?1757326782", + coingeckoUrl: "https://www.coingecko.com/en/coins/aster-2", + isSynthetic: true, + }, + { + name: "0G", + symbol: "0G", + address: "0x95c317066CF214b2E6588B2685D949384504F51e", + decimals: 18, + priceDecimals: 4, + categories: ["layer1"], + imageUrl: + "https://assets.coingecko.com/coins/images/69096/standard/0G_1024x1024_Circular_Outlined.png?1758637574", + coingeckoUrl: "https://www.coingecko.com/en/coins/0g", + isSynthetic: true, + }, + { + name: "Avantis", + symbol: "AVNT", + address: "0xdB58EB7f408EbA2176eCb44A4696292605cCEB39", + decimals: 18, + priceDecimals: 5, + categories: ["defi"], + imageUrl: "https://assets.coingecko.com/coins/images/68972/standard/avnt-token.png?1757134448", + coingeckoUrl: "https://www.coingecko.com/en/coins/avantis", + isSynthetic: true, + }, + { + name: "Linea", + symbol: "LINEA", + address: "0xc4017CFe7D7eaBDE63d3252caBF26A286fE2B1E0", + decimals: 18, + priceDecimals: 6, + categories: ["layer2"], + imageUrl: "https://assets.coingecko.com/coins/images/68507/standard/linea-logo.jpeg?1756025484", + coingeckoUrl: "https://www.coingecko.com/en/coins/linea", + isSynthetic: true, + }, ], [AVALANCHE]: [ { @@ -1373,6 +1457,19 @@ export const TOKENS: { [chainId: number]: Token[] } = { coingeckoUrl: "https://www.coingecko.com/en/coins/xrp", isSynthetic: true, }, + { + name: "Tether Gold", + symbol: "XAUt0", + address: "0x2775d5105276781B4b85bA6eA6a6653bEeD1dd32", + decimals: 6, + priceDecimals: 2, + imageUrl: "https://assets.coingecko.com/coins/images/10481/standard/Tether_Gold.png?1696510471", + coingeckoUrl: "https://www.coingecko.com/nl/coins/tether-gold", + explorerUrl: "https://snowtrace.io/address/0x2775d5105276781B4b85bA6eA6a6653bEeD1dd32", + isPermitSupported: true, + isPermitDisabled: true, + contractVersion: "1", + }, { name: "GMX", symbol: "GMX", @@ -1449,7 +1546,7 @@ export const TOKENS: { [chainId: number]: Token[] } = { { name: "GMX Market tokens", symbol: "GM", - address: "", + address: GM_STUB_ADDRESS, decimals: 18, imageUrl: "https://raw.githubusercontent.com/gmx-io/gmx-assets/main/GMX-Assets/PNG/GM_LOGO.png", isPlatformToken: true, @@ -1457,7 +1554,7 @@ export const TOKENS: { [chainId: number]: Token[] } = { { name: "GLV Market tokens", symbol: "GLV", - address: "", + address: GLV_STUB_ADDRESS, decimals: 18, imageUrl: "https://raw.githubusercontent.com/gmx-io/gmx-assets/main/GMX-Assets/PNG/GLV_LOGO.png", isPlatformToken: true, @@ -1679,7 +1776,7 @@ export const TOKENS: { [chainId: number]: Token[] } = { { name: "GMX Market tokens", symbol: "GM", - address: "", + address: GM_STUB_ADDRESS, decimals: 18, imageUrl: "https://raw.githubusercontent.com/gmx-io/gmx-assets/main/GMX-Assets/PNG/GM_LOGO.png", isPlatformToken: true, @@ -1687,7 +1784,7 @@ export const TOKENS: { [chainId: number]: Token[] } = { { name: "GLV Market tokens", symbol: "GLV", - address: "", + address: GLV_STUB_ADDRESS, decimals: 18, imageUrl: "https://raw.githubusercontent.com/gmx-io/gmx-assets/main/GMX-Assets/PNG/GLV_LOGO.png", isPlatformToken: true, @@ -1753,11 +1850,20 @@ export const TOKENS: { [chainId: number]: Token[] } = { isSynthetic: true, coingeckoUrl: "https://www.coingecko.com/en/coins/curve-dao-token", }, + { + name: "USDT", + symbol: "USDT", + address: "0x095f40616FA98Ff75D1a7D0c68685c5ef806f110", + decimals: 6, + isStable: true, + imageUrl: "https://assets.coingecko.com/coins/images/325/small/Tether-logo.png", + coingeckoUrl: "https://www.coingecko.com/en/coins/tether", + }, /** Placeholder tokens */ { name: "GMX", symbol: "GMX", - address: "", + address: GMX_STUB_ADDRESS, decimals: 18, imageUrl: "https://assets.coingecko.com/coins/images/18323/small/arbit.png?1631532468", isPlatformToken: true, @@ -1765,14 +1871,14 @@ export const TOKENS: { [chainId: number]: Token[] } = { { name: "Escrowed GMX", symbol: "ESGMX", - address: "", + address: ESGMX_STUB_ADDRESS, decimals: 18, isPlatformToken: true, }, { name: "GMX LP", symbol: "GLP", - address: "", + address: GLP_STUB_ADDRESS, decimals: 18, imageUrl: "https://github.com/gmx-io/gmx-assets/blob/main/GMX-Assets/PNG/GLP_LOGO%20ONLY.png?raw=true", isPlatformToken: true, @@ -1780,7 +1886,7 @@ export const TOKENS: { [chainId: number]: Token[] } = { { name: "GMX Market tokens", symbol: "GM", - address: "", + address: GM_STUB_ADDRESS, decimals: 18, imageUrl: "https://raw.githubusercontent.com/gmx-io/gmx-assets/main/GMX-Assets/PNG/GM_LOGO.png", isPlatformToken: true, @@ -1788,7 +1894,7 @@ export const TOKENS: { [chainId: number]: Token[] } = { { name: "GLV Market tokens", symbol: "GLV", - address: "", + address: GLV_STUB_ADDRESS, decimals: 18, imageUrl: "https://raw.githubusercontent.com/gmx-io/gmx-assets/main/GMX-Assets/PNG/GLV_LOGO.png", isPlatformToken: true, @@ -1883,7 +1989,7 @@ export const TOKENS: { [chainId: number]: Token[] } = { { name: "GMX Market tokens", symbol: "GM", - address: "", + address: GM_STUB_ADDRESS, decimals: 18, imageUrl: "https://raw.githubusercontent.com/gmx-io/gmx-assets/main/GMX-Assets/PNG/GM_LOGO.png", isPlatformToken: true, @@ -1891,29 +1997,12 @@ export const TOKENS: { [chainId: number]: Token[] } = { { name: "GLV Market tokens", symbol: "GLV", - address: "", + address: GLV_STUB_ADDRESS, decimals: 18, imageUrl: "https://raw.githubusercontent.com/gmx-io/gmx-assets/main/GMX-Assets/PNG/GLV_LOGO.png", isPlatformToken: true, }, ], - [BASE]: [ - { - name: "Ethereum", - symbol: "ETH", - address: "0x0000000000000000000000000000000000000000", - decimals: 18, - }, - //usdc - { - name: "USD Coin", - symbol: "USDC", - address: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", - decimals: 6, - isStable: true, - }, - ], - }; export const TOKEN_COLOR_MAP = { @@ -1923,6 +2012,7 @@ export const TOKEN_COLOR_MAP = { PBTC: "#F7931A", USDC: "#2775CA", "USDC.E": "#2A5ADA", + "USDC.SG": "#2775CA", USDT: "#67B18A", MIM: "#9695F8", FRAX: "#000", @@ -2205,3 +2295,9 @@ export const createTokensMap = (tokens: Token[]) => { {} as Record ); }; + +const USD_BASED_STABLE_TOKEN_SYMBOLS = ["USDC", "USDC.E", "USDT", "DAI", "USDC.SG"]; + +export function isUsdBasedStableToken(token: Token) { + return USD_BASED_STABLE_TOKEN_SYMBOLS.includes(token.symbol); +} diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/configs/twap.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/configs/twap.ts new file mode 100644 index 00000000..61ee1a97 --- /dev/null +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/configs/twap.ts @@ -0,0 +1,8 @@ +export const DEFAULT_TWAP_NUMBER_OF_PARTS = 5; +export const MIN_TWAP_NUMBER_OF_PARTS = 2; +export const MAX_TWAP_NUMBER_OF_PARTS = 30; + +export const DEFAULT_TWAP_DURATION = { + minutes: 0, + hours: 10, +}; diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/configs/ui.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/configs/ui.ts deleted file mode 100644 index 87efb411..00000000 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/configs/ui.ts +++ /dev/null @@ -1,27 +0,0 @@ -export const TRIGGER_PREFIX_ABOVE = ">"; -export const TRIGGER_PREFIX_BELOW = "<"; - -export const TOAST_AUTO_CLOSE_TIME = 7000; -export const WS_LOST_FOCUS_TIMEOUT = 60_000; -export const TRADE_LOST_FOCUS_TIMEOUT = 15_000; - -export const PERCENTAGE_SUGGESTIONS = [10, 25, 50, 75]; -export const MAX_METAMASK_MOBILE_DECIMALS = 5; -export const INPUT_LABEL_SEPARATOR = ":"; - -export const TRADE_HISTORY_PER_PAGE = 25; -export const CLAIMS_HISTORY_PER_PAGE = 25; - -export const DEFAULT_TOOLTIP_POSITION = "bottom-start"; - -export const TOOLTIP_OPEN_DELAY = 100; // ms -export const TOOLTIP_CLOSE_DELAY = 100; // ms - -export const MARKET_STATS_DECIMALS = 4; -export const GM_POOL_PRICE_DECIMALS = 4; -export const GLP_PRICE_DECIMALS = 4; -export const GMX_PRICE_DECIMALS = 2; - -export const DATA_LOAD_TIMEOUT_FOR_METRICS = 10000; - -export const MAX_FEEDBACK_LENGTH = 500; diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/configs/uniswapV3.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/configs/uniswapV3.ts new file mode 100644 index 00000000..7d99b1cf --- /dev/null +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/configs/uniswapV3.ts @@ -0,0 +1,21 @@ +import { ARBITRUM, ContractsChainId } from "./chains"; + +export type UniswapV3Deployment = { + positionManager: string; + factory: string; +}; + +const DEPLOYMENTS: Partial> = { + [ARBITRUM]: { + positionManager: "0xC36442b4a4522E871399CD717aBDD847Ab11FE88", + factory: "0x1F98431c8aD98523631AE4a59f267346ea31F984", + }, +}; + +export function getUniswapV3Deployment(chainId: ContractsChainId): UniswapV3Deployment | undefined { + return DEPLOYMENTS[chainId]; +} + +export function hasUniswapV3Deployment(chainId: ContractsChainId): boolean { + return Boolean(getUniswapV3Deployment(chainId)); +} diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/configs/venus.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/configs/venus.ts new file mode 100644 index 00000000..30ec42f1 --- /dev/null +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/configs/venus.ts @@ -0,0 +1,71 @@ +import { ContractsChainId, ARBITRUM } from "./chains.js"; + +export type VenusVTokenConfig = { + vTokenAddress: string; + underlyingAddress: string; + symbol: string; +}; + +export type VenusDeployment = { + comptroller: string; + poolRegistry: string; + poolLens: string; + nativeTokenGateway: string; + vTokens: VenusVTokenConfig[]; +}; + +export const VENUS_EXCHANGE_RATE_DECIMALS = 18n; + +const VENUS_DEPLOYMENTS: Partial> = { + [ARBITRUM]: { + comptroller: "0x317c1A5739F39046E20b08ac9BeEa3f10fD43326", + poolRegistry: "0x382238f07Bc4Fe4aA99e561adE8A4164b5f815DA", + poolLens: "0x53F34FF95367B2A4542461a6A63fD321F8da22AD", + nativeTokenGateway: "0xc8e51418cadc001157506b306C6d0b878f1ff755", + vTokens: [ + { + vTokenAddress: "0xAeB0FEd69354f34831fe1D16475D9A83ddaCaDA6", + underlyingAddress: "0x912ce59144191c1204e64559fe8253a0e49e6548", + symbol: "vARB_Core", + }, + { + vTokenAddress: "0x4f3a73f318C5EA67A86eaaCE24309F29f89900dF", + underlyingAddress: "0x47c031236e19d024b42f8AE6780E44A573170703", + symbol: "vgmBTC-USDC_Core", + }, + { + vTokenAddress: "0x9bb8cEc9C0d46F53b4f2173BB2A0221F66c353cC", + underlyingAddress: "0x70d95587d40A2caf56bd97485aB3Eec10Bee6336", + symbol: "vgmWETH-USDC_Core", + }, + { + vTokenAddress: "0x7D8609f8da70fF9027E9bc5229Af4F6727662707", + underlyingAddress: "0xaf88d065e77c8cc2239327c5edb3a432268e5831", + symbol: "vUSDC_Core", + }, + { + vTokenAddress: "0xB9F9117d4200dC296F9AcD1e8bE1937df834a2fD", + underlyingAddress: "0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9", + symbol: "vUSDT_Core", + }, + { + vTokenAddress: "0xaDa57840B372D4c28623E87FC175dE8490792811", + underlyingAddress: "0x2f2a2543b76a4166549f7aab2e75bef0aefc5b0f", + symbol: "vWBTC_Core", + }, + { + vTokenAddress: "0x68a34332983f4Bf866768DD6D6E638b02eF5e1f0", + underlyingAddress: "0x82af49447d8a07e3bd95bd0d56f35241523fbab1", + symbol: "vWETH_Core", + }, + ], + }, +}; + +export function getVenusDeployment(chainId: ContractsChainId): VenusDeployment | undefined { + return VENUS_DEPLOYMENTS[chainId]; +} + +export function hasVenusDeployment(chainId: ContractsChainId): boolean { + return Boolean(getVenusDeployment(chainId)); +} diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/markets/index.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/markets/index.ts index 7f04bd14..323fd8a8 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/markets/index.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/markets/index.ts @@ -1,23 +1,21 @@ -import {zeroAddress} from "viem"; +import { zeroAddress } from "viem"; -import {getContract} from "../../configs/contracts.js"; -import {convertTokenAddress, getToken} from "../../configs/tokens.js"; - -import {ClaimableFundingData, MarketInfo, MarketsData, MarketSdkConfig, MarketsInfoData} from "../../types/markets.js"; -import {TokensData} from "../../types/tokens.js"; - -import {TIMEZONE_OFFSET_SEC} from "../../utils/common.js"; +import { getContract } from "../../configs/contracts.js"; +import { USE_OPEN_INTEREST_IN_TOKENS_FOR_BALANCE } from "../../configs/dataStore.js"; +import { convertTokenAddress, getToken } from "../../configs/tokens.js"; +import { ClaimableFundingData, MarketInfo, MarketsData, MarketSdkConfig, MarketsInfoData } from "../../types/markets.js"; +import { TokensData } from "../../types/tokens.js"; import graphqlFetcher from "../../utils/graphqlFetcher.js"; -import {getMarketDivisor, getMarketFullName} from "../../utils/markets.js"; -import {getByKey} from "../../utils/objects.js"; +import { getMarketDivisor, getMarketFullName } from "../../utils/markets.js"; +import { getByKey } from "../../utils/objects.js"; -import {Module} from "../base.js"; +import { Module } from "../base.js"; import { - buildClaimableFundingDataRequest, - buildMarketsConfigsRequest, - buildMarketsValuesRequest, + buildClaimableFundingDataRequest, + buildMarketsConfigsRequest, + buildMarketsValuesRequest, } from "./query-builders.js"; -import {MarketConfig, MarketsInfoResult, MarketsResult, MarketValues} from "./types.js"; +import { MarketConfig, MarketsInfoResult, MarketsResult, MarketValues } from "./types.js"; export class Markets extends Module { private async getClaimableFundingData() { @@ -42,7 +40,7 @@ export class Markets extends Module { .then((result) => { return Object.entries(result.data).reduce( (claimableFundingData, [marketAddress, callsResult]: [string, any]) => { - const market = getByKey(marketsData, marketAddress); + const market = getByKey(marketsData, marketAddress) as MarketInfo; if (!market) { return claimableFundingData; @@ -217,8 +215,6 @@ export class Markets extends Module { maxShortPoolUsdForDeposit: dataStoreValues.maxShortPoolUsdForDeposit.returnValues[0], maxLongPoolAmount: dataStoreValues.maxLongPoolAmount.returnValues[0], maxShortPoolAmount: dataStoreValues.maxShortPoolAmount.returnValues[0], - longPoolAmountAdjustment: dataStoreValues.longPoolAmountAdjustment.returnValues[0], - shortPoolAmountAdjustment: dataStoreValues.shortPoolAmountAdjustment.returnValues[0], reserveFactorLong: dataStoreValues.reserveFactorLong.returnValues[0], reserveFactorShort: dataStoreValues.reserveFactorShort.returnValues[0], openInterestReserveFactorLong: dataStoreValues.openInterestReserveFactorLong.returnValues[0], @@ -256,26 +252,30 @@ export class Markets extends Module { dataStoreValues.positionFeeFactorForBalanceWasImproved.returnValues[0], positionFeeFactorForBalanceWasNotImproved: dataStoreValues.positionFeeFactorForBalanceWasNotImproved.returnValues[0], - positionFeeFactorForPositiveImpact: - dataStoreValues.positionFeeFactorForPositiveImpact.returnValues[0], - positionFeeFactorForNegativeImpact: - dataStoreValues.positionFeeFactorForNegativeImpact.returnValues[0], positionImpactFactorPositive: dataStoreValues.positionImpactFactorPositive.returnValues[0], positionImpactFactorNegative: dataStoreValues.positionImpactFactorNegative.returnValues[0], maxPositionImpactFactorPositive: dataStoreValues.maxPositionImpactFactorPositive.returnValues[0], maxPositionImpactFactorNegative: dataStoreValues.maxPositionImpactFactorNegative.returnValues[0], maxPositionImpactFactorForLiquidations: dataStoreValues.maxPositionImpactFactorForLiquidations.returnValues[0], - positionImpactExponentFactor: dataStoreValues.positionImpactExponentFactor.returnValues[0], + maxLendableImpactFactor: dataStoreValues.maxLendableImpactFactor.returnValues[0], + maxLendableImpactFactorForWithdrawals: + dataStoreValues.maxLendableImpactFactorForWithdrawals.returnValues[0], + maxLendableImpactUsd: dataStoreValues.maxLendableImpactUsd.returnValues[0], + lentPositionImpactPoolAmount: dataStoreValues.lentPositionImpactPoolAmount.returnValues[0], + positionImpactExponentFactorPositive: dataStoreValues.positionImpactExponentFactorPositive.returnValues[0], + positionImpactExponentFactorNegative: dataStoreValues.positionImpactExponentFactorNegative.returnValues[0], swapFeeFactorForBalanceWasImproved: dataStoreValues.swapFeeFactorForBalanceWasImproved.returnValues[0], swapFeeFactorForBalanceWasNotImproved: dataStoreValues.swapFeeFactorForBalanceWasNotImproved.returnValues[0], - swapFeeFactorForPositiveImpact: dataStoreValues.swapFeeFactorForPositiveImpact.returnValues[0], - swapFeeFactorForNegativeImpact: dataStoreValues.swapFeeFactorForNegativeImpact.returnValues[0], swapImpactFactorPositive: dataStoreValues.swapImpactFactorPositive.returnValues[0], + atomicSwapFeeFactor: dataStoreValues.atomicSwapFeeFactor.returnValues[0], swapImpactFactorNegative: dataStoreValues.swapImpactFactorNegative.returnValues[0], swapImpactExponentFactor: dataStoreValues.swapImpactExponentFactor.returnValues[0], - atomicSwapFeeFactor: dataStoreValues.atomicSwapFeeFactor.returnValues[0], + withdrawalFeeFactorBalanceWasImproved: + dataStoreValues.withdrawalFeeFactorBalanceWasImproved.returnValues[0], + withdrawalFeeFactorBalanceWasNotImproved: + dataStoreValues.withdrawalFeeFactorBalanceWasNotImproved.returnValues[0], virtualMarketId: dataStoreValues.virtualMarketId.returnValues[0], virtualLongTokenId: dataStoreValues.virtualLongTokenId.returnValues[0], @@ -293,6 +293,35 @@ export class Markets extends Module { }); } + private async getMarketsConstants(): Promise<{ useOpenInterestInTokensForBalance: boolean } | undefined> { + const dataStoreAddress = getContract(this.chainId, "DataStore"); + + return this.sdk + .executeMulticall({ + dataStore: { + contractAddress: dataStoreAddress, + abiId: "DataStore", + calls: { + useOpenInterestInTokensForBalance: { + methodName: "getBool", + params: [USE_OPEN_INTEREST_IN_TOKENS_FOR_BALANCE], + }, + }, + }, + }) + .then((res) => { + if (res.errors.dataStore || !res.data.dataStore) { + // eslint-disable-next-line no-console + console.warn("Failed to get markets constants", res.errors.dataStore, res.data.dataStore); + return undefined; + } + + return { + useOpenInterestInTokensForBalance: res.data.dataStore.useOpenInterestInTokensForBalance.returnValues[0], + }; + }); + } + private _marketsData: MarketsResult | undefined; async getMarkets(offset = 0n, limit = 100n): Promise { if (this._marketsData) { @@ -398,7 +427,7 @@ export class Markets extends Module { const { tokensData, pricesUpdatedAt } = await this.sdk.tokens.getTokensData(); - const [marketsValues, marketsConfigs, claimableFundingData] = await Promise.all([ + const [marketsValues, marketsConfigs, claimableFundingData, marketsConstants] = await Promise.all([ this.getMarketsValues({ account: this.account, marketsAddresses, @@ -410,6 +439,7 @@ export class Markets extends Module { marketsData, }), this.getClaimableFundingData(), + this.getMarketsConstants(), ]); if (!marketsValues || !marketsConfigs || !marketsAddresses || !claimableFundingData) { @@ -433,7 +463,7 @@ export class Markets extends Module { ? getByKey(tokensData!, convertTokenAddress(this.chainId, market.indexTokenAddress, "native")) : undefined; - if (!market || !marketValues || !marketConfig || !longToken || !shortToken || !indexToken) { + if (!market || !marketValues || !marketConfig || !longToken || !shortToken || !indexToken || !marketsConstants) { continue; } @@ -442,6 +472,7 @@ export class Markets extends Module { ...marketConfig, ...claimableFundingData[marketAddress], ...market, + ...marketsConstants, longToken, shortToken, indexToken, @@ -466,21 +497,13 @@ export class Markets extends Module { return; } - const LAST_DAY_UNIX_TIMESTAMP = Math.floor(Date.now() / 1000) - 24 * 60 * 60; - const timestamp = LAST_DAY_UNIX_TIMESTAMP + TIMEZONE_OFFSET_SEC; - const variables = { - timestamp: timestamp, - }; - - return graphqlFetcher(endpoint, POSITIONS_VOLUME_INFOS_QUERY, variables).then( - (data) => { - return data?.positionsVolume.length - ? data?.positionsVolume.reduce((acc, { market, volume }) => { - return { ...acc, [market]: BigInt(volume) }; - }, {}) - : {}; - } - ); + return graphqlFetcher(endpoint, POSITIONS_VOLUME_INFOS_QUERY).then((data) => { + return data?.positionsVolume.length + ? data?.positionsVolume.reduce((acc, { market, volume }) => { + return { ...acc, [market]: BigInt(volume) }; + }, {}) + : {}; + }); } } @@ -492,8 +515,8 @@ type PositionVolumeInfosResponse = { }; const POSITIONS_VOLUME_INFOS_QUERY = ` -query PositionVolumeInfoResolver($timestamp: Float!) { - positionsVolume(where: {timestamp: $timestamp}) { +{ + positionsVolume(where: {period: "1d"}) { market volume } diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/markets/query-builders.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/markets/query-builders.ts index 86c62701..b1645a53 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/markets/query-builders.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/markets/query-builders.ts @@ -1,15 +1,16 @@ -import {CLAIMABLE_FUNDING_AMOUNT, MAX_PNL_FACTOR_FOR_TRADERS_KEY} from "../../configs/dataStore.js"; -import {HASHED_MARKET_CONFIG_KEYS, HASHED_MARKET_VALUES_KEYS} from "../../prebuilt/index.js"; -import {MarketsData} from "../../types/markets.js"; -import {TokensData} from "../../types/tokens.js"; -import {hashDataMap} from "../../utils/hash.js"; -import {hashMarketConfigKeys, hashMarketValuesKeys} from "../../utils/marketKeysAndConfigs.js"; -import {getContractMarketPrices} from "../../utils/markets.js"; -import {getByKey} from "../../utils/objects.js"; -import {MarketConfigMulticallRequestConfig, MarketValuesMulticallRequestConfig} from "./types.js"; -import {getContract} from "../../configs/contracts.js"; -import {ContractCallsConfig} from "../../utils/multicall.js"; -import {ContractsChainId} from "../../configs/chains.js"; +import { ContractsChainId } from "../../configs/chains.js"; +import { getContract } from "../../configs/contracts.js"; +import { CLAIMABLE_FUNDING_AMOUNT, MAX_PNL_FACTOR_FOR_TRADERS_KEY } from "../../configs/dataStore.js"; +import { MarketsData } from "../../types/markets.js"; +import { TokensData } from "../../types/tokens.js"; +import { hashDataMap } from "../../utils/hash.js"; +import { hashMarketConfigKeys, hashMarketValuesKeys } from "../../utils/marketKeysAndConfigs.js"; +import { getContractMarketPrices } from "../../utils/markets.js"; +import type { ContractCallsConfig } from "../../utils/multicall.js"; +import { getByKey } from "../../utils/objects.js"; + +import { MarketConfigMulticallRequestConfig, MarketValuesMulticallRequestConfig } from "./types.js"; +import { HASHED_MARKET_CONFIG_KEYS, HASHED_MARKET_VALUES_KEYS } from "../../prebuilt/index.js"; export function buildClaimableFundingDataRequest({ marketsAddresses, @@ -254,120 +255,232 @@ export async function buildMarketsConfigsRequest( prebuiltHashedKeys = hashMarketConfigKeys(marketsData[marketAddress]); } - // Add validation to check for undefined keys - const requiredKeys = [ - 'isDisabled', 'maxLongPoolAmount', 'maxShortPoolAmount', 'maxLongPoolUsdForDeposit', - 'maxShortPoolUsdForDeposit', 'longPoolAmountAdjustment', 'shortPoolAmountAdjustment', - 'reserveFactorLong', 'reserveFactorShort', 'openInterestReserveFactorLong', - 'openInterestReserveFactorShort', 'maxOpenInterestLong', 'maxOpenInterestShort', - 'minPositionImpactPoolAmount', 'positionImpactPoolDistributionRate', 'borrowingFactorLong', - 'borrowingFactorShort', 'borrowingExponentFactorLong', 'borrowingExponentFactorShort', - 'fundingFactor', 'fundingExponentFactor', 'fundingIncreaseFactorPerSecond', - 'fundingDecreaseFactorPerSecond', 'thresholdForStableFunding', 'thresholdForDecreaseFunding', - 'minFundingFactorPerSecond', 'maxFundingFactorPerSecond', 'maxPnlFactorForTradersLong', - 'maxPnlFactorForTradersShort', 'positionFeeFactorForBalanceWasImproved', - 'positionFeeFactorForBalanceWasNotImproved', 'positionFeeFactorForPositiveImpact', - 'positionFeeFactorForNegativeImpact', 'positionImpactFactorPositive', 'positionImpactFactorNegative', - 'maxPositionImpactFactorPositive', 'maxPositionImpactFactorNegative', 'maxPositionImpactFactorForLiquidations', - 'maxLendableImpactFactor', 'maxLendableImpactFactorForWithdrawals', 'maxLendableImpactUsd', - 'lentPositionImpactPoolAmount', 'minCollateralFactor', 'minCollateralFactorForLiquidation', - 'minCollateralFactorForOpenInterestLong', 'minCollateralFactorForOpenInterestShort', - 'positionImpactExponentFactor', 'swapFeeFactorForBalanceWasImproved', 'swapFeeFactorForBalanceWasNotImproved', - 'swapFeeFactorForPositiveImpact', 'swapFeeFactorForNegativeImpact', 'atomicSwapFeeFactor', - 'swapImpactFactorPositive', 'swapImpactFactorNegative', 'swapImpactExponentFactor', - 'virtualMarketId', 'virtualShortTokenId', 'virtualLongTokenId' - ]; - - for (const key of requiredKeys) { - if (prebuiltHashedKeys[key] === undefined) { - if (!marketsData?.[marketAddress]) { - throw new Error(`No market data found for the market ${marketAddress}`); - } - // Regenerate all keys if any are missing - prebuiltHashedKeys = hashMarketConfigKeys(marketsData[marketAddress]); - break; - } - } - - // Create calls object, filtering out any undefined keys - const calls: Record = {}; - - // Helper function to add call if key exists - const addCall = (callKey: string, methodName: string, hashKey: any) => { - if (hashKey !== undefined) { - calls[callKey] = { - methodName, - params: [hashKey], - }; - } else { - console.warn(`Skipping undefined hash key: ${callKey} for market ${marketAddress}`); - } - }; - - addCall('isDisabled', 'getBool', prebuiltHashedKeys.isDisabled); - addCall('maxLongPoolAmount', 'getUint', prebuiltHashedKeys.maxLongPoolAmount); - addCall('maxShortPoolAmount', 'getUint', prebuiltHashedKeys.maxShortPoolAmount); - addCall('maxLongPoolUsdForDeposit', 'getUint', prebuiltHashedKeys.maxLongPoolUsdForDeposit); - addCall('maxShortPoolUsdForDeposit', 'getUint', prebuiltHashedKeys.maxShortPoolUsdForDeposit); - addCall('longPoolAmountAdjustment', 'getUint', prebuiltHashedKeys.longPoolAmountAdjustment); - addCall('shortPoolAmountAdjustment', 'getUint', prebuiltHashedKeys.shortPoolAmountAdjustment); - addCall('reserveFactorLong', 'getUint', prebuiltHashedKeys.reserveFactorLong); - addCall('reserveFactorShort', 'getUint', prebuiltHashedKeys.reserveFactorShort); - addCall('openInterestReserveFactorLong', 'getUint', prebuiltHashedKeys.openInterestReserveFactorLong); - addCall('openInterestReserveFactorShort', 'getUint', prebuiltHashedKeys.openInterestReserveFactorShort); - addCall('maxOpenInterestLong', 'getUint', prebuiltHashedKeys.maxOpenInterestLong); - addCall('maxOpenInterestShort', 'getUint', prebuiltHashedKeys.maxOpenInterestShort); - addCall('minPositionImpactPoolAmount', 'getUint', prebuiltHashedKeys.minPositionImpactPoolAmount); - addCall('positionImpactPoolDistributionRate', 'getUint', prebuiltHashedKeys.positionImpactPoolDistributionRate); - addCall('borrowingFactorLong', 'getUint', prebuiltHashedKeys.borrowingFactorLong); - addCall('borrowingFactorShort', 'getUint', prebuiltHashedKeys.borrowingFactorShort); - addCall('borrowingExponentFactorLong', 'getUint', prebuiltHashedKeys.borrowingExponentFactorLong); - addCall('borrowingExponentFactorShort', 'getUint', prebuiltHashedKeys.borrowingExponentFactorShort); - addCall('fundingFactor', 'getUint', prebuiltHashedKeys.fundingFactor); - addCall('fundingExponentFactor', 'getUint', prebuiltHashedKeys.fundingExponentFactor); - addCall('fundingIncreaseFactorPerSecond', 'getUint', prebuiltHashedKeys.fundingIncreaseFactorPerSecond); - addCall('fundingDecreaseFactorPerSecond', 'getUint', prebuiltHashedKeys.fundingDecreaseFactorPerSecond); - addCall('thresholdForStableFunding', 'getUint', prebuiltHashedKeys.thresholdForStableFunding); - addCall('thresholdForDecreaseFunding', 'getUint', prebuiltHashedKeys.thresholdForDecreaseFunding); - addCall('minFundingFactorPerSecond', 'getUint', prebuiltHashedKeys.minFundingFactorPerSecond); - addCall('maxFundingFactorPerSecond', 'getUint', prebuiltHashedKeys.maxFundingFactorPerSecond); - addCall('maxPnlFactorForTradersLong', 'getUint', prebuiltHashedKeys.maxPnlFactorForTradersLong); - addCall('maxPnlFactorForTradersShort', 'getUint', prebuiltHashedKeys.maxPnlFactorForTradersShort); - addCall('positionFeeFactorForBalanceWasImproved', 'getUint', prebuiltHashedKeys.positionFeeFactorForBalanceWasImproved); - addCall('positionFeeFactorForBalanceWasNotImproved', 'getUint', prebuiltHashedKeys.positionFeeFactorForBalanceWasNotImproved); - addCall('positionFeeFactorForPositiveImpact', 'getUint', prebuiltHashedKeys.positionFeeFactorForPositiveImpact); - addCall('positionFeeFactorForNegativeImpact', 'getUint', prebuiltHashedKeys.positionFeeFactorForNegativeImpact); - addCall('positionImpactFactorPositive', 'getUint', prebuiltHashedKeys.positionImpactFactorPositive); - addCall('positionImpactFactorNegative', 'getUint', prebuiltHashedKeys.positionImpactFactorNegative); - addCall('maxPositionImpactFactorPositive', 'getUint', prebuiltHashedKeys.maxPositionImpactFactorPositive); - addCall('maxPositionImpactFactorNegative', 'getUint', prebuiltHashedKeys.maxPositionImpactFactorNegative); - addCall('maxPositionImpactFactorForLiquidations', 'getUint', prebuiltHashedKeys.maxPositionImpactFactorForLiquidations); - addCall('maxLendableImpactFactor', 'getUint', prebuiltHashedKeys.maxLendableImpactFactor); - addCall('maxLendableImpactFactorForWithdrawals', 'getUint', prebuiltHashedKeys.maxLendableImpactFactorForWithdrawals); - addCall('maxLendableImpactUsd', 'getUint', prebuiltHashedKeys.maxLendableImpactUsd); - addCall('lentPositionImpactPoolAmount', 'getUint', prebuiltHashedKeys.lentPositionImpactPoolAmount); - addCall('minCollateralFactor', 'getUint', prebuiltHashedKeys.minCollateralFactor); - addCall('minCollateralFactorForLiquidation', 'getUint', prebuiltHashedKeys.minCollateralFactorForLiquidation); - addCall('minCollateralFactorForOpenInterestLong', 'getUint', prebuiltHashedKeys.minCollateralFactorForOpenInterestLong); - addCall('minCollateralFactorForOpenInterestShort', 'getUint', prebuiltHashedKeys.minCollateralFactorForOpenInterestShort); - addCall('positionImpactExponentFactor', 'getUint', prebuiltHashedKeys.positionImpactExponentFactor); - addCall('swapFeeFactorForBalanceWasImproved', 'getUint', prebuiltHashedKeys.swapFeeFactorForBalanceWasImproved); - addCall('swapFeeFactorForBalanceWasNotImproved', 'getUint', prebuiltHashedKeys.swapFeeFactorForBalanceWasNotImproved); - addCall('swapFeeFactorForPositiveImpact', 'getUint', prebuiltHashedKeys.swapFeeFactorForPositiveImpact); - addCall('swapFeeFactorForNegativeImpact', 'getUint', prebuiltHashedKeys.swapFeeFactorForNegativeImpact); - addCall('atomicSwapFeeFactor', 'getUint', prebuiltHashedKeys.atomicSwapFeeFactor); - addCall('swapImpactFactorPositive', 'getUint', prebuiltHashedKeys.swapImpactFactorPositive); - addCall('swapImpactFactorNegative', 'getUint', prebuiltHashedKeys.swapImpactFactorNegative); - addCall('swapImpactExponentFactor', 'getUint', prebuiltHashedKeys.swapImpactExponentFactor); - addCall('virtualMarketId', 'getBytes32', prebuiltHashedKeys.virtualMarketId); - addCall('virtualShortTokenId', 'getBytes32', prebuiltHashedKeys.virtualShortTokenId); - addCall('virtualLongTokenId', 'getBytes32', prebuiltHashedKeys.virtualLongTokenId); - request[`${marketAddress}-dataStore`] = { contractAddress: dataStoreAddress, abiId: "DataStore", - calls, - } as any; + calls: { + isDisabled: { + methodName: "getBool", + params: [prebuiltHashedKeys.isDisabled], + }, + maxLongPoolAmount: { + methodName: "getUint", + params: [prebuiltHashedKeys.maxLongPoolAmount], + }, + maxShortPoolAmount: { + methodName: "getUint", + params: [prebuiltHashedKeys.maxShortPoolAmount], + }, + maxLongPoolUsdForDeposit: { + methodName: "getUint", + params: [prebuiltHashedKeys.maxLongPoolUsdForDeposit], + }, + maxShortPoolUsdForDeposit: { + methodName: "getUint", + params: [prebuiltHashedKeys.maxShortPoolUsdForDeposit], + }, + reserveFactorLong: { + methodName: "getUint", + params: [prebuiltHashedKeys.reserveFactorLong], + }, + reserveFactorShort: { + methodName: "getUint", + params: [prebuiltHashedKeys.reserveFactorShort], + }, + openInterestReserveFactorLong: { + methodName: "getUint", + params: [prebuiltHashedKeys.openInterestReserveFactorLong], + }, + openInterestReserveFactorShort: { + methodName: "getUint", + params: [prebuiltHashedKeys.openInterestReserveFactorShort], + }, + maxOpenInterestLong: { + methodName: "getUint", + params: [prebuiltHashedKeys.maxOpenInterestLong], + }, + maxOpenInterestShort: { + methodName: "getUint", + params: [prebuiltHashedKeys.maxOpenInterestShort], + }, + minPositionImpactPoolAmount: { + methodName: "getUint", + params: [prebuiltHashedKeys.minPositionImpactPoolAmount], + }, + positionImpactPoolDistributionRate: { + methodName: "getUint", + params: [prebuiltHashedKeys.positionImpactPoolDistributionRate], + }, + borrowingFactorLong: { + methodName: "getUint", + params: [prebuiltHashedKeys.borrowingFactorLong], + }, + borrowingFactorShort: { + methodName: "getUint", + params: [prebuiltHashedKeys.borrowingFactorShort], + }, + borrowingExponentFactorLong: { + methodName: "getUint", + params: [prebuiltHashedKeys.borrowingExponentFactorLong], + }, + borrowingExponentFactorShort: { + methodName: "getUint", + params: [prebuiltHashedKeys.borrowingExponentFactorShort], + }, + fundingFactor: { + methodName: "getUint", + params: [prebuiltHashedKeys.fundingFactor], + }, + fundingExponentFactor: { + methodName: "getUint", + params: [prebuiltHashedKeys.fundingExponentFactor], + }, + fundingIncreaseFactorPerSecond: { + methodName: "getUint", + params: [prebuiltHashedKeys.fundingIncreaseFactorPerSecond], + }, + fundingDecreaseFactorPerSecond: { + methodName: "getUint", + params: [prebuiltHashedKeys.fundingDecreaseFactorPerSecond], + }, + thresholdForStableFunding: { + methodName: "getUint", + params: [prebuiltHashedKeys.thresholdForStableFunding], + }, + thresholdForDecreaseFunding: { + methodName: "getUint", + params: [prebuiltHashedKeys.thresholdForDecreaseFunding], + }, + minFundingFactorPerSecond: { + methodName: "getUint", + params: [prebuiltHashedKeys.minFundingFactorPerSecond], + }, + maxFundingFactorPerSecond: { + methodName: "getUint", + params: [prebuiltHashedKeys.maxFundingFactorPerSecond], + }, + maxPnlFactorForTradersLong: { + methodName: "getUint", + params: [prebuiltHashedKeys.maxPnlFactorForTradersLong], + }, + maxPnlFactorForTradersShort: { + methodName: "getUint", + params: [prebuiltHashedKeys.maxPnlFactorForTradersShort], + }, + positionFeeFactorForBalanceWasImproved: { + methodName: "getUint", + params: [prebuiltHashedKeys.positionFeeFactorForBalanceWasImproved], + }, + positionFeeFactorForBalanceWasNotImproved: { + methodName: "getUint", + params: [prebuiltHashedKeys.positionFeeFactorForBalanceWasNotImproved], + }, + positionImpactFactorPositive: { + methodName: "getUint", + params: [prebuiltHashedKeys.positionImpactFactorPositive], + }, + positionImpactFactorNegative: { + methodName: "getUint", + params: [prebuiltHashedKeys.positionImpactFactorNegative], + }, + maxPositionImpactFactorPositive: { + methodName: "getUint", + params: [prebuiltHashedKeys.maxPositionImpactFactorPositive], + }, + maxPositionImpactFactorNegative: { + methodName: "getUint", + params: [prebuiltHashedKeys.maxPositionImpactFactorNegative], + }, + maxPositionImpactFactorForLiquidations: { + methodName: "getUint", + params: [prebuiltHashedKeys.maxPositionImpactFactorForLiquidations], + }, + maxLendableImpactFactor: { + methodName: "getUint", + params: [prebuiltHashedKeys.maxLendableImpactFactor], + }, + maxLendableImpactFactorForWithdrawals: { + methodName: "getUint", + params: [prebuiltHashedKeys.maxLendableImpactFactorForWithdrawals], + }, + maxLendableImpactUsd: { + methodName: "getUint", + params: [prebuiltHashedKeys.maxLendableImpactUsd], + }, + lentPositionImpactPoolAmount: { + methodName: "getUint", + params: [prebuiltHashedKeys.lentPositionImpactPoolAmount], + }, + minCollateralFactor: { + methodName: "getUint", + params: [prebuiltHashedKeys.minCollateralFactor], + }, + minCollateralFactorForLiquidation: { + methodName: "getUint", + params: [prebuiltHashedKeys.minCollateralFactorForLiquidation], + }, + minCollateralFactorForOpenInterestLong: { + methodName: "getUint", + params: [prebuiltHashedKeys.minCollateralFactorForOpenInterestLong], + }, + minCollateralFactorForOpenInterestShort: { + methodName: "getUint", + params: [prebuiltHashedKeys.minCollateralFactorForOpenInterestShort], + }, + positionImpactExponentFactorPositive: { + methodName: "getUint", + params: [prebuiltHashedKeys.positionImpactExponentFactorPositive], + }, + positionImpactExponentFactorNegative: { + methodName: "getUint", + params: [prebuiltHashedKeys.positionImpactExponentFactorNegative], + }, + swapFeeFactorForBalanceWasImproved: { + methodName: "getUint", + params: [prebuiltHashedKeys.swapFeeFactorForBalanceWasImproved], + }, + swapFeeFactorForBalanceWasNotImproved: { + methodName: "getUint", + params: [prebuiltHashedKeys.swapFeeFactorForBalanceWasNotImproved], + }, + atomicSwapFeeFactor: { + methodName: "getUint", + params: [prebuiltHashedKeys.atomicSwapFeeFactor], + }, + swapImpactFactorPositive: { + methodName: "getUint", + params: [prebuiltHashedKeys.swapImpactFactorPositive], + }, + swapImpactFactorNegative: { + methodName: "getUint", + params: [prebuiltHashedKeys.swapImpactFactorNegative], + }, + swapImpactExponentFactor: { + methodName: "getUint", + params: [prebuiltHashedKeys.swapImpactExponentFactor], + }, + withdrawalFeeFactorBalanceWasImproved: { + methodName: "getUint", + params: [prebuiltHashedKeys.withdrawalFeeFactorBalanceWasImproved], + }, + withdrawalFeeFactorBalanceWasNotImproved: { + methodName: "getUint", + params: [prebuiltHashedKeys.withdrawalFeeFactorBalanceWasNotImproved], + }, + virtualMarketId: { + methodName: "getBytes32", + params: [prebuiltHashedKeys.virtualMarketId], + }, + virtualShortTokenId: { + methodName: "getBytes32", + params: [prebuiltHashedKeys.virtualShortTokenId], + }, + virtualLongTokenId: { + methodName: "getBytes32", + params: [prebuiltHashedKeys.virtualLongTokenId], + }, + }, + } satisfies ContractCallsConfig; } return request; diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/markets/types.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/markets/types.ts index a31c1bc2..8ac0bab2 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/markets/types.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/markets/types.ts @@ -1,6 +1,6 @@ -import {MarketInfo, MarketsData, MarketsInfoData} from "../../types/markets.js"; -import {TokensData} from "../../types/tokens.js"; -import {MulticallRequestConfig} from "../../utils/multicall.js"; +import { MarketInfo, MarketsData, MarketsInfoData } from "../../types/markets.js"; +import { TokensData } from "../../types/tokens.js"; +import { MulticallRequestConfig } from "../../utils/multicall.js"; export type MarketsResult = { marketsData?: MarketsData; @@ -50,8 +50,6 @@ export type MarketConfig = Pick< | "maxShortPoolUsdForDeposit" | "maxLongPoolAmount" | "maxShortPoolAmount" - | "longPoolAmountAdjustment" - | "shortPoolAmountAdjustment" | "reserveFactorLong" | "reserveFactorShort" | "openInterestReserveFactorLong" @@ -75,30 +73,33 @@ export type MarketConfig = Pick< | "maxPnlFactorForTradersLong" | "maxPnlFactorForTradersShort" | "minCollateralFactor" + | "minCollateralFactorForLiquidation" | "minCollateralFactorForOpenInterestLong" | "minCollateralFactorForOpenInterestShort" - | "positionFeeFactorForPositiveImpact" - | "positionFeeFactorForNegativeImpact" + | "positionFeeFactorForBalanceWasImproved" + | "positionFeeFactorForBalanceWasNotImproved" | "positionImpactFactorPositive" | "positionImpactFactorNegative" | "maxPositionImpactFactorPositive" | "maxPositionImpactFactorNegative" | "maxPositionImpactFactorForLiquidations" - | "positionImpactExponentFactor" - | "swapFeeFactorForPositiveImpact" - | "swapFeeFactorForNegativeImpact" + | "maxLendableImpactFactor" + | "maxLendableImpactFactorForWithdrawals" + | "maxLendableImpactUsd" + | "lentPositionImpactPoolAmount" + | "positionImpactExponentFactorPositive" + | "positionImpactExponentFactorNegative" + | "swapFeeFactorForBalanceWasImproved" + | "swapFeeFactorForBalanceWasNotImproved" | "swapImpactFactorPositive" | "swapImpactFactorNegative" | "swapImpactExponentFactor" + | "atomicSwapFeeFactor" + | "withdrawalFeeFactorBalanceWasImproved" + | "withdrawalFeeFactorBalanceWasNotImproved" | "virtualMarketId" | "virtualLongTokenId" | "virtualShortTokenId" - | "atomicSwapFeeFactor" - | "swapFeeFactorForBalanceWasImproved" - | "swapFeeFactorForBalanceWasNotImproved" - | "positionFeeFactorForBalanceWasImproved" - | "positionFeeFactorForBalanceWasNotImproved" - | "minCollateralFactorForLiquidation" >; export type MarketValuesMulticallRequestConfig = MulticallRequestConfig<{ @@ -142,8 +143,6 @@ export type MarketConfigMulticallRequestConfig = MulticallRequestConfig<{ | "maxShortPoolAmount" | "maxLongPoolUsdForDeposit" | "maxShortPoolUsdForDeposit" - | "longPoolAmountAdjustment" - | "shortPoolAmountAdjustment" | "reserveFactorLong" | "reserveFactorShort" | "openInterestReserveFactorLong" @@ -166,37 +165,34 @@ export type MarketConfigMulticallRequestConfig = MulticallRequestConfig<{ | "maxFundingFactorPerSecond" | "maxPnlFactorForTradersLong" | "maxPnlFactorForTradersShort" - | "positionFeeFactorForPositiveImpact" - | "positionFeeFactorForNegativeImpact" + | "positionFeeFactorForBalanceWasImproved" + | "positionFeeFactorForBalanceWasNotImproved" | "positionImpactFactorPositive" | "positionImpactFactorNegative" | "maxPositionImpactFactorPositive" | "maxPositionImpactFactorNegative" | "maxPositionImpactFactorForLiquidations" - | "minCollateralFactor" - | "minCollateralFactorForOpenInterestLong" - | "minCollateralFactorForOpenInterestShort" - | "positionImpactExponentFactor" - | "swapFeeFactorForPositiveImpact" - | "swapFeeFactorForNegativeImpact" - | "swapImpactFactorPositive" - | "swapImpactFactorNegative" - | "swapImpactExponentFactor" - | "virtualMarketId" - | "virtualLongTokenId" - | "virtualShortTokenId" - | "positionFeeFactorForBalanceWasImproved" - | "positionFeeFactorForBalanceWasNotImproved" - | "swapFeeFactorForBalanceWasImproved" - | "swapFeeFactorForBalanceWasNotImproved" - | "atomicSwapFeeFactor" - | "minCollateralFactorForLiquidation" | "maxLendableImpactFactor" | "maxLendableImpactFactorForWithdrawals" | "maxLendableImpactUsd" | "lentPositionImpactPoolAmount" - | "minCollateralFactor", - + | "minCollateralFactor" + | "minCollateralFactorForLiquidation" + | "minCollateralFactorForOpenInterestLong" + | "minCollateralFactorForOpenInterestShort" + | "positionImpactExponentFactorPositive" + | "positionImpactExponentFactorNegative" + | "swapFeeFactorForBalanceWasImproved" + | "swapFeeFactorForBalanceWasNotImproved" + | "atomicSwapFeeFactor" + | "swapImpactFactorPositive" + | "swapImpactFactorNegative" + | "swapImpactExponentFactor" + | "withdrawalFeeFactorBalanceWasImproved" + | "withdrawalFeeFactorBalanceWasNotImproved" + | "virtualMarketId" + | "virtualLongTokenId" + | "virtualShortTokenId", { methodName: string; params: any[]; diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/oracle.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/oracle.ts index f2fa0381..88a3ea25 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/oracle.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/oracle.ts @@ -1,9 +1,9 @@ import fetch from "cross-fetch"; -import type {GmxSdk} from "../index.js"; -import {MarketSdkConfig} from "../types/markets.js"; -import {buildUrl} from "../utils/buildUrl.js"; +import { MarketSdkConfig } from "../types/markets.js"; +import { buildUrl } from "../utils/buildUrl.js"; +import type { GmxSdk } from "../index.js"; export type TickersResponse = { minPrice: string; @@ -14,12 +14,16 @@ export type TickersResponse = { updatedAt: number; }[]; -export type TokensResponse = { +type RawTokenResponse = { symbol: string; address: string; decimals: number; synthetic: boolean; -}[]; +}; + +export type TokensResponse = (Omit & { + isSynthetic: boolean; +})[]; export class Oracle { private url: string; @@ -43,7 +47,7 @@ export class Oracle { getTokens(): Promise { return fetch(buildUrl(this.url!, "/tokens")) .then((res) => res.json()) - .then((res) => + .then((res: { tokens: RawTokenResponse[] }) => res.tokens.map(({ synthetic, ...rest }) => { return { ...rest, diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/orders/helpers.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/orders/helpers.ts index 1f0e6b35..b946e243 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/orders/helpers.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/orders/helpers.ts @@ -1,207 +1,205 @@ -import {MarketsInfoData} from "../../types/markets.js"; -import {DecreasePositionSwapType, OrderType} from "../../types/orders.js"; -import {TokenData, TokensData, TokensRatio} from "../../types/tokens.js"; -import {DecreasePositionAmounts, SwapAmounts, SwapOptimizationOrderArray} from "../../types/trade.js"; -import {getByKey} from "../../utils/objects.js"; -import {createFindSwapPath} from "../../utils/swap/swapPath.js"; -import { - convertToUsd, - getIsEquivalentTokens, - getIsUnwrap, - getIsWrap, - getTokensRatioByPrice -} from "../../utils/tokens.js"; -import {getAcceptablePriceInfo, getDefaultAcceptablePriceImpactBps, getOrderThresholdType} from "../../utils/prices.js"; +import type { GasLimitsConfig } from "../../types/fees.js"; +import { MarketsInfoData } from "../../types/markets.js"; +import { OrderType, SwapPricingType } from "../../types/orders.js"; +import { TokenData, TokensData, TokensRatio } from "../../types/tokens.js"; +import { SwapAmounts, SwapOptimizationOrderArray } from "../../types/trade.js"; +import { getByKey } from "../../utils/objects.js"; +import { getSwapAmountsByFromValue, getSwapAmountsByToValue } from "../../utils/swap/index.js"; +import { createFindSwapPath } from "../../utils/swap/swapPath.js"; +import { convertToUsd, getIsUnwrap, getIsWrap, getTokensRatioByPrice } from "../../utils/tokens.js"; +import { getIncreasePositionAmounts } from "../../utils/trade/increase.js"; -import type {GmxSdk} from "../.."; -import {getSwapAmountsByFromValue, getSwapAmountsByToValue} from "../../utils/swap/index.js"; -import {EntryField, SidecarSlTpOrderEntryValid} from "../../types/sidecarOrders.js"; -import {ethers} from "ethers"; -import {GasLimitsConfig} from "../../types/fees.js"; -import {getIncreasePositionAmounts} from "../../utils/trade/increase.js"; +import type { GmxSdk } from "../.."; +import { ethers } from "ethers"; +import { DecreasePositionSwapType } from "../../types/orders.js"; +import { SidecarSlTpOrderEntryValid, EntryField } from "../../types/sidecarOrders.js"; +import { DecreasePositionAmounts } from "../../types/trade.js"; +import { getDefaultAcceptablePriceImpactBps, getAcceptablePriceInfo, getOrderThresholdType } from "../../utils/prices.js"; +import { getIsEquivalentTokens } from "../../utils/tokens.js"; /** Base Optional params for helpers, allows to avoid calling markets, tokens and uiFeeFactor methods if they are already passed */ interface BaseOptionalParams { - marketsInfoData?: MarketsInfoData; - tokensData?: TokensData; - uiFeeFactor?: bigint; - gasPrice?: bigint; - gasLimits?: GasLimitsConfig; - } - - export type PositionIncreaseParams = ( - | { - /** Increase amounts will be calculated based on collateral amount */ - payAmount: bigint; - } - | { - /** Increase amounts will be calculated based on position size amount */ - sizeAmount: bigint; - } - ) & { - marketAddress: string; - payTokenAddress: string; - collateralTokenAddress: string; - - /** @default 100 */ - allowedSlippageBps?: number; - referralCodeForTxn?: string; - - leverage?: bigint; - /** If presented, then it's limit order */ - limitPrice?: bigint; - acceptablePriceImpactBuffer?: number; - fixedAcceptablePriceImpactBps?: bigint; - - skipSimulation?: boolean; + marketsInfoData?: MarketsInfoData; + tokensData?: TokensData; + uiFeeFactor?: bigint; + gasPrice?: bigint; + gasLimits?: GasLimitsConfig; +} + +export type PositionIncreaseParams = ( + | { + /** Increase amounts will be calculated based on collateral amount */ + payAmount: bigint; + } + | { + /** Increase amounts will be calculated based on position size amount */ + sizeAmount: bigint; + } +) & { + marketAddress: string; + payTokenAddress: string; + collateralTokenAddress: string; + + /** @default 100 */ + allowedSlippageBps?: number; + referralCodeForTxn?: string; + + leverage?: bigint; + /** If presented, then it's limit order */ + limitPrice?: bigint; + acceptablePriceImpactBuffer?: number; + fixedAcceptablePriceImpactBps?: bigint; + + skipSimulation?: boolean; stopLossPrice?: bigint; takeProfitPrice?: bigint; - } & BaseOptionalParams; - - function passThoughOrFetch(value: T, condition: (input: T) => boolean, fetchFn: () => Promise) { - if (condition(value)) { - return value; - } - - return fetchFn(); +} & BaseOptionalParams; + +function passThoughOrFetch(value: T, condition: (input: T) => boolean, fetchFn: () => Promise) { + if (condition(value)) { + return value; } - - async function getAndValidateBaseParams( - sdk: GmxSdk, - params: BaseOptionalParams - ): Promise> { - const [marketsInfoResult, uiFeeFactor, gasPrice, gasLimits] = await Promise.all([ - passThoughOrFetch( - { - marketsInfoData: params.marketsInfoData, - tokensData: params.tokensData, - }, - (input) => Boolean(input.marketsInfoData) && Boolean(input.tokensData), - () => sdk.markets.getMarketsInfo() - ), - passThoughOrFetch( - params.uiFeeFactor, - (input) => input !== undefined, - () => sdk.utils.getUiFeeFactor() - ), - passThoughOrFetch( - params.gasPrice, - (input) => input !== undefined, - () => sdk.utils.getGasPrice() - ), - passThoughOrFetch( - params.gasLimits, - (input) => input !== undefined, - () => sdk.utils.getGasLimits() - ), - ]); - - if (!marketsInfoResult.marketsInfoData) { - throw new Error("Markets info data is not available"); - } - - if (!marketsInfoResult.tokensData) { - throw new Error("Tokens data is not available"); - } - - if (uiFeeFactor === undefined) { - throw new Error("Ui fee factor is not available"); - } - - if (gasPrice === undefined) { - throw new Error("Gas price is not available"); - } - - if (gasLimits === undefined) { - throw new Error("Gas limits are not available"); - } - - return { - tokensData: marketsInfoResult.tokensData, - marketsInfoData: marketsInfoResult.marketsInfoData, - uiFeeFactor, - gasPrice, - gasLimits, - }; + + return fetchFn(); +} + +async function getAndValidateBaseParams( + sdk: GmxSdk, + params: BaseOptionalParams +): Promise> { + const [marketsInfoResult, uiFeeFactor, gasPrice, gasLimits] = await Promise.all([ + passThoughOrFetch( + { + marketsInfoData: params.marketsInfoData, + tokensData: params.tokensData, + }, + (input) => Boolean(input.marketsInfoData) && Boolean(input.tokensData), + () => sdk.markets.getMarketsInfo() + ), + passThoughOrFetch( + params.uiFeeFactor, + (input) => input !== undefined, + () => sdk.utils.getUiFeeFactor() + ), + passThoughOrFetch( + params.gasPrice, + (input) => input !== undefined, + () => sdk.utils.getGasPrice() + ), + passThoughOrFetch( + params.gasLimits, + (input) => input !== undefined, + () => sdk.utils.getGasLimits() + ), + ]); + + if (!marketsInfoResult.marketsInfoData) { + throw new Error("Markets info data is not available"); } - - export async function increaseOrderHelper( - sdk: GmxSdk, - params: PositionIncreaseParams & { - isLong: boolean; + + if (!marketsInfoResult.tokensData) { + throw new Error("Tokens data is not available"); + } + + if (uiFeeFactor === undefined) { + throw new Error("Ui fee factor is not available"); + } + + if (gasPrice === undefined) { + throw new Error("Gas price is not available"); + } + + if (gasLimits === undefined) { + throw new Error("Gas limits are not available"); + } + + return { + tokensData: marketsInfoResult.tokensData, + marketsInfoData: marketsInfoResult.marketsInfoData, + uiFeeFactor, + gasPrice, + gasLimits, + }; +} + +export async function increaseOrderHelper( + sdk: GmxSdk, + params: PositionIncreaseParams & { + isLong: boolean; stopLossPrice?: bigint; takeProfitPrice?: bigint; - } - ) { - const { tokensData, marketsInfoData, uiFeeFactor, gasLimits, gasPrice } = await getAndValidateBaseParams(sdk, params); - - const isLimit = Boolean(params.limitPrice); - - const fromToken = tokensData[params.payTokenAddress]; - const collateralToken = tokensData[params.collateralTokenAddress]; - - if (!fromToken) { - throw new Error("payTokenAddress: token is not available"); - } - - if (!collateralToken) { - throw new Error("collateralTokenAddress: token is not available"); - } - - if (fromToken.isSynthetic) { - throw new Error("payTokenAddress: synthetic tokens are not supported"); - } - - if (collateralToken.isSynthetic) { - throw new Error("collateralTokenAddress: synthetic tokens are not supported"); - } - - const marketInfo = getByKey(marketsInfoData, params.marketAddress); - - if (!marketInfo) { - throw new Error("Market info is not available"); - } - - const collateralTokenAddress = collateralToken.address; - const allowedSlippage = params.allowedSlippageBps ?? 100; - - const findSwapPath = createFindSwapPath({ - chainId: sdk.chainId, - fromTokenAddress: params.payTokenAddress, - toTokenAddress: collateralTokenAddress, - marketsInfoData, - gasEstimationParams: { - gasLimits, - gasPrice, - tokensData, - }, - isExpressFeeSwap: false, - }); - - const payOrSizeAmount = "payAmount" in params ? params.payAmount : params.sizeAmount; - - const increaseAmounts = getIncreasePositionAmounts({ - marketInfo, - indexToken: marketInfo.indexToken, - initialCollateralToken: fromToken, - collateralToken, - isLong: params.isLong, - initialCollateralAmount: payOrSizeAmount, - position: undefined, - indexTokenAmount: payOrSizeAmount, - leverage: params.leverage, - triggerPrice: params.limitPrice, - limitOrderType: params.limitPrice ? OrderType.LimitIncrease : undefined, - userReferralInfo: undefined, - strategy: "payAmount" in params ? "leverageByCollateral" : "leverageBySize", - findSwapPath: findSwapPath, - uiFeeFactor, - acceptablePriceImpactBuffer: params.acceptablePriceImpactBuffer, - fixedAcceptablePriceImpactBps: params.fixedAcceptablePriceImpactBps, - externalSwapQuote: undefined, - marketsInfoData, - chainId: sdk.chainId, - externalSwapQuoteParams: undefined, + } +) { + const { tokensData, marketsInfoData, uiFeeFactor, gasLimits, gasPrice } = await getAndValidateBaseParams(sdk, params); + + const isLimit = Boolean(params.limitPrice); + + const fromToken = tokensData[params.payTokenAddress]; + const collateralToken = tokensData[params.collateralTokenAddress]; + + if (!fromToken) { + throw new Error("payTokenAddress: token is not available"); + } + + if (!collateralToken) { + throw new Error("collateralTokenAddress: token is not available"); + } + + if (fromToken.isSynthetic) { + throw new Error("payTokenAddress: synthetic tokens are not supported"); + } + + if (collateralToken.isSynthetic) { + throw new Error("collateralTokenAddress: synthetic tokens are not supported"); + } + + const marketInfo = getByKey(marketsInfoData, params.marketAddress); + + if (!marketInfo) { + throw new Error("Market info is not available"); + } + + const collateralTokenAddress = collateralToken.address; + const allowedSlippage = params.allowedSlippageBps ?? 100; + + const findSwapPath = createFindSwapPath({ + chainId: sdk.chainId, + fromTokenAddress: params.payTokenAddress, + toTokenAddress: collateralTokenAddress, + marketsInfoData, + gasEstimationParams: { + gasLimits, + gasPrice, + tokensData, + }, + swapPricingType: SwapPricingType.Swap, + }); + + const payOrSizeAmount = "payAmount" in params ? params.payAmount : params.sizeAmount; + + const increaseAmounts = getIncreasePositionAmounts({ + marketInfo, + indexToken: marketInfo.indexToken, + initialCollateralToken: fromToken, + collateralToken, + isLong: params.isLong, + initialCollateralAmount: payOrSizeAmount, + position: undefined, + indexTokenAmount: payOrSizeAmount, + leverage: params.leverage, + triggerPrice: params.limitPrice, + limitOrderType: params.limitPrice ? OrderType.LimitIncrease : undefined, + userReferralInfo: undefined, + strategy: "payAmount" in params ? "leverageByCollateral" : "leverageBySize", + findSwapPath: findSwapPath, + uiFeeFactor, + acceptablePriceImpactBuffer: params.acceptablePriceImpactBuffer, + fixedAcceptablePriceImpactBps: params.fixedAcceptablePriceImpactBps, + externalSwapQuote: undefined, + marketsInfoData, + chainId: sdk.chainId, + externalSwapQuoteParams: undefined, + isSetAcceptablePriceImpactEnabled: false, }); @@ -398,193 +396,192 @@ interface BaseOptionalParams { createSltpEntries.push(takeProfitEntry) } - - const createIncreaseOrderParams: Parameters[0] = { - marketsInfoData, - tokensData, - isLimit, - marketAddress: params.marketAddress, - fromToken: tokensData[params.payTokenAddress], - allowedSlippage, - collateralToken, - referralCodeForTxn: params.referralCodeForTxn, - triggerPrice: params.limitPrice, - collateralTokenAddress: collateralToken.address, - isLong: params.isLong, - receiveTokenAddress: collateralTokenAddress, - indexToken: marketInfo.indexToken, - marketInfo, - skipSimulation: params.skipSimulation, - increaseAmounts, - createSltpEntries: createSltpEntries, - }; - - return sdk.orders.createIncreaseOrder(createIncreaseOrderParams); - } - - function getTriggerRatio({ - toToken, + + const createIncreaseOrderParams: Parameters[0] = { + marketsInfoData, + tokensData, + isLimit, + marketAddress: params.marketAddress, + fromToken: tokensData[params.payTokenAddress], + allowedSlippage, + collateralToken, + referralCodeForTxn: params.referralCodeForTxn, + triggerPrice: params.limitPrice, + collateralTokenAddress: collateralToken.address, + isLong: params.isLong, + receiveTokenAddress: collateralTokenAddress, + indexToken: marketInfo.indexToken, + marketInfo, + skipSimulation: params.skipSimulation, + increaseAmounts, + createSltpEntries: createSltpEntries, + }; + + return sdk.orders.createIncreaseOrder(createIncreaseOrderParams); +} + +function getTriggerRatio({ + toToken, + fromToken, + triggerPrice, +}: { + toToken: TokenData; + fromToken: TokenData; + triggerPrice: bigint; +}) { + const fromTokenPrice = fromToken?.prices.minPrice; + const markPrice = toToken.prices.minPrice; + + const markRatio = getTokensRatioByPrice({ fromToken, - triggerPrice, - }: { - toToken: TokenData; - fromToken: TokenData; - triggerPrice: bigint; - }) { - const fromTokenPrice = fromToken?.prices.minPrice; - const markPrice = toToken.prices.minPrice; - - const markRatio = getTokensRatioByPrice({ - fromToken, - toToken, - fromPrice: fromTokenPrice, - toPrice: markPrice, - }); - - const triggerRatio: TokensRatio = { - ratio: triggerPrice > 0 ? triggerPrice : markRatio.ratio, - largestToken: markRatio.largestToken, - smallestToken: markRatio.smallestToken, - }; - - return triggerRatio; + toToken, + fromPrice: fromTokenPrice, + toPrice: markPrice, + }); + + const triggerRatio: TokensRatio = { + ratio: triggerPrice > 0 ? triggerPrice : markRatio.ratio, + largestToken: markRatio.largestToken, + smallestToken: markRatio.smallestToken, + }; + + return triggerRatio; +} + +export type SwapParams = ( + | { + fromAmount: bigint; + } + | { + toAmount: bigint; + } +) & { + fromTokenAddress: string; + toTokenAddress: string; + allowedSlippageBps?: number; + referralCodeForTxn?: string; + + /** If presented, then it's limit swap order */ + triggerPrice?: bigint; +} & BaseOptionalParams; + +export async function swap(sdk: GmxSdk, params: SwapParams) { + const { tokensData, marketsInfoData, uiFeeFactor, gasLimits, gasPrice } = await getAndValidateBaseParams(sdk, params); + + const fromToken = tokensData[params.fromTokenAddress]; + const toToken = tokensData[params.toTokenAddress]; + + if (!fromToken || !toToken) { + throw new Error("From or to token is not available"); } - - export type SwapParams = ( - | { - fromAmount: bigint; - } - | { - toAmount: bigint; - } - ) & { - fromTokenAddress: string; - toTokenAddress: string; - allowedSlippageBps?: number; - referralCodeForTxn?: string; - - /** If presented, then it's limit swap order */ - triggerPrice?: bigint; - } & BaseOptionalParams; - - export async function swap(sdk: GmxSdk, params: SwapParams) { - const { tokensData, marketsInfoData, uiFeeFactor, gasLimits, gasPrice } = await getAndValidateBaseParams(sdk, params); - - const fromToken = tokensData[params.fromTokenAddress]; - const toToken = tokensData[params.toTokenAddress]; - - if (!fromToken || !toToken) { - throw new Error("From or to token is not available"); - } - - if (toToken.isSynthetic) { - throw new Error(`Synthetic tokens are not supported: ${toToken.symbol}`); - } - - if (fromToken.isSynthetic) { - throw new Error(`Synthetic tokens are not supported: ${fromToken.symbol}`); - } - - const isLimit = Boolean(params.triggerPrice); - - if (!fromToken || !toToken) { - return undefined; - } - - const findSwapPath = createFindSwapPath({ - chainId: sdk.chainId, - fromTokenAddress: params.fromTokenAddress, - toTokenAddress: params.toTokenAddress, - marketsInfoData, - gasEstimationParams: { - gasLimits, - gasPrice, - tokensData, - }, - isExpressFeeSwap: false, - }); - - const isWrapOrUnwrap = Boolean( - fromToken && toToken && (getIsWrap(fromToken, toToken) || getIsUnwrap(fromToken, toToken)) - ); - - if (isWrapOrUnwrap) { - const fromTokenPrice = fromToken.prices.minPrice; - const tokenAmount = "fromAmount" in params ? params.fromAmount : params.toAmount; - const usdAmount = convertToUsd(tokenAmount, fromToken.decimals, fromTokenPrice)!; - const price = fromTokenPrice; - - return { - amountIn: tokenAmount, - usdIn: usdAmount!, - amountOut: tokenAmount, - usdOut: usdAmount!, - swapPathStats: undefined, - priceIn: price, - priceOut: price, - minOutputAmount: tokenAmount, - }; - } - - const swapOptimizationOrder: SwapOptimizationOrderArray | undefined = isLimit ? ["length", "liquidity"] : undefined; - - let swapAmounts: SwapAmounts | undefined; - - const triggerRatio = params.triggerPrice - ? getTriggerRatio({ - fromToken, - toToken, - triggerPrice: params.triggerPrice, - }) - : undefined; - - if ("fromAmount" in params) { - swapAmounts = getSwapAmountsByFromValue({ - tokenIn: fromToken, - tokenOut: toToken, - amountIn: params.fromAmount, - triggerRatio, - isLimit, - findSwapPath: findSwapPath, - uiFeeFactor, - swapOptimizationOrder, - allowedSwapSlippageBps: isLimit ? BigInt(params.allowedSlippageBps ?? 100) : undefined, - marketsInfoData, - chainId: sdk.chainId, - externalSwapQuoteParams: undefined, - }); - } else { - swapAmounts = getSwapAmountsByToValue({ - tokenIn: fromToken, - tokenOut: toToken, - amountOut: params.toAmount, - triggerRatio, - isLimit: isLimit, - findSwapPath: findSwapPath, - uiFeeFactor, - swapOptimizationOrder, - allowedSwapSlippageBps: isLimit ? BigInt(params.allowedSlippageBps ?? 100) : undefined, - marketsInfoData, - chainId: sdk.chainId, - externalSwapQuoteParams: undefined, - }); - } - - if (!swapAmounts) { - return undefined; - } - - const createSwapOrderParams: Parameters[0] = { + + if (toToken.isSynthetic) { + throw new Error(`Synthetic tokens are not supported: ${toToken.symbol}`); + } + + if (fromToken.isSynthetic) { + throw new Error(`Synthetic tokens are not supported: ${fromToken.symbol}`); + } + + const isLimit = Boolean(params.triggerPrice); + + if (!fromToken || !toToken) { + return undefined; + } + + const findSwapPath = createFindSwapPath({ + chainId: sdk.chainId, + fromTokenAddress: params.fromTokenAddress, + toTokenAddress: params.toTokenAddress, + marketsInfoData, + gasEstimationParams: { + gasLimits, + gasPrice, tokensData, - fromToken: tokensData[params.fromTokenAddress], - toToken: tokensData[params.toTokenAddress], - swapAmounts, - isLimit, - allowedSlippage: params.allowedSlippageBps ?? 100, - referralCodeForTxn: params.referralCodeForTxn, - triggerPrice: params.triggerPrice, + }, + swapPricingType: SwapPricingType.Swap, + }); + + const isWrapOrUnwrap = Boolean( + fromToken && toToken && (getIsWrap(fromToken, toToken) || getIsUnwrap(fromToken, toToken)) + ); + + if (isWrapOrUnwrap) { + const fromTokenPrice = fromToken.prices.minPrice; + const tokenAmount = "fromAmount" in params ? params.fromAmount : params.toAmount; + const usdAmount = convertToUsd(tokenAmount, fromToken.decimals, fromTokenPrice)!; + const price = fromTokenPrice; + + return { + amountIn: tokenAmount, + usdIn: usdAmount!, + amountOut: tokenAmount, + usdOut: usdAmount!, + swapPathStats: undefined, + priceIn: price, + priceOut: price, + minOutputAmount: tokenAmount, }; - - return sdk.orders.createSwapOrder(createSwapOrderParams); } - \ No newline at end of file + + const swapOptimizationOrder: SwapOptimizationOrderArray | undefined = isLimit ? ["length", "liquidity"] : undefined; + + let swapAmounts: SwapAmounts | undefined; + + const triggerRatio = params.triggerPrice + ? getTriggerRatio({ + fromToken, + toToken, + triggerPrice: params.triggerPrice, + }) + : undefined; + + if ("fromAmount" in params) { + swapAmounts = getSwapAmountsByFromValue({ + tokenIn: fromToken, + tokenOut: toToken, + amountIn: params.fromAmount, + triggerRatio, + isLimit, + findSwapPath: findSwapPath, + uiFeeFactor, + swapOptimizationOrder, + allowedSwapSlippageBps: isLimit ? BigInt(params.allowedSlippageBps ?? 100) : undefined, + marketsInfoData, + chainId: sdk.chainId, + externalSwapQuoteParams: undefined, + }); + } else { + swapAmounts = getSwapAmountsByToValue({ + tokenIn: fromToken, + tokenOut: toToken, + amountOut: params.toAmount, + triggerRatio, + isLimit: isLimit, + findSwapPath: findSwapPath, + uiFeeFactor, + swapOptimizationOrder, + allowedSwapSlippageBps: isLimit ? BigInt(params.allowedSlippageBps ?? 100) : undefined, + marketsInfoData, + chainId: sdk.chainId, + externalSwapQuoteParams: undefined, + }); + } + + if (!swapAmounts) { + return undefined; + } + + const createSwapOrderParams: Parameters[0] = { + tokensData, + fromToken: tokensData[params.fromTokenAddress], + toToken: tokensData[params.toTokenAddress], + swapAmounts, + isLimit, + allowedSlippage: params.allowedSlippageBps ?? 100, + referralCodeForTxn: params.referralCodeForTxn, + triggerPrice: params.triggerPrice, + }; + + return sdk.orders.createSwapOrder(createSwapOrderParams); +} diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/orders/orders.spec.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/orders/orders.spec.ts index 92e7d9ce..ab6a79cb 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/orders/orders.spec.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/orders/orders.spec.ts @@ -1,5 +1,6 @@ -import {describe, expect, it} from "vitest"; -import {arbitrumSdk} from "../../utils/testUtil.js"; +import { describe, expect, it } from "vitest"; + +import { arbitrumSdk } from "../../utils/testUtil.js"; describe("Positions", () => { describe("read", () => { diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/orders/orders.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/orders/orders.ts index fd5fc5cc..d7882857 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/orders/orders.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/orders/orders.ts @@ -1,30 +1,23 @@ -import {Address} from "viem"; +import { Address } from "viem"; -import {getWrappedToken} from "../../configs/tokens.js"; -import {MarketFilterLongShortItemData} from "../../modules/trades/trades.js"; +import { getWrappedToken } from "../../configs/tokens.js"; +import { MarketFilterLongShortItemData } from "../../modules/trades/trades.js"; +import { MarketInfo, MarketsInfoData } from "../../types/markets.js"; +import { OrdersData, OrdersInfoData, OrderType, PositionOrderInfo } from "../../types/orders.js"; +import { SidecarLimitOrderEntryValid, SidecarSlTpOrderEntryValid } from "../../types/sidecarOrders.js"; +import { TokenData, TokensData } from "../../types/tokens.js"; +import { DecreasePositionAmounts, IncreasePositionAmounts, SwapAmounts } from "../../types/trade.js"; +import { getByKey } from "../../utils/objects.js"; +import { getOrderInfo, isOrderForPositionByData, isVisibleOrder } from "../../utils/orders.js"; -import {MarketInfo, MarketsInfoData} from "../../types/markets.js"; -import {Order, OrdersData, OrdersInfoData, OrderType, PositionOrderInfo} from "../../types/orders.js"; -import {SidecarLimitOrderEntryValid, SidecarSlTpOrderEntryValid} from "../../types/sidecarOrders.js"; -import {TokenData, TokensData} from "../../types/tokens.js"; -import {DecreasePositionAmounts, IncreasePositionAmounts, SwapAmounts} from "../../types/trade.js"; - -import {getByKey} from "../../utils/objects.js"; -import {getOrderInfo, isOrderForPositionByData, isVisibleOrder} from "../../utils/orders.js"; - -import {createDecreaseOrderTxn} from "./transactions/createDecreaseOrderTxn.js"; -import {createIncreaseOrderTxn} from "./transactions/createIncreaseOrderTxn.js"; -import { - buildGetOrdersMulticall, - getExecutionFeeAmountForEntry, - matchByMarket, - parseGetOrdersResponse -} from "./utils.js"; -import {Module} from "../base.js"; -import {createSwapOrderTxn} from "./transactions/createSwapOrderTxn.js"; -import {createWrapOrUnwrapTxn, WrapOrUnwrapParams} from "./transactions/createWrapOrUnwrapTxn.js"; -import {cancelOrdersTxn} from "./transactions/cancelOrdersTxn.js"; -import {increaseOrderHelper, PositionIncreaseParams, swap, SwapParams} from "./helpers.js"; +import { createDecreaseOrderTxn } from "./transactions/createDecreaseOrderTxn.js"; +import { createIncreaseOrderTxn } from "./transactions/createIncreaseOrderTxn.js"; +import { buildGetOrdersMulticall, getExecutionFeeAmountForEntry, matchByMarket, parseGetOrdersResponse } from "./utils.js"; +import { Module } from "../base.js"; +import { PositionIncreaseParams, SwapParams, increaseOrderHelper, swap } from "./helpers.js"; +import { cancelOrdersTxn } from "./transactions/cancelOrdersTxn.js"; +import { createSwapOrderTxn } from "./transactions/createSwapOrderTxn.js"; +import { createWrapOrUnwrapTxn, WrapOrUnwrapParams } from "./transactions/createWrapOrUnwrapTxn.js"; export class Orders extends Module { async getOrders({ @@ -113,7 +106,7 @@ export class Orders extends Module { marketsInfoData, tokensData, wrappedNativeToken: wrappedToken, - order: order as Order, + order, }); if (!orderInfo) { @@ -205,6 +198,17 @@ export class Orders extends Module { }) ); + if ( + collateralToken.address !== marketInfo.longTokenAddress && + collateralToken.address !== marketInfo.shortTokenAddress + ) { + const availableTokens = marketInfo.isSameCollaterals + ? `long ${marketInfo.longToken.symbol}` + : `long ${marketInfo.longToken.symbol} and short ${marketInfo.shortToken.symbol}`; + + throw new Error(`Invalid collateral token. Only ${availableTokens} tokens are available.`); + } + const { autoCancelOrdersLimit } = await this.sdk.positions.getMaxAutoCancelOrders({ positionOrders, }); @@ -220,8 +224,6 @@ export class Orders extends Module { indexToken, }; - const swapPath = increaseAmounts.swapStrategy.swapPathStats?.swapPath || []; - return createIncreaseOrderTxn({ sdk: this.sdk, createIncreaseOrderParams: { @@ -231,7 +233,7 @@ export class Orders extends Module { initialCollateralAmount: increaseAmounts.initialCollateralAmount, targetCollateralAddress: collateralToken.address, collateralDeltaAmount: increaseAmounts.collateralDeltaAmount, - swapPath: swapPath, + swapPath: increaseAmounts.swapStrategy.swapPathStats?.swapPath || [], sizeDeltaUsd: increaseAmounts.sizeDeltaUsd, sizeDeltaInTokens: increaseAmounts.sizeDeltaInTokens, triggerPrice: isLimit ? triggerPrice : undefined, @@ -298,6 +300,7 @@ export class Orders extends Module { allowedSlippage, isLong, referralCode, + isTrigger, }: { marketInfo: MarketInfo; marketsInfoData: MarketsInfoData; @@ -307,6 +310,7 @@ export class Orders extends Module { decreaseAmounts: DecreasePositionAmounts; collateralToken: TokenData; referralCode?: string; + isTrigger?: boolean; }) { const account = this.account; if (!account) { @@ -321,7 +325,9 @@ export class Orders extends Module { throw new Error("Execution fee is not available"); } - if (decreaseAmounts?.triggerOrderType === undefined) { + const orderType = isTrigger ? decreaseAmounts?.triggerOrderType : OrderType.MarketDecrease; + + if (orderType === undefined) { throw new Error("Trigger order type is not defined"); } @@ -357,14 +363,14 @@ export class Orders extends Module { minOutputUsd: BigInt(0), isLong, decreasePositionSwapType: decreaseAmounts.decreaseSwapType, - orderType: decreaseAmounts?.triggerOrderType, + orderType: orderType, executionFee: executionFee.feeTokenAmount, allowedSlippage, referralCode, skipSimulation: true, indexToken: marketInfo.indexToken, tokensData, - autoCancel: autoCancelOrdersLimit > 0 + autoCancel: autoCancelOrdersLimit > 0, }); } diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/orders/transactions/createDecreaseOrderTxn.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/orders/transactions/createDecreaseOrderTxn.ts index 5e282c3f..2bdf3912 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/orders/transactions/createDecreaseOrderTxn.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/orders/transactions/createDecreaseOrderTxn.ts @@ -1,17 +1,17 @@ -import {getContract} from "../../../configs/contracts.js"; +import { Abi, encodeFunctionData, zeroAddress, zeroHash } from "viem"; -import type {DecreasePositionSwapType, OrderType} from "../../../types/orders.js"; -import type {Token, TokensData} from "../../../types/tokens.js"; -import type {GmxSdk} from "../../../index.js"; -import type {PriceOverrides} from "./createIncreaseOrderTxn.js"; +import { abis } from "../../../abis/index.js"; +import { getContract } from "../../../configs/contracts.js"; +import { convertTokenAddress, NATIVE_TOKEN_ADDRESS } from "../../../configs/tokens.js"; +import type { DecreasePositionSwapType, OrderType } from "../../../types/orders.js"; +import type { Token, TokensData } from "../../../types/tokens.js"; +import { isMarketOrderType } from "../../../utils/orders.js"; +import { simulateExecuteOrder } from "../../../utils/simulateExecuteOrder.js"; +import { convertToContractPrice } from "../../../utils/tokens.js"; +import { applySlippageToMinOut, applySlippageToPrice } from "../../../utils/trade/index.js"; -import {abis} from "../../../abis/index.js"; -import {convertTokenAddress, NATIVE_TOKEN_ADDRESS} from "../../../configs/tokens.js"; -import {isMarketOrderType} from "../../../utils/orders.js"; -import {simulateExecuteOrder} from "../../../utils/simulateExecuteOrder.js"; -import {convertToContractPrice} from "../../../utils/tokens.js"; -import {applySlippageToMinOut, applySlippageToPrice} from "../../../utils/trade/index.js"; -import {Abi, encodeFunctionData, zeroAddress, zeroHash} from "viem"; +import type { PriceOverrides } from "./createIncreaseOrderTxn.js"; +import type { GmxSdk } from "../../../index.js"; export type DecreaseOrderParams = { account: string; @@ -35,6 +35,7 @@ export type DecreaseOrderParams = { indexToken: Token; tokensData: TokensData; autoCancel: boolean; + dataList?: string[]; }; export async function createDecreaseOrderTxn(sdk: GmxSdk, params: DecreaseOrderParams | DecreaseOrderParams[]) { @@ -113,8 +114,8 @@ export function createDecreaseEncodedPayload({ initialCollateralToken: initialCollateralTokenAddress, callbackContract: zeroAddress, market: p.marketAddress, - swapPath: p.swapPath || [], - uiFeeReceiver: process.env.GMX_UI_FEE_RECEIVER, + swapPath: p.swapPath, + uiFeeReceiver: sdk.config.settings?.uiFeeReceiverAccount || zeroAddress, }, numbers: { sizeDeltaUsd: p.sizeDeltaUsd, @@ -132,7 +133,7 @@ export function createDecreaseEncodedPayload({ shouldUnwrapNativeToken: isNativeReceive, autoCancel: p.autoCancel, referralCode: p.referralCode || zeroHash, - dataList: [], + dataList: p.dataList ?? [], }; return [ @@ -145,15 +146,11 @@ export function createDecreaseEncodedPayload({ }), ]; - return multicall.filter(Boolean).map((call) => { - // Ensure params is always an array - const params = Array.isArray(call!.params) ? call!.params : []; - console.log(`Encoding ${call!.method} with params:`, params); - - return encodeFunctionData({ + return multicall.filter(Boolean).map((call) => + encodeFunctionData({ abi: abis.ExchangeRouter as Abi, functionName: call!.method as any, - args: params as any, - }); - }); + args: call!.params as any, + }) + ); } diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/orders/transactions/createIncreaseOrderTxn.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/orders/transactions/createIncreaseOrderTxn.ts index a99aea36..e92a427d 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/orders/transactions/createIncreaseOrderTxn.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/orders/transactions/createIncreaseOrderTxn.ts @@ -39,6 +39,7 @@ type IncreaseOrderParams = { referralCode: string | undefined; indexToken: TokenData; tokensData: TokensData; + dataList?: string[]; }; type SecondaryOrderCommonParams = { @@ -209,7 +210,6 @@ async function createEncodedPayload({ isNativePayment, uiFeeReceiver, }); - const multicall = [ { method: "sendWnt", params: [orderVaultAddress, totalWntAmount] }, @@ -222,17 +222,13 @@ async function createEncodedPayload({ params: [orderParams], }, ]; - const validCalls = multicall.filter(Boolean) as Array<{ method: string; params: any[] }>; - return validCalls.map((call) => { - // Ensure params is always an array - const params = Array.isArray(call.params) ? call.params : []; - console.log(`Encoding ${call.method} with params:`, params); - return encodeFunctionData({ + return multicall.filter(Boolean).map((call) => + encodeFunctionData({ abi: routerAbi, - functionName: call.method as any, - args: params, - }); - }); + functionName: call!.method, + args: call!.params as any, + }) + ); } function createOrderParams({ @@ -255,7 +251,7 @@ function createOrderParams({ initialCollateralToken: initialCollateralTokenAddress, callbackContract: zeroAddress, market: p.marketAddress, - swapPath: p.swapPath || [], + swapPath: p.swapPath, uiFeeReceiver: uiFeeReceiver || zeroAddress, }, numbers: { @@ -274,7 +270,7 @@ function createOrderParams({ shouldUnwrapNativeToken: isNativePayment, autoCancel: false, referralCode: p.referralCode || zeroHash, - dataList: [], + dataList: p.dataList ?? [], }; } diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/orders/transactions/createSwapOrderTxn.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/orders/transactions/createSwapOrderTxn.ts index c794680c..b9bc86f9 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/orders/transactions/createSwapOrderTxn.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/orders/transactions/createSwapOrderTxn.ts @@ -1,4 +1,4 @@ -import {Abi, encodeFunctionData, zeroAddress, zeroHash} from "viem"; +import { Abi, encodeFunctionData, zeroAddress, zeroHash } from "viem"; import {abis} from "../../../abis/index.js"; import {getContract} from "../../../configs/contracts.js"; @@ -11,7 +11,7 @@ import {isMarketOrderType} from "../../../utils/orders.js"; import {applySlippageToMinOut} from "../../../utils/trade/index.js"; import {simulateExecuteOrder} from "../../../utils/simulateExecuteOrder.js"; -import type {GmxSdk} from "../../.."; +import type { GmxSdk } from "../../.."; export type SwapOrderParams = { fromTokenAddress: string; @@ -25,15 +25,14 @@ export type SwapOrderParams = { executionFee: bigint; allowedSlippage: number; triggerPrice?: bigint; - skipSimulation?: boolean; + dataList?: string[]; }; export async function createSwapOrderTxn(sdk: GmxSdk, p: SwapOrderParams) { const { encodedPayload, totalWntAmount } = await getParams(sdk, p); const { encodedPayload: simulationEncodedPayload, totalWntAmount: sumaltionTotalWntAmount } = await getParams(sdk, p); - p.skipSimulation = true; - if (p.orderType !== OrderType.LimitSwap && !p.skipSimulation) { + if (p.orderType !== OrderType.LimitSwap) { await simulateExecuteOrder(sdk, { primaryPriceOverrides: {}, createMulticallPayload: simulationEncodedPayload, @@ -42,7 +41,6 @@ export async function createSwapOrderTxn(sdk: GmxSdk, p: SwapOrderParams) { }); } - await sdk.callContract( getContract(sdk.chainId, "ExchangeRouter"), abis.ExchangeRouter as Abi, @@ -60,7 +58,7 @@ async function getParams(sdk: GmxSdk, p: SwapOrderParams) { const orderVaultAddress = getContract(sdk.chainId, "OrderVault"); const wntSwapAmount = isNativePayment ? p.fromTokenAmount : 0n; const totalWntAmount = wntSwapAmount + p.executionFee; - + const initialCollateralTokenAddress = convertTokenAddress(sdk.chainId, p.fromTokenAddress, "wrapped"); const shouldApplySlippage = isMarketOrderType(p.orderType); @@ -71,7 +69,6 @@ async function getParams(sdk: GmxSdk, p: SwapOrderParams) { const initialCollateralDeltaAmount = p.fromTokenAmount; - const createOrderParams = { addresses: { receiver: sdk.config.account, @@ -98,7 +95,7 @@ async function getParams(sdk: GmxSdk, p: SwapOrderParams) { isLong: false, shouldUnwrapNativeToken: isNativeReceive, referralCode: p.referralCode || zeroHash, - dataList: [], // Add the missing dataList field as an empty array + dataList: p.dataList ?? [], }; const multicall = [ @@ -114,15 +111,13 @@ async function getParams(sdk: GmxSdk, p: SwapOrderParams) { }, ]; - const encodedPayload = multicall - .filter(Boolean) - .map((call) => - encodeFunctionData({ abi: abis.ExchangeRouter as Abi, functionName: call!.method, args: call!.params as any }) - ); - return { minOutputAmount, totalWntAmount, - encodedPayload, + encodedPayload: multicall + .filter(Boolean) + .map((call) => + encodeFunctionData({ abi: abis.ExchangeRouter as Abi, functionName: call!.method as any, args: call!.params as any }) + ), }; -} \ No newline at end of file +} diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/orders/transactions/createWrapOrUnwrapTxn.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/orders/transactions/createWrapOrUnwrapTxn.ts index b7d4b68f..def9fd15 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/orders/transactions/createWrapOrUnwrapTxn.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/orders/transactions/createWrapOrUnwrapTxn.ts @@ -3,7 +3,7 @@ import { Abi, Address } from "viem"; import { getWrappedToken } from "../../../configs/tokens.js"; import { abis } from "../../../abis/index.js"; -import type { GmxSdk } from "../../../index.js"; +import type { GmxSdk } from "../../../index"; export type WrapOrUnwrapParams = { amount: bigint; diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/orders/transactions/updateOrderTxn.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/orders/transactions/updateOrderTxn.ts index 699c0fde..9e490b25 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/orders/transactions/updateOrderTxn.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/orders/transactions/updateOrderTxn.ts @@ -1,10 +1,11 @@ +import { Abi, Address, encodeFunctionData } from "viem"; + import { abis } from "../../../abis/index.js"; import { getContract } from "../../../configs/contracts.js"; - -import type { GmxSdk } from "../../../index.js"; import { Token } from "../../../types/tokens.js"; import { convertToContractPrice } from "../../../utils/tokens.js"; -import { Abi, Address, encodeFunctionData } from "viem"; + +import type { GmxSdk } from "../../../index.js"; export type UpdateOrderParams = { orderKey: string; @@ -46,7 +47,7 @@ export function updateOrderTxn(sdk: GmxSdk, p: UpdateOrderParams): Promise 0 ? executionFee : undefined, - }) as Promise
; + }) as Promise<`0x${string}`>; } export function createUpdateEncodedPayload({ diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/orders/utils.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/orders/utils.ts index 0612f10e..4b714458 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/orders/utils.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/orders/utils.ts @@ -1,28 +1,22 @@ -import {Address, isAddressEqual} from "viem"; -import {GmxSdk} from "../../index.js"; -import {accountOrderListKey} from "../../configs/dataStore.js"; -import {getWrappedToken} from "../../configs/tokens.js"; -import {GasLimitsConfig} from "../../types/fees.js"; -import {MarketsInfoData} from "../../types/markets.js"; -import {DecreasePositionSwapType, Order, OrderType} from "../../types/orders.js"; -import {SidecarLimitOrderEntry, SidecarSlTpOrderEntry} from "../../types/sidecarOrders"; -import {TokensData} from "../../types/tokens.js"; -import { - estimateExecuteDecreaseOrderGasLimit, - estimateOrderOraclePriceCount, - getExecutionFee -} from "../../utils/fees/index.js"; -import { - isIncreaseOrderType, - isLimitOrderType, - isSwapOrderType, - isTriggerDecreaseOrderType -} from "../../utils/orders.js"; -import {getSwapPathOutputAddresses} from "../../utils/swap/index.js"; -import {MarketFilterLongShortDirection, MarketFilterLongShortItemData} from "../trades/trades.js"; -import {MulticallRequestConfig, MulticallResult} from "../../utils/multicall.js"; -import {getContract} from "../../configs/contracts.js"; -import {ContractsChainId} from "../../configs/chains.js"; +import { Address, isAddressEqual } from "viem"; + +import type { ContractsChainId } from "../../configs/chains.js"; +import { getContract } from "../../configs/contracts.js"; +import { accountOrderListKey } from "../../configs/dataStore.js"; +import { getWrappedToken } from "../../configs/tokens.js"; +import type { MarketFilterLongShortDirection, MarketFilterLongShortItemData } from "../../modules/trades/trades.js"; +import type { GasLimitsConfig } from "../../types/fees.js"; +import type { MarketsInfoData } from "../../types/markets.js"; +import { DecreasePositionSwapType, Order, OrderType } from "../../types/orders.js"; +import { SidecarLimitOrderEntry, SidecarSlTpOrderEntry } from "../../types/sidecarOrders.js"; +import type { TokensData } from "../../types/tokens.js"; +import { estimateOrderOraclePriceCount } from "../../utils/fees/estimateOraclePriceCount.js"; +import { estimateExecuteDecreaseOrderGasLimit, getExecutionFee } from "../../utils/fees/executionFee.js"; +import type { MulticallRequestConfig, MulticallResult } from "../../utils/multicall.js"; +import { isIncreaseOrderType, isLimitOrderType, isSwapOrderType, isTriggerDecreaseOrderType } from "../../utils/orders.js"; +import { getSwapPathOutputAddresses } from "../../utils/swap/swapStats.js"; + +import type { GmxSdk } from "../../index.js"; export const getOrderExecutionFee = ( sdk: GmxSdk, diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/positions/positions.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/positions/positions.ts index 576af325..9170231c 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/positions/positions.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/positions/positions.ts @@ -1,46 +1,45 @@ -import {zeroAddress, zeroHash} from "viem"; +import { zeroAddress, zeroHash } from "viem"; -import {getContract} from "../../configs/contracts.js"; +import { BOTANIX } from "../../configs/chains.js"; +import { getContract } from "../../configs/contracts.js"; import { - hashedPositionKey, - MAX_AUTO_CANCEL_ORDERS_KEY, - MIN_COLLATERAL_USD_KEY, - MIN_POSITION_SIZE_USD_KEY, - uiFeeFactorKey, + hashedPositionKey, + MAX_AUTO_CANCEL_ORDERS_KEY, + MIN_COLLATERAL_USD_KEY, + MIN_POSITION_SIZE_USD_KEY, + uiFeeFactorKey, } from "../../configs/dataStore.js"; -import {ContractMarketPrices, MarketsData, MarketsInfoData} from "../../types/markets.js"; -import {Position, PositionsData, PositionsInfoData} from "../../types/positions.js"; -import {TokensData} from "../../types/tokens.js"; +import { ContractMarketPrices, MarketInfo, MarketsData, MarketsInfoData } from "../../types/markets.js"; +import { OrderInfo } from "../../types/orders.js"; +import { Position, PositionsData, PositionsInfoData } from "../../types/positions.js"; +import { UserReferralInfo } from "../../types/referrals.js"; +import { TokensData } from "../../types/tokens.js"; +import { getPositionFee } from "../../utils/fees/index.js"; import { - getContractMarketPrices, - getMarketIndexName, - getMarketPoolName, - getMaxAllowedLeverageByMinCollateralFactor, + getContractMarketPrices, + getMarketIndexName, + getMarketPoolName, + getMaxAllowedLeverageByMinCollateralFactor, } from "../../utils/markets.js"; -import {getByKey} from "../../utils/objects.js"; +import type { MulticallRequestConfig } from "../../utils/multicall.js"; +import { basisPointsToFloat, getBasisPoints } from "../../utils/numbers.js"; +import { getByKey } from "../../utils/objects.js"; import { - getEntryPrice, - getLeverage, - getLiquidationPrice, - getNetPriceImpactDeltaUsdForDecrease, - getPositionKey, - getPositionNetValue, - getPositionPendingFeesUsd, - getPositionPnlAfterFees, - getPositionPnlUsd, + getEntryPrice, + getLeverage, + getLiquidationPrice, + getNetPriceImpactDeltaUsdForDecrease, + getPositionKey, + getPositionNetValue, + getPositionPendingFeesUsd, + getPositionPnlAfterFees, + getPositionPnlUsd, } from "../../utils/positions.js"; +import { getAcceptablePriceInfo, getMarkPrice } from "../../utils/prices.js"; +import { decodeReferralCode } from "../../utils/referrals.js"; +import { convertToTokenAmount, convertToUsd } from "../../utils/tokens.js"; -import {Module} from "../base.js"; - -import {UserReferralInfo} from "../../types/referrals.js"; -import {getPositionFee} from "../../utils/fees/index.js"; -import {basisPointsToFloat, getBasisPoints} from "../../utils/numbers.js"; -import {getAcceptablePriceInfo, getMarkPrice} from "../../utils/prices.js"; -import {decodeReferralCode} from "../../utils/referrals.js"; -import {convertToTokenAmount, convertToUsd} from "../../utils/tokens.js"; -import {OrderInfo} from "../../types/orders.js"; -import type {MulticallRequestConfig} from "../../utils/multicall.js"; -import {BOTANIX} from "../../configs/chains.js"; +import { Module } from "../base.js"; type PositionsResult = { positionsData?: PositionsData; @@ -334,7 +333,7 @@ export class Positions extends Module { }); } - private async getUserRefferalCode() { + private async getUserReferralCode() { if (this.chainId === BOTANIX) { return { attachedOnChain: false, @@ -456,7 +455,7 @@ export class Positions extends Module { private async getUserReferralInfo(): Promise { const { userReferralCode, userReferralCodeString, attachedOnChain, referralCodeForTxn } = - await this.getUserRefferalCode(); + await this.getUserReferralCode(); const codeOwner = await this.getCodeOwner(userReferralCodeString); const tierId = await this.getAffiliateTier(); @@ -512,7 +511,7 @@ export class Positions extends Module { const positionsInfoData = Object.keys(positionsData).reduce((acc: PositionsInfoData, positionKey: string) => { const position = getByKey(positionsData, positionKey)!; - const marketInfo = getByKey(marketsInfoData, position.marketAddress); + const marketInfo = getByKey(marketsInfoData, position.marketAddress) as MarketInfo; const indexToken = marketInfo?.indexToken; const longToken = getByKey(tokensData, marketInfo?.longTokenAddress); const shortToken = getByKey(tokensData, marketInfo?.shortTokenAddress); @@ -644,6 +643,14 @@ export class Positions extends Module { pendingFundingFeesUsd: pendingFundingFeesUsd, }); + const leverageWithoutPnl = getLeverage({ + sizeInUsd: position.sizeInUsd, + collateralUsd: collateralUsd, + pendingBorrowingFeesUsd: position.pendingBorrowingFeesUsd, + pendingFundingFeesUsd: pendingFundingFeesUsd, + pnl: undefined, + }); + const leverageWithPnl = getLeverage({ sizeInUsd: position.sizeInUsd, collateralUsd: collateralUsd, @@ -694,6 +701,7 @@ export class Positions extends Module { hasLowCollateral, leverage, leverageWithPnl, + leverageWithoutPnl, pnl, pnlPercentage, pnlAfterFees, diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/tokens/tokens.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/tokens/tokens.ts index b49857c3..69e3b3e2 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/tokens/tokens.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/tokens/tokens.ts @@ -1,10 +1,10 @@ import { getContract } from "../../configs/contracts.js"; import { NATIVE_TOKEN_ADDRESS, getToken, getTokensMap, getV2Tokens, getWrappedToken } from "../../configs/tokens.js"; import { TokenBalancesData, TokenPricesData, TokensData, Token as TToken } from "../../types/tokens.js"; +import type { ContractCallsConfig } from "../../utils/multicall.js"; +import { parseContractPrice } from "../../utils/tokens.js"; import { Module } from "../base.js"; -import { parseContractPrice } from "../../utils/tokens.js"; -import type { ContractCallsConfig } from "../../utils/multicall.js"; type TokenPricesDataResult = { pricesData?: TokenPricesData; @@ -83,38 +83,41 @@ export class Tokens extends Module { return this.sdk .executeMulticall( - tokensList.reduce((acc, token) => { - // Skip synthetic tokens - if (token.isSynthetic) return acc; + tokensList.reduce( + (acc, token) => { + // Skip synthetic tokens + if (token.isSynthetic) return acc; - const address = token.address; + const address = token.address; - if (address === NATIVE_TOKEN_ADDRESS) { - acc[address] = { - contractAddress: getContract(this.chainId, "Multicall"), - abiId: "Multicall", - calls: { - balance: { - methodName: "getEthBalance", - params: [account], + if (address === NATIVE_TOKEN_ADDRESS) { + acc[address] = { + contractAddress: getContract(this.chainId, "Multicall"), + abiId: "Multicall", + calls: { + balance: { + methodName: "getEthBalance", + params: [account], + }, }, - }, - } satisfies ContractCallsConfig; - } else { - acc[address] = { - contractAddress: address, - abiId: "Token", - calls: { - balance: { - methodName: "balanceOf", - params: [account], + } satisfies ContractCallsConfig; + } else { + acc[address] = { + contractAddress: address, + abiId: "Token", + calls: { + balance: { + methodName: "balanceOf", + params: [account], + }, }, - }, - } satisfies ContractCallsConfig; - } + } satisfies ContractCallsConfig; + } - return acc; - }, {}) + return acc; + }, + {} as Record> + ) ) .then((res) => { return Object.keys(res.data).reduce((tokenBalances: TokenBalancesData, tokenAddress) => { @@ -140,11 +143,7 @@ export class Tokens extends Module { const nativeToken = this.getNativeToken(); const tokens = [nativeToken, ...apiTokens]; - const { balancesData } = this.account - ? await this.getTokensBalances(this.account, tokens) - : { - balancesData: {}, - }; + const balancesData = this.account ? await this.getTokensBalances(this.account, tokens) : ({} as TokenBalancesData); if (!pricesData) { return { diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/trades/trades.spec.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/trades/trades.spec.ts index 8b8fd214..79dbff00 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/trades/trades.spec.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/trades/trades.spec.ts @@ -1,4 +1,5 @@ import { describe, expect, it } from "vitest"; + import { arbitrumSdk } from "../../utils/testUtil.js"; describe("Trades", () => { diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/trades/trades.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/trades/trades.ts index ac731c52..2a1d8537 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/trades/trades.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/trades/trades.ts @@ -1,24 +1,20 @@ -import {getWrappedToken} from "../../configs/tokens.js"; import merge from "lodash/merge.js"; -import {MarketsInfoData} from "../../types/markets.js"; -import {OrderType} from "../../types/orders.js"; -import {TokensData} from "../../types/tokens.js"; -import {PositionTradeAction, TradeAction, TradeActionType} from "../../types/tradeHistory.js"; -import graphqlFetcher from "../../utils/graphqlFetcher.js"; -import { - isIncreaseOrderType, - isLimitOrderType, - isSwapOrderType, - isTriggerDecreaseOrderType -} from "../../utils/orders.js"; -import {buildFiltersBody, GraphQlFilters} from "../../utils/subgraph.js"; -import {getSwapPathOutputAddresses} from "../../utils/swap/swapStats.js"; -import {Address} from "viem"; -import {Module} from "../base.js"; -import {GmxSdk} from "../../index.js"; -import {TradeAction as SubsquidTradeAction} from "../../types/subsquid.js"; -import {createRawTradeActionTransformer} from "../../utils/tradeHistory.js"; +import type { Address } from "viem"; +import { getWrappedToken } from "../../configs/tokens.js"; +import { MarketsInfoData } from "../../types/markets.js"; +import { OrderType } from "../../types/orders.js"; +import { TradeAction as SubsquidTradeAction } from "../../types/subsquid.js"; +import { TokensData } from "../../types/tokens.js"; +import { PositionTradeAction, TradeAction, TradeActionType } from "../../types/tradeHistory.js"; +import graphqlFetcher from "../../utils/graphqlFetcher.js"; +import { GraphQlFilters, buildFiltersBody } from "../../utils/indexers.js"; +import { isIncreaseOrderType, isLimitOrderType, isSwapOrderType, isTriggerDecreaseOrderType } from "../../utils/orders.js"; +import { getSwapPathOutputAddresses } from "../../utils/swap/swapStats.js"; +import { createRawTradeActionTransformer } from "../../utils/tradeHistory.js"; + +import type { GmxSdk } from "../.."; +import { Module } from "../base.js"; export type MarketFilterLongShortDirection = "long" | "short" | "swap" | "any"; export type MarketFilterLongShortItemData = { diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/utils/utils.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/utils/utils.ts index 8e1c38b6..7dc2d9f3 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/utils/utils.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/utils/utils.ts @@ -1,46 +1,45 @@ -import {withRetry} from "viem"; +import { withRetry } from "viem"; import { - EXECUTION_FEE_CONFIG_V2, - GAS_LIMITS_STATIC_CONFIG, - GAS_PRICE_PREMIUM_MAP, - getViemChain, - MAX_PRIORITY_FEE_PER_GAS_MAP + EXECUTION_FEE_CONFIG_V2, + GAS_LIMITS_STATIC_CONFIG, + GAS_PRICE_PREMIUM_MAP, + getViemChain, + MAX_PRIORITY_FEE_PER_GAS_MAP, } from "../../configs/chains.js"; -import {getContract} from "../../configs/contracts.js"; +import { getContract } from "../../configs/contracts.js"; import { - decreaseOrderGasLimitKey, - depositGasLimitKey, - ESTIMATED_GAS_FEE_BASE_AMOUNT_V2_1, - ESTIMATED_GAS_FEE_MULTIPLIER_FACTOR, - ESTIMATED_GAS_FEE_PER_ORACLE_PRICE, - GELATO_RELAY_FEE_MULTIPLIER_FACTOR_KEY, - GLV_DEPOSIT_GAS_LIMIT, - GLV_PER_MARKET_GAS_LIMIT, - GLV_WITHDRAWAL_GAS_LIMIT, - increaseOrderGasLimitKey, - shiftGasLimitKey, - singleSwapGasLimitKey, - swapOrderGasLimitKey, - uiFeeFactorKey, - withdrawalGasLimitKey, + decreaseOrderGasLimitKey, + depositGasLimitKey, + ESTIMATED_GAS_FEE_BASE_AMOUNT_V2_1, + ESTIMATED_GAS_FEE_MULTIPLIER_FACTOR, + ESTIMATED_GAS_FEE_PER_ORACLE_PRICE, + GELATO_RELAY_FEE_MULTIPLIER_FACTOR_KEY, + GLV_DEPOSIT_GAS_LIMIT, + GLV_PER_MARKET_GAS_LIMIT, + GLV_WITHDRAWAL_GAS_LIMIT, + increaseOrderGasLimitKey, + shiftGasLimitKey, + singleSwapGasLimitKey, + swapOrderGasLimitKey, + uiFeeFactorKey, + withdrawalGasLimitKey, } from "../../configs/dataStore.js"; - -import type {DecreasePositionAmounts, IncreasePositionAmounts, SwapAmounts, TradeFeesType} from "../../types/trade.js"; -import type {GasLimitsConfig} from "../../types/fees.js"; -import {TokensData} from "../../types/tokens.js"; - -import {bigMath} from "../../utils/bigmath.js"; -import {estimateOrderOraclePriceCount} from "../../utils/fees/estimateOraclePriceCount.js"; +import type { GasLimitsConfig } from "../../types/fees.js"; +import { TokensData } from "../../types/tokens.js"; +import type { IncreasePositionAmounts } from "../../types/trade.js"; +import type { DecreasePositionAmounts, SwapAmounts, TradeFeesType } from "../../types/trade.js"; +import { bigMath } from "../../utils/bigmath.js"; +import { estimateOrderOraclePriceCount } from "../../utils/fees/estimateOraclePriceCount.js"; import { - estimateExecuteDecreaseOrderGasLimit, - estimateExecuteIncreaseOrderGasLimit, - estimateExecuteSwapOrderGasLimit, - getExecutionFee, + estimateExecuteDecreaseOrderGasLimit, + estimateExecuteIncreaseOrderGasLimit, + estimateExecuteSwapOrderGasLimit, + getExecutionFee, } from "../../utils/fees/executionFee.js"; -import {getSwapCount} from "../../utils/trade/index.js"; +import { getSwapCount } from "../../utils/trade/trade.js"; -import {Module} from "../base.js"; +import { Module } from "../base.js"; const DEFAULT_UI_FEE_RECEIVER_ACCOUNT = "0xff00000000000000000000000000000000000001"; diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/prebuilt/hashedKinkModelMarketRatesKeys.json b/src/Managing.Web3Proxy/src/generated/gmxsdk/prebuilt/hashedKinkModelMarketRatesKeys.json index 3057d292..37722bbf 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/prebuilt/hashedKinkModelMarketRatesKeys.json +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/prebuilt/hashedKinkModelMarketRatesKeys.json @@ -865,6 +865,78 @@ "baseBorrowingFactorShort": "0x53cfa8c89973d1f35bf07296010c6d6a3e4bbf0ffc6342c484eade343b08afff", "aboveOptimalUsageBorrowingFactorLong": "0x2620c46b82428590d0078686fcde4289794adf54b38673056a5217e06cf0ad9a", "aboveOptimalUsageBorrowingFactorShort": "0x6e33f746e16f3319f9369024021d1582b5cc5849d872deaddffbf6fe4bc4d6bf" + }, + "0x970b730b5dD18de53A230eE8F4af088dBC3a6F8d": { + "optimalUsageFactorLong": "0x32e6d2044b514f96c3892e5ed9d14eb62eb8e3a6661620fe67e6e3ac08aa42c8", + "optimalUsageFactorShort": "0x68f88e6e4618cf2dd95e1a7c7081f1497a6803f66510ea24299b07d30c7b4ab3", + "baseBorrowingFactorLong": "0x5689ee50875365d97190c0c7b442879e696ed0a6c1281582e1831a2557cb3fe1", + "baseBorrowingFactorShort": "0x79ca88e6b0285fab863990adf6818d41f8865d8793115f00de32ef8fd29ba2e5", + "aboveOptimalUsageBorrowingFactorLong": "0x452c6b6f8e3100c7e6b38dace49207d78cfc66b735bf2948bf522ccbea6335db", + "aboveOptimalUsageBorrowingFactorShort": "0x171fac9f4819c15610a7942e0fdea6b47c7006f983cfc740b7ab00d14f428dcb" + }, + "0xac484106d935f0f20F1485b631fA6F65AeEff550": { + "optimalUsageFactorLong": "0xce71b10ef4a73f931ed6625301d395f98c36ee5214ee075e948151baa554a676", + "optimalUsageFactorShort": "0xe0325d581f958af17b808dd98825279a26779983beb3804f89a82938957e7831", + "baseBorrowingFactorLong": "0x3e5299cb1a63d554f94460a461e74084038c3bc750b63c8e662c86f9473d8072", + "baseBorrowingFactorShort": "0x83ac3c2d568a0ebfec92bf01b6103f8f48d75ff207de0b4399a3ce340e86a95d", + "aboveOptimalUsageBorrowingFactorLong": "0x21d0fdfd2bf5a46e4a89f7d5b889db0f796006053d1d2218f6b0dcef0707f43d", + "aboveOptimalUsageBorrowingFactorShort": "0xe13ac36a1fbc2bdf870316547a5156447b207af4021e762abcfaaf7f96b88722" + }, + "0x4b67aa8F754b17b1029Ad2DB4fb6a276CCe350c4": { + "optimalUsageFactorLong": "0xa0a847912374b4250874b175e12ba3d893248481252cc24c194a41bc39a8b1e4", + "optimalUsageFactorShort": "0xec958a1a47d882b675d997dd8495006fd90512f8f03a2159f3f468e91794b33f", + "baseBorrowingFactorLong": "0x575bc4d084ffb6204148923bf2d78c4089e4ddaf8c5c6802bffc9bddd47a0beb", + "baseBorrowingFactorShort": "0xab680c42031c040ade5b79674de4a9e86678be53c0390be1bb0bbf23f3489113", + "aboveOptimalUsageBorrowingFactorLong": "0x8f822c12fea651be55f6200d118a7a32d03c6ed213451059ee46adc0b7205f70", + "aboveOptimalUsageBorrowingFactorShort": "0x743c4bc23a849bd7a89eb17ccef4372b5d50d2d55593fc13300cd0865f9a5e75" + }, + "0x0164B6c847c65e07C9F6226149ADBFA7C1dE40Cf": { + "optimalUsageFactorLong": "0x309ee44b3424fd77787c94ead80b0397a0cb7137e2a90440a205050671f2913e", + "optimalUsageFactorShort": "0xe531f9de4bd3d506e59e6a611a8fa037263beba9594009e54790c0ca7c9e734a", + "baseBorrowingFactorLong": "0x7896428de1501ec2fb46e5ee34fe1525c798b48e737d20fc18d54322be897368", + "baseBorrowingFactorShort": "0x6b19065b75a143cc3f8957d5b47dd2596fe6c824b2d949c87f5d8fb98a078923", + "aboveOptimalUsageBorrowingFactorLong": "0xa45cf98b102f7c764d7c8cbf3c3c4c3a974e76a9b27ac5bc7528c7fc390a25e7", + "aboveOptimalUsageBorrowingFactorShort": "0xa1a80689e2a3f6a13c332d92410609b5505c61f6e67c36662bbf273549edebe0" + }, + "0xe024188850A822409F362209C1EF2cFdc7c4DE4C": { + "optimalUsageFactorLong": "0x0eb853b95543125eebfd56f0a075948528c93926bf4cca95c743d90b26b21d22", + "optimalUsageFactorShort": "0xa006789a13372be4b8bc7f2c5b41eb8805f1fddea8132d7347018395647f0b4e", + "baseBorrowingFactorLong": "0xc8dfeb7e645dcb68d790ef17267243db9062f5af22664ff4118621051846982a", + "baseBorrowingFactorShort": "0x3b5bcc77e26f260b98aeb3eb3744ee987069e8ca65c091844d59638a4b70acea", + "aboveOptimalUsageBorrowingFactorLong": "0xf89c1406d5bf6963d9adf9c941afaa310117a85aa76040f4e302c5e31b9b717f", + "aboveOptimalUsageBorrowingFactorShort": "0x50724ac6088106b1c3b9b8f3250522fdd014511eb982792d706f47787a3b04cb" + }, + "0xCEff9D261A96Cb78Df35f9333ba9F2F4CFcb8a68": { + "optimalUsageFactorLong": "0x67643567e449927633b805b557c44f2b2017f05a266913eed8e78770f61513e8", + "optimalUsageFactorShort": "0x44b177debd5942b2914769b914e21281ffdb0580774c0614f40161f14699aa06", + "baseBorrowingFactorLong": "0x0582ef4ba7c57b0268b64955df9cc8daa0cb2bcd2953a69a51b0ca84b767b3cb", + "baseBorrowingFactorShort": "0xe36948a5b3b79d94277e96604495627482751e70803fefc8e4a5e144dee3b4a8", + "aboveOptimalUsageBorrowingFactorLong": "0x67e7ce3145c31a3e54ce92b906e5255a4837fffc4bac6bc6d94a1703c84d5f10", + "aboveOptimalUsageBorrowingFactorShort": "0x46ea53676f03539964583c358c9001141c887b3e2eaaf5d189bfaa47c9743109" + }, + "0x6d9430A116ed4d4FC6FE1996A5493662d555b07E": { + "optimalUsageFactorLong": "0x2b15ad71eb87ae68812d1f479c50cdaff2d3e25656a4e5cc0e4c0263a6b12abb", + "optimalUsageFactorShort": "0x4a0532d8c91e59717e58812b5cb3db2448bb0259754a4d6ba03573fe1e8a7415", + "baseBorrowingFactorLong": "0x326bf50b0422c610ac98a97d55d0b1fe20e8b13883e25217d4f7b280667de891", + "baseBorrowingFactorShort": "0x70ae07e1ee1e5e9c9c8b4ee165533272a04a67ac3cd39fc13e80648023223c67", + "aboveOptimalUsageBorrowingFactorLong": "0x14c1fb68c3bacfb54473ca75c3ef5b3471df05b4c1b7cd26d8e6fc813966a2d3", + "aboveOptimalUsageBorrowingFactorShort": "0x51569a7c66e01dfac697d1ba3076b5531a24a641666f49dabec0e10ead773d3f" + }, + "0xcf083d35AD306A042d4Fb312fCdd8228b52b82f8": { + "optimalUsageFactorLong": "0x7840e94f292370d68bd53ec03a62eff2a4d983c33851409ee8628968eea742b4", + "optimalUsageFactorShort": "0x7f41285fa95bbaf591616c9345d76ba7ebe94d9407585afd7899ce0287c3e988", + "baseBorrowingFactorLong": "0x4ff90dd5a613e84337e382dc10bd5658ac3e76e09e3961d7b7f66482fb353e64", + "baseBorrowingFactorShort": "0x6d831ae09177e2f7620593f01b0005f3d5363d262cb2814088c5b2820ebd0594", + "aboveOptimalUsageBorrowingFactorLong": "0x3c579fb98185edc0c32b97dab3f391103e7a0a26e3703c7cb4824e02c737c8de", + "aboveOptimalUsageBorrowingFactorShort": "0x0e19a3d474fba521e7b934d1d3195e91f9b6a13f5a8e7a94edbd689801c966e4" + }, + "0x065577D05c3D4C11505ed7bc97BBF85d462A6A6f": { + "optimalUsageFactorLong": "0x1e7edabe8af95292222c057766a15b00c0a73f2aea1f1a4311aabb0d42f15763", + "optimalUsageFactorShort": "0x2bc511e5109e9f96eaf9f8389bf6534212759526a0b1b6550d3529e4a75fda18", + "baseBorrowingFactorLong": "0x76c981666ed9c05f0d3ff0c10cfe172e5d8a27b1fc0efee752944bc7e0fa0e39", + "baseBorrowingFactorShort": "0x420abcc48ffb985a690715aa2b538b95a3f63030f25937dc92d929503644ac74", + "aboveOptimalUsageBorrowingFactorLong": "0x357d8148aa930b7242653068b7a92fe6430b13a2461daaef913357788d198154", + "aboveOptimalUsageBorrowingFactorShort": "0x30441063c794feabe17080369a2b2ed756b28c18440a4e95d99242656014e524" } }, "43113": { @@ -1173,6 +1245,22 @@ "baseBorrowingFactorShort": "0x61b2bf5ee8c0abafb81996ae64f534c17dc690a453b62cf2151e26e5ec2f8229", "aboveOptimalUsageBorrowingFactorLong": "0xd42c10f47376a3705a0244fba83a2b52714b4742dc4e285b9b0cef38e28ab0cb", "aboveOptimalUsageBorrowingFactorShort": "0x15d1b15dc1999636db607f963394239311b8b4119e830801d9bc28df041d3bbc" + }, + "0x1635eF7FBdce68eC80A3672aB710A5a99044f5c9": { + "optimalUsageFactorLong": "0x326291a564ca0815a15b162ab7c7392c9af933d71cf212db6706110b9e8ca708", + "optimalUsageFactorShort": "0x158e68b9b1b40c75b8eb27751553047e92111f90ea1ee69892d02842259b30a8", + "baseBorrowingFactorLong": "0xca5d2909709e2ff37bcfc79e7d4b5e087976e9a980a3fd94a8f549dcd472d5f7", + "baseBorrowingFactorShort": "0xe8f97630b43029a2ae417d1757c13129ec4b4c49a2edc174d09e6ee3278466ea", + "aboveOptimalUsageBorrowingFactorLong": "0x68051e0e54336a67b76fa39ba861807816247357c76cc0941c4b1ce6a206e5c0", + "aboveOptimalUsageBorrowingFactorShort": "0xca4cff0bb9c3ff4f939f4d4b06e67d2fe02ecb9e6b4fa5320a88174848371a87" + }, + "0x92d3DA41E166A12e3Ede9e2Dd9A272C5c6FC55E1": { + "optimalUsageFactorLong": "0x06c1306c101925417a39f173fc86aa93bf9fc54cc775b2d562e772165fe41aa3", + "optimalUsageFactorShort": "0xf50161f826730afb420b0ff322202c1b194523023b8c5afc49bdbcb75d0a1ccd", + "baseBorrowingFactorLong": "0x370641863a29b7222b9932508ef360b497971b94ae2386c75e425dcdd490742f", + "baseBorrowingFactorShort": "0x193751bc12f4f88ce318699f20d18831ba009299721beb73d79556a2a57a2981", + "aboveOptimalUsageBorrowingFactorLong": "0xb7259891f0c1c17402544c7804304f0fce7bc0edca220ef5ec2ae1892dc0bb1a", + "aboveOptimalUsageBorrowingFactorShort": "0x0680ea31aa2e6cff597ddddff30f0a3a35a1de8bf5303d2194920128d725a84b" } }, "421614": { diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/prebuilt/hashedMarketConfigKeys.json b/src/Managing.Web3Proxy/src/generated/gmxsdk/prebuilt/hashedMarketConfigKeys.json index 665021d9..c905d465 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/prebuilt/hashedMarketConfigKeys.json +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/prebuilt/hashedMarketConfigKeys.json @@ -6,8 +6,6 @@ "maxShortPoolAmount": "0x9e6c1bd0ddfc11aeb615ef5bfe45fbff2f7990f19ed2121fca3c337b14a157e0", "maxLongPoolUsdForDeposit": "0x35fc0eea75eac98f81bada4885b906c3d1712da20eab960d1ed7036a18e9b66b", "maxShortPoolUsdForDeposit": "0x35fc0eea75eac98f81bada4885b906c3d1712da20eab960d1ed7036a18e9b66b", - "longPoolAmountAdjustment": "0x2f5eb334e2d63b490428a2c894148cbab55638c28f5139dfcad774e04d99c43e", - "shortPoolAmountAdjustment": "0x2f5eb334e2d63b490428a2c894148cbab55638c28f5139dfcad774e04d99c43e", "reserveFactorLong": "0x52cc66676cf0564a00d6381240725a00bea4efc226e693dcbfe56d74fa96c7e1", "reserveFactorShort": "0x6e3893b66c4b4808b05fa668c2798f32edc4272887973f5d74bd095553ddca1b", "openInterestReserveFactorLong": "0x0db424b730817efdd449a3efc33d03f985a9a6068cd24759821702eb87c24333", @@ -45,13 +43,16 @@ "minCollateralFactorForLiquidation": "0x4ad6ed9b76315a721ed0263f8e550ae6e6dc5ed2bc623569492a2d94a64b0083", "minCollateralFactorForOpenInterestLong": "0xf6af02901769f5d0431c90ada09d6c367624e1076786532fd2ce8e6d717667a2", "minCollateralFactorForOpenInterestShort": "0xaa5c6a876f5b9214f7f2ab110afac5d785b3fe106ac7cd7a0d18984414c5b6d6", - "positionImpactExponentFactor": "0xc803b8cb75cba8e65bcdb755850a3b00ed19f35a17433db4d7b00c0ff8d3c3c6", + "positionImpactExponentFactorPositive": "0xed5a8eacea7b96d4e9b1dd321fd6ce61d9e6eac33c2d7c0f83994eca660f47b9", + "positionImpactExponentFactorNegative": "0x760058b755f770d36527beb0a3c3ba73e6e48461c45043a48bb8ab10b236c3c3", "swapFeeFactorForBalanceWasImproved": "0xd2f7a87d5d57a855fe4a2f329dc1e09ace6cb08c7e2836429f1d102e810972f0", "swapFeeFactorForBalanceWasNotImproved": "0x08f90c2709ec73ef9e0fcb703ea79aba37782b5569c8d8382a4028b876a4baf6", "atomicSwapFeeFactor": "0xd150b7f649c4be53a26b4b617b831c4f675acdd63f8b8974388503c3560ddb6d", "swapImpactFactorPositive": "0xa3eb1cf6b16b64b67753729439ad7f9a154facab21aaa09cadea6e51ed69fe47", "swapImpactFactorNegative": "0x96fdadeb1e61115c586f2886fa40f103f462d1a508917578820872f807d214bf", "swapImpactExponentFactor": "0xb4bf08b3260bb5825adc61b0687ebe04c39f9e2991a2019fac11bdd22a3a6de9", + "withdrawalFeeFactorBalanceWasImproved": "0xf44cd7aeca62ba5c5e0eb5cad31de4df043489d5347326ef88cea4f35de06a30", + "withdrawalFeeFactorBalanceWasNotImproved": "0xe51bf9539399e04111d0af3cd87a7b716dcbf83c81710239107a4a3d54386a91", "virtualMarketId": "0x35d3376aa74136175cfddaef4f2f591d8e9f39213a61994f9a00549c6bc04520", "virtualLongTokenId": "0xe47cf033d5b118f5fcbd7eac09913b24cfc4b2782f90e71a8dd0fe7aa4f92e7d", "virtualShortTokenId": "0xe47cf033d5b118f5fcbd7eac09913b24cfc4b2782f90e71a8dd0fe7aa4f92e7d" @@ -62,8 +63,6 @@ "maxShortPoolAmount": "0xd197e9ffcc4bb7ad241307d84d97e23ea8f99db8e75555da273eb557038ca7e9", "maxLongPoolUsdForDeposit": "0x3808bc29403b6ac98cc711a3b18834b556e3d49c9ede22acb6b6f8a4c6058cc4", "maxShortPoolUsdForDeposit": "0x46cff86409ac994cffb17f34dd0e50e4a44f3b908c1bad57c4379cea5228e60d", - "longPoolAmountAdjustment": "0x6218a389d661d40a1212995e02d62c02b9d6a8fb1791155296f35a164cabc776", - "shortPoolAmountAdjustment": "0x3bcf69f3d14fa4819af04851d9e4a3e848715863cb046d7a2b21f6e256618ad3", "reserveFactorLong": "0xaea7150d6795f993986bba93c83082900730d0f68f967ddc1a961d675ad9359e", "reserveFactorShort": "0xee715188057a7239a71c0970438bc6ce3ba2b03dc0b6c89ca2ff3874f6853db2", "openInterestReserveFactorLong": "0x5aed369e56460e85709c8498f42b96e876384d17830c4a087717356197863a9f", @@ -101,13 +100,16 @@ "minCollateralFactorForLiquidation": "0x41a57a040d3da82057a2affe225c24c19c04b76c3e7fe0fe5043304ce5ceab11", "minCollateralFactorForOpenInterestLong": "0x9d952e960da486bb07fd5da270a9f38c80dd0c394d4fb940d08357e82f052e73", "minCollateralFactorForOpenInterestShort": "0xc4f39f26f1ebe2c2b425c07a1bd72b91ec14e54bdff50e69cd84cb57cfe9964f", - "positionImpactExponentFactor": "0xb3eecb6e2939f73b7f6ce67479385071d99057835f8b6d5cff1255c57424cbf0", + "positionImpactExponentFactorPositive": "0xdaf170b834b135cac5c273630d0700dc16a416dc49ad6d95c6a9dd7ffa4d89e6", + "positionImpactExponentFactorNegative": "0xc715f59b92c4493cb2a750a00ead49c0d1b35a04759a0153e6f9be0687b859f1", "swapFeeFactorForBalanceWasImproved": "0x4bb062bfb969a41fb8ac9a3338dcca06a312d60aa511535de9b290de56008e6d", "swapFeeFactorForBalanceWasNotImproved": "0x4ea0ffd481b6caa50138a2c69d320b236cadb1c69536683ef92e93454acaba84", "atomicSwapFeeFactor": "0xd7a0acca1804516a01dd5e0058950cb3911bed3405408adeb025867ccecf1da7", "swapImpactFactorPositive": "0x849e771df499463b3a5aa83b5bc195e882c5a28bf0ec0d3f060d82ddb3fc2024", "swapImpactFactorNegative": "0xaca989b67d45cf4d4a0e9d12ad35b0e21a61196eff7882388a0d164c646c9499", "swapImpactExponentFactor": "0x20c976853f23f3c0844cbee8733addcad9a4e2d8a57dc7729ef21eee841a1266", + "withdrawalFeeFactorBalanceWasImproved": "0xbf84843f5de3f7d4c336c9a99ea4c36f85b66aa06aafbca0656fbee4fcac5446", + "withdrawalFeeFactorBalanceWasNotImproved": "0x94684af3204fbbd9267468c472a833b6f335d1cc86304657c7685465826d7b27", "virtualMarketId": "0x3a05f8c8f61bf8c5c62929f1d68a9975fdaf88e589d39e6c70bdba44933c7ca5", "virtualLongTokenId": "0xe47cf033d5b118f5fcbd7eac09913b24cfc4b2782f90e71a8dd0fe7aa4f92e7d", "virtualShortTokenId": "0x7bb231dec6009cf7c97d392e1a14075f34e82077fd9c20cab34ffae7bd46e869" @@ -118,8 +120,6 @@ "maxShortPoolAmount": "0xeb9c4d6e6bc4ff040d5c6bebb881b52ed810f95c7bd1a4b1363f630d7f077474", "maxLongPoolUsdForDeposit": "0xb1999c69ae4c9c835bf4f561503b6fb611e2891fe5a8d6b07c24be0dcbfbfd90", "maxShortPoolUsdForDeposit": "0xb1999c69ae4c9c835bf4f561503b6fb611e2891fe5a8d6b07c24be0dcbfbfd90", - "longPoolAmountAdjustment": "0x698b22439d75a4a4a632f465c8e8acf37fc4052fd4b5726e631c1d3ed61c8107", - "shortPoolAmountAdjustment": "0x698b22439d75a4a4a632f465c8e8acf37fc4052fd4b5726e631c1d3ed61c8107", "reserveFactorLong": "0x0d708f32e50b1b8f86c6162d0c66137e969740b638eae5bc2b613f569e798e37", "reserveFactorShort": "0x0910db514f13e6b1b5c53c5536c1f8986d7a1548ce6c3aedf3786ab38ccb9b30", "openInterestReserveFactorLong": "0x9a6ededc474e2f41c503979285269cc1fea055963819e9cfdfee91076cf14116", @@ -157,13 +157,16 @@ "minCollateralFactorForLiquidation": "0x3e41b2e14a4c728e9642f31e79846e7deb22a24feae6ccf6dc92f1fc0c5e859a", "minCollateralFactorForOpenInterestLong": "0x223b38a763d5c6d1491fd45fabecfd4c04b4f8f61778d8ceced8f12921458b9c", "minCollateralFactorForOpenInterestShort": "0x23b2ddf33c216cd62a8f20e0f3bdf3462bc508bf83ccf6ffcd1e1da2fa441835", - "positionImpactExponentFactor": "0x822d156e2f4eac206a436a3826ef14b7e28f80a6b797cdcf2e48700518f3cb5d", + "positionImpactExponentFactorPositive": "0x9f93e90afdd2a41c870b6269d1690e62cc6c8af3a829e49cb379a40069783e61", + "positionImpactExponentFactorNegative": "0x752280aa67227d94d77c388412bed3921025d568ba3f89e55d0180d06aee3d7b", "swapFeeFactorForBalanceWasImproved": "0x898c067070bed020aa6a881338f66cf7a27aafaaec39fdf10a667a124e9c00fb", "swapFeeFactorForBalanceWasNotImproved": "0xd27b69dce975cffcfbd239a58f7e1865719df4b5eb74c074a750e6459dfc057d", "atomicSwapFeeFactor": "0xb7b0fd446d2505bb7aaceb2616f7d4766db720c6f938bf6b0e7b923b13b7c120", "swapImpactFactorPositive": "0x257d59b0ff05ca7063136a8bab2b182646d022866c6bb60bf5e1a951f56a4f33", "swapImpactFactorNegative": "0x225da45bd850b96bbe246e4f7f53ed51dccb165b1d1a16d2c4495d2bf1c01cbc", "swapImpactExponentFactor": "0xeb7228e9a1df1390c683ceb4a31577ee3381b679d41d04220e18364c641c24f2", + "withdrawalFeeFactorBalanceWasImproved": "0xf39c2291fa32f325b1fcde7978ef133a538837afb04493c4b8febf2a55a856d8", + "withdrawalFeeFactorBalanceWasNotImproved": "0x676152e8535fb3660b9bc2555f8ce2dcdbaddb889b3ea7ace141121d4502ef90", "virtualMarketId": "0xb2c10f2870b97107ac5c5ab983e9238eb8cd9447c1aee87550b62df0406414ce", "virtualLongTokenId": "0xad11454a7b68db8683667df39c97a96eeae88909e5fb849428193697b0dc2492", "virtualShortTokenId": "0xad11454a7b68db8683667df39c97a96eeae88909e5fb849428193697b0dc2492" @@ -176,8 +179,6 @@ "maxShortPoolAmount": "0x259df783d9c78073575ba824533a203c2b15679290cfdbd6d06482fc9a437a86", "maxLongPoolUsdForDeposit": "0xc36890864be1aa564a33fa69c3f92a3929eb4a1f6dc4afe72cc76f259ac0d4e3", "maxShortPoolUsdForDeposit": "0xf10df680fbf91b3d5a8216c8737c44023628cab2e14b178a13d20e61f5c8ea0d", - "longPoolAmountAdjustment": "0xdd4ac48c161ef4a0be773485c18d339102c339a792eb415c50b34a80ee0453c2", - "shortPoolAmountAdjustment": "0x61078d37b8ee9462bd2ea0e47d88e5b3a604247e6e0df43b21f154627bf3d503", "reserveFactorLong": "0x212d36de7b523df4b74555395b48e3323e7c6996e14165af6bd1ec54cde3b963", "reserveFactorShort": "0x59fb037f77cb858eca81fce0ead59189a60f57100848236472cb0bb623908a82", "openInterestReserveFactorLong": "0x7b6b8e403bb28910630c124ce8abc1c3885f04235fbc4eedc3fdb7375fb43acf", @@ -215,13 +216,16 @@ "minCollateralFactorForLiquidation": "0x9c713920b491455ee33d87a6d12394a42e83d5f426958697dc08a318be13ed91", "minCollateralFactorForOpenInterestLong": "0x18ab1bf4fdef11804a1212c94ba4ed35498ef5942b3d385fc9c33f933f17f60d", "minCollateralFactorForOpenInterestShort": "0xf5cca0ad2e4b2341858ed82455e0d4e3e2dc289d93124403d67c010ca53b62de", - "positionImpactExponentFactor": "0xbe60fcfd99ab63b9f7c2a82da310aa88958ee0146cbc9ea008d8cc16a97ac70f", + "positionImpactExponentFactorPositive": "0x4e48004100e37e002fdbc1e758495e1794838c4e5072fb848704a98bf3fc72d5", + "positionImpactExponentFactorNegative": "0xceea7dd82ed909436d5785e1b4fc6fb5b6a07c0273a35f2d7bb0fa94d7a105e6", "swapFeeFactorForBalanceWasImproved": "0x695ec0e29327f505d4955e89ec25f98741aedf22d209dbc35e1d2d61e683877c", "swapFeeFactorForBalanceWasNotImproved": "0x6805e3bd65fab2c6cda687df591a5e9011a99df2ff0aa98287114c693ef8583e", "atomicSwapFeeFactor": "0xc125515896b48c72fad34d60a7735c27394bbfda809bac0461966a907a9dbabb", "swapImpactFactorPositive": "0x79d8fe854154b43d003a20314c803b78ec01391248008659c0c8e998e866d7d7", "swapImpactFactorNegative": "0xe8438cfb97aef79fdebd4e948dd086e7c042ae7b47a2414454f6b691ebcc2419", "swapImpactExponentFactor": "0xf64c72f0c430da1f9096daec486ac3ba00752a0b600ce602ae5bd0a62c004145", + "withdrawalFeeFactorBalanceWasImproved": "0xe7b3c39631a34b207a11df587e34cdfe1e7009e1f2f1a44d175360c65e693140", + "withdrawalFeeFactorBalanceWasNotImproved": "0x906d52a6d9454f838cfc0b0d32c8814c6a8ca236926df6a6b56c68b97445ca02", "virtualMarketId": "0x30728fe6602aed966d65c62d392bcc1a4f02e155ce82cbdcae778669fc35a83d", "virtualLongTokenId": "0xa59040b7efb6b7122a74cb318a192ebc6732849dff5332ee3ba40b90dfa0a04f", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -232,8 +236,6 @@ "maxShortPoolAmount": "0x09a0354b47ce26b937a9377bcf171768a4144b3da3e3678fd267ce0c1409fa57", "maxLongPoolUsdForDeposit": "0xe1ccaff6899c584cd1afd51bad8c0dee84482a909301836a25c66f0d2628c210", "maxShortPoolUsdForDeposit": "0xadd2da2afb65847d22312497be62a85c93bb6c09299cb3fbfd70349a2a075005", - "longPoolAmountAdjustment": "0xe06fc4c2a975bfa986d0af41a3dd02fe81dd7c7501be7f2fbb51ddfa88a5077b", - "shortPoolAmountAdjustment": "0x645797122396cbc1adae18dd7be3de0c27d1b57c5717d446aaa59fd9233b05f7", "reserveFactorLong": "0x337e24e6d04ed216d312a36582f1e09658323e4e976607339857bf38abb48a35", "reserveFactorShort": "0xa40138b1217ca2863887e5feb34c72bb7c57ad5ae301eb52c22eb5a964438bac", "openInterestReserveFactorLong": "0x75f7ae4e1510eb1220300b6e25ffb4c58ba622674d0930d0fd71432e28e585f5", @@ -271,13 +273,16 @@ "minCollateralFactorForLiquidation": "0xefc3fc73b918e0aa9a9a9f306393b25a2919aad551cbd5c5535834b6ea9d9934", "minCollateralFactorForOpenInterestLong": "0xbcf38cdb77fa9cb02787c89b5b616dc4d91337a400795d617a2580ae49a6e209", "minCollateralFactorForOpenInterestShort": "0x635ce4b3864fcc94a0eb30789ab0eedb1724ed4bb51ebad2fa2e9a2bc051f60a", - "positionImpactExponentFactor": "0xd3fb6cf1d6db9b533ada6f4f3e7f52adf7fa871788e67b80e7ae6e63811017e5", + "positionImpactExponentFactorPositive": "0xd9b7fd8d453be6a9dc81b0597254a99343dce81f4053e666cfa6877c106907c4", + "positionImpactExponentFactorNegative": "0xb538e5cb8b3b49db430abba925c112bb63f32a7e9510b7085570e4f92087a3d7", "swapFeeFactorForBalanceWasImproved": "0xd795542d99d4dc3faa6f4e4a11da9347d4f58fcfce910ccd9878f8fd79234324", "swapFeeFactorForBalanceWasNotImproved": "0x4a0e3a43fc8a8e48629f6d4e1c0c1ae7098a35d9834cd0c13446fc2b802a24a7", "atomicSwapFeeFactor": "0xe9ea68981039e8c7bdda3234e3fc66eccc1b21bb30ec5c053662a442b6b38958", "swapImpactFactorPositive": "0x801066104b68a8504d32a319a865f5010a763e0b3f4372e0b03f3fe87ab77eb7", "swapImpactFactorNegative": "0x1a282191426197cc0dacd8fdca48acc252d354470638b44ca410893f9bc8d576", "swapImpactExponentFactor": "0x62f7b6ed5b17f35d4d42eb6abcaa00b07af41f4694af6f491f9bb5b31911af3e", + "withdrawalFeeFactorBalanceWasImproved": "0xf662bbcdd5b161ba582cadeea8ffaba96f43a389da72b518b0ebbc6bbf36db4b", + "withdrawalFeeFactorBalanceWasNotImproved": "0x2ec6c311e0e3f832911555a62d009b2b5d5324b1a3b4de01b63dcda7c8aeac16", "virtualMarketId": "0xa8cd287a5068df6cf03223613f14a133ec7b31a50b305ee6091c89c1dcff904f", "virtualLongTokenId": "0xaab37f889b9680dda34f58a689de3023cb22f7ae14d32a3c1d45798a973db1f5", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -288,8 +293,6 @@ "maxShortPoolAmount": "0x014b579a6a16241a955aaf663427b7815aead5ac8dca1d10409e00cad7c1335e", "maxLongPoolUsdForDeposit": "0x6f0162d6712686b9d3f54e9d64ea88b4b96d647fd6f1f97c8ea557c8d39c2530", "maxShortPoolUsdForDeposit": "0x081e26b0996713b0206c3020dcfaf76f5226deb0c48b0cbb81397174cd7ff5c6", - "longPoolAmountAdjustment": "0x7369c7708e79b0ee8d070e6a46897271b7725ed5239ab4479ff67b7b2281fceb", - "shortPoolAmountAdjustment": "0x49e0703ccacdfee9505137868f65437507b52a083997532dcdb7924f48453e80", "reserveFactorLong": "0x5c150417d919fc4cee0a0b25c630ca857961aed6f81a382affa9502954e66e24", "reserveFactorShort": "0xcbe6caba57585e15b5512813e264e8d2b7a78744958cac0a5d6654daaa6d3571", "openInterestReserveFactorLong": "0x5ad9b812f3f6fedbcea95e0d21f63e925cad5721d972ed501aa01ec32df12816", @@ -327,13 +330,16 @@ "minCollateralFactorForLiquidation": "0xb5942ec068620932b817a6dfdc8481a8d8f06dc0563a60f643926b6a103c672f", "minCollateralFactorForOpenInterestLong": "0x47ece80b5a8441270dc51b704ac241ee205157d6e79a17ec9a7a78d5a1c405cc", "minCollateralFactorForOpenInterestShort": "0x3ac33ae245dfa87c5023e2ada76a30d63b5d4a462868f2df4cf285c450c055bb", - "positionImpactExponentFactor": "0x8185adf991484ed9941b9d357c45b4aaa04298bf56481c3ac20410b14c6e0426", + "positionImpactExponentFactorPositive": "0x8f4cfdcd8f7296dd65d54caa18205e671cb6157e9fa21065e5449f2bf0c7410c", + "positionImpactExponentFactorNegative": "0xccc1573b35ecc9be518d4501c7013a4a05e5dfcd0878a849769e58b4e45f5641", "swapFeeFactorForBalanceWasImproved": "0x67a550e4fa661b4a6f6f7a4f2f276a0dac54970e784fe703031ee403f04b4665", "swapFeeFactorForBalanceWasNotImproved": "0x5f0f923b62e09d2ebb7df2b4b505d5eb8843b57816cb1fc36090965cfa939bfd", "atomicSwapFeeFactor": "0x10d37a7e8e1567aad34f48c74ecd3ed0100bc2bb6f7248f5bbd6a3be6c10fe2d", "swapImpactFactorPositive": "0x0538cdd47f4c430b1fcb396d2d4b81d55cc0fb604620d2cc1d1092d9a3d13b4a", "swapImpactFactorNegative": "0x7eb5c1dc27cc686df401fe1cc4a36537b363bfaa4d94f77d6fe72fd5ede61d08", "swapImpactExponentFactor": "0x7e561221c0f8fa07e9ca813aca94becde6d2fc0feacd84f50cadde2b177a4310", + "withdrawalFeeFactorBalanceWasImproved": "0x070c87d45cd90f5cdfdf0dbfbc747d6d423e3a69f7f5fd15c092e8ab44d4d4a0", + "withdrawalFeeFactorBalanceWasNotImproved": "0x32f7aaaebe1beb2e506fb20efab8ea883fb54dd0c977be1118936e24f794982e", "virtualMarketId": "0x6fb554632adada3dfa9cce73bc454e855fb9969ebce7a35ba3f266de425e731e", "virtualLongTokenId": "0xaab37f889b9680dda34f58a689de3023cb22f7ae14d32a3c1d45798a973db1f5", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -344,8 +350,6 @@ "maxShortPoolAmount": "0xf875d8d0b071114de2992c8ee8e5aa229989807fea4381c61f24e283e17a5ac3", "maxLongPoolUsdForDeposit": "0x2dd782cf4b4a21869043889e20716913fa67865d30972b728f3fc8d9472fc2ea", "maxShortPoolUsdForDeposit": "0xc3dbd43e14db059345a7549ae8eb1c1cbb2573ef281bd2dfe0b8db4331047dea", - "longPoolAmountAdjustment": "0x3cb8477be65494bb8d679f5a18d3c07678f319c3be7e7ebfaa5c0369ec1dbe2b", - "shortPoolAmountAdjustment": "0x071eb9e378cb51e4acb31fbd6f6c44f5776b5682a5f2d6f4267c3b43109d9b66", "reserveFactorLong": "0x7c6124ff9bc18002a0adcf45dffaa7f5a3d1509d909a2d3ca3ad57be9d1714c9", "reserveFactorShort": "0xfe05d80ac48b6d31d2d13310166dffcca3ca0f335509331d70f1bad1283456c9", "openInterestReserveFactorLong": "0xdca9e9bc9359f1fe12916304aa46260a002d669075c9b3158bc6c14e02665ef3", @@ -383,13 +387,16 @@ "minCollateralFactorForLiquidation": "0xa7a3d6ff9c0a71648dc0e6cf384fa77bd83e4b2ff8395f57d3c34f2b36367977", "minCollateralFactorForOpenInterestLong": "0x3c2241385fd888324a03ea03eb3606df19e300ae2c3cf2dcafbe2d235a04b676", "minCollateralFactorForOpenInterestShort": "0xeca78003c8f185c46542ba76034dd77edf8c1cee1a710cc59fde908d5b92f309", - "positionImpactExponentFactor": "0xf1f5a97e4945291c333c8857cc08ec673be5b6c9cde98be1ad86931599685acc", + "positionImpactExponentFactorPositive": "0x2d9b33ef3e81606ed0aa4c9a5e2735177308832c5d86d8c5ee6aa2bc5f745add", + "positionImpactExponentFactorNegative": "0xacc0be7d53abdbd6bf1a607ee9b26274eab2a13140996a5b833d753549d3b606", "swapFeeFactorForBalanceWasImproved": "0x6a1d8e63575704359c436b79657db011d72a92f67f1bd5e14afb57e9a2912498", "swapFeeFactorForBalanceWasNotImproved": "0xaf4fad6d380803699ec362dd04941db2d6c038f504ad922664c8f9d1a4ef7160", "atomicSwapFeeFactor": "0x25494613773e872f0f6580192c653bd12541ec9658a7c4afbc1ff86518cc6ef1", "swapImpactFactorPositive": "0x5d50cff84fe2d5abc20ecbe3156a438d1b3479175f4748dae1d121887ed30eec", "swapImpactFactorNegative": "0xb9cc0f62898c08c383e014640b673a6cecc479fa1080544ea3250f029f3c304c", "swapImpactExponentFactor": "0xc7bcb77b7806e06a50ec6ba4bf17541c63b0577ef3d18018f96e5e74d2bd7619", + "withdrawalFeeFactorBalanceWasImproved": "0x69247f45d35118d0e5ed2cd787953ebd618992d982890e13a8911183015b59a7", + "withdrawalFeeFactorBalanceWasNotImproved": "0xdd952615e71995d81a871e915b4b6376f89ba14e7bf5a2f6179f3403d99432ff", "virtualMarketId": "0x5eadb7b43a05016c33bc1d1a89e4938b37406a70977a8fd7bea66d62ba4df824", "virtualLongTokenId": "0x8f92ebbddf51de9f1607c3d6748a858fab29822d139ddcd3b8f877241ce75e70", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -400,8 +407,6 @@ "maxShortPoolAmount": "0xde25a103d468d8197403a27de53f627c7229d5c0354e8f55c57cd1d4484a8b13", "maxLongPoolUsdForDeposit": "0xdff94e258d022aa19698596b1504aadddf88cfeb4566559ee817b0cb4305d882", "maxShortPoolUsdForDeposit": "0x5e032f67eed642ade37ed3d94cef0eba66ab6f4d12acf3f66b91178515082097", - "longPoolAmountAdjustment": "0xd3f4970c2ca9815e0d0906dad117f88ea83afe8e55760371cca991fb9deb0554", - "shortPoolAmountAdjustment": "0x4447fbca62e144f4a420ad4f5086670239c59e1b0f5b963ca024940481db28d4", "reserveFactorLong": "0xbef1f359aebab6d38dbe716f46988191a08fa6aa72eddbae2c3ad720fc56ada6", "reserveFactorShort": "0x1d1710e3b42085266909ddb56a8cd6ee4a2fd296c1095d287915c42d18264eb1", "openInterestReserveFactorLong": "0x38b11830c1c117bb21a916d4755adcf48e0a0ffc143dbf4630931644331ccd92", @@ -439,13 +444,16 @@ "minCollateralFactorForLiquidation": "0xf28436ee632c09e66f86fd35aaa5d18095399b9108d4ba85c8525a3072af2568", "minCollateralFactorForOpenInterestLong": "0x7f97bdae1ee1c0424ccd6dc21526e5ef1e0cb581856d3c0b3279c518b2b140f6", "minCollateralFactorForOpenInterestShort": "0xa370583d9939495b60095d94f3906c9b15ba4e7a3d7422210d6f541c426d4010", - "positionImpactExponentFactor": "0xe33c49e3c7a970aa64a71f22c589f0436ff537390a61d71088600b2f1fe24fb6", + "positionImpactExponentFactorPositive": "0xeee658896e6d8eec18df67cba9d2010b16e474ef5b867e207acaa10312643752", + "positionImpactExponentFactorNegative": "0x5441621b8713aec39ee149727c230079a4392a954e1cd6cc55425fb17ff1ac13", "swapFeeFactorForBalanceWasImproved": "0x1dbf6ea5c40ddb4981c0c991291ebcfe9ca18da36b55476f46c07db6f9d4d796", "swapFeeFactorForBalanceWasNotImproved": "0xbdfacc5a3aafccef508a92c25358d876d54cab9266f562bfeb0f075011400b5f", "atomicSwapFeeFactor": "0x2fa11c68d618568b2ec47f2af07043ea0617b92ffb1b3392c5686ba9a063a7f5", "swapImpactFactorPositive": "0xa24690e158bd6148dd1ee7619d26d4db4c22e063bf7fbc4849b248713ecc4be6", "swapImpactFactorNegative": "0xea3e78f194aabd8ee877feb4dd76f0f10e28e5375fe88a39575480d27d265afd", "swapImpactExponentFactor": "0x708c76a038fd213a993b7643df04ab046fa1987cbe5d0d428475cffb4c1147dd", + "withdrawalFeeFactorBalanceWasImproved": "0x99fba34ae4a02d2f98af1dfe426a87351d124c90068c35290ae701dcfc0a1825", + "withdrawalFeeFactorBalanceWasNotImproved": "0xf81f9ab4d389e068787b961663df365fcc34110aac60cceaed5d1cb31acd13f2", "virtualMarketId": "0x67e3328811cfb35653f2f4c14979f600f39845fc18fc343c14304f0734072a9b", "virtualLongTokenId": "0xaab37f889b9680dda34f58a689de3023cb22f7ae14d32a3c1d45798a973db1f5", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -456,8 +464,6 @@ "maxShortPoolAmount": "0x5c29e5ae83edbd0ea9f796ece7753428ac0abfcb1f9eed6a0d52be50a3971d9e", "maxLongPoolUsdForDeposit": "0xd52409557286998f6253428f8a16fe801080e34363260c83c3541b2dd0131da9", "maxShortPoolUsdForDeposit": "0x2cbf927caefede44905c878cf4be72d712e82e9ece4ae725e848c95f9c09f986", - "longPoolAmountAdjustment": "0x895e9269530dafb937ce1aa620aae6cfe56f00074857470ffb1c3f1e61bd9ce7", - "shortPoolAmountAdjustment": "0x900de2fc53b3e2a42080cc8f925888c349bf0a1a5a7036be641aa548a037e3ee", "reserveFactorLong": "0x0285cb239e99e4627bf295cca3025820baa60c5833e1e6216b52fc09f687bcd1", "reserveFactorShort": "0xf7c96c68c833a4c9100088cb8c64a803b4bef37dfc21f8a6dd4b2f2098d1cd01", "openInterestReserveFactorLong": "0x732bac9969a3288cc473892f43e80792e58e7530338c8a37f1c63ba4dd855f15", @@ -495,13 +501,16 @@ "minCollateralFactorForLiquidation": "0xc256c83913d960d9206dcc2892b610d70f1215a7c0dca18cbf2a253a86a4e27b", "minCollateralFactorForOpenInterestLong": "0x2baf62173b9765c40d17461b94ede9de9288eaceb9bea879a93916d6fbc22a19", "minCollateralFactorForOpenInterestShort": "0x2d87dc943787f13f340d4ca58bc57c9779423fb4b7a25951482d25d8cedc88ed", - "positionImpactExponentFactor": "0x255ba96b3ea4034ce13d81ee90f50b43d11aa4cf3d7f6cf6e214708c8cfcdd02", + "positionImpactExponentFactorPositive": "0xd2513cb637ae2c88b7baa696bc1950f4a8be8c538314f421ef66909df672803b", + "positionImpactExponentFactorNegative": "0x3ab80819211bddfe9d2d10893fdda79fa6a23aeba50a4d6998b4293f23b7d6bd", "swapFeeFactorForBalanceWasImproved": "0x3de65a272685fe435c3bf061d018861d43e0981580e7f7fbbee8322549a24448", "swapFeeFactorForBalanceWasNotImproved": "0x16ac4a989200e46829ff7e2a35892009f28622ddbe6474b3bcbf0be26843bc8a", "atomicSwapFeeFactor": "0x921b5c21abfe7c96a3983ee5dc525afa485a1a3d75e2622780e5fd988ed51039", "swapImpactFactorPositive": "0xdd0713bd8c7d7d813cf41f2134c5c4171d1dd731b92f992bca75cee16f113bbf", "swapImpactFactorNegative": "0x2c1ef24611bfb6198a766b0251729bb7dac63eadd6743ed5585dcfba706d2b58", "swapImpactExponentFactor": "0x83731a2fa9b0d93a6a58adff585bfc0f336a70bb3a85535745a1d35ca14c41f4", + "withdrawalFeeFactorBalanceWasImproved": "0xac06408030fe9171d917b40f2914cccde68605f7e1d68fe48d5443afdcdcd369", + "withdrawalFeeFactorBalanceWasNotImproved": "0x2370e223071c35939ce94d3750d3e3403605f535ce38f66f25555012a1ee15b9", "virtualMarketId": "0x5d43ce08a24729807f7c46d7cbde59be236c1d3101b2aaa22e3d56b31bbd1602", "virtualLongTokenId": "0x6547e1b09306192c47b377a6974e71c596aefec1820265db5088bac5550038af", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -512,8 +521,6 @@ "maxShortPoolAmount": "0x45ae34fec4cf59d6b90edc724b710d91af4c64fddf1f0f36df86786f875b2294", "maxLongPoolUsdForDeposit": "0x24b8c29389965242b8e1d21a75edc2bdc9e622301c6efb3d3c4f842374d6b682", "maxShortPoolUsdForDeposit": "0xe0138895bc14ce6ac2f34a128e53fc8ddf7618f0bb6638edfac0e7f06d590d0a", - "longPoolAmountAdjustment": "0x960250e3511e26d9fc463fca2ab4336837fa1aa9b4e43df045c58dd031ab755a", - "shortPoolAmountAdjustment": "0x8792960fde3f1706abdb518fc691fd79c239bc28b123e97cc4ccbd5d8d6e23ab", "reserveFactorLong": "0xff0a930271e88ee0d0cd9e02b248dd70a13f773cf55bbf578aa8941331f7d203", "reserveFactorShort": "0xf397760ee901bb1ce6043cf70f533bba4dd0d5821f8ca21712ff195c3826ca2e", "openInterestReserveFactorLong": "0xf6d9427331c14241209cbf9111a3a91cc011edb1a57a20cb732c52d27fd18fc5", @@ -551,13 +558,16 @@ "minCollateralFactorForLiquidation": "0xdc1582e6529d9cc8f1962399984c6069dcaa98f558366ed6c054c2b725b86eb7", "minCollateralFactorForOpenInterestLong": "0x55f19e1cb6994dac8de0f0595716c8ce1c98c4a0fe7ab84d94a2581a2857ef77", "minCollateralFactorForOpenInterestShort": "0x661c2ecf5182f780d9b14cd701f17b54d2fec0a3c78259175f382a53aaa17c85", - "positionImpactExponentFactor": "0x9c4e91c06294bf042d7bf732cb8ef8eacbc2b113523e0a3d00ca94d3baee95b5", + "positionImpactExponentFactorPositive": "0x3fb8c464b8b04db3a2088ce0e9a1247eec8749b4953f555e836460ec0638c6db", + "positionImpactExponentFactorNegative": "0x8fffef16dd63873f0ee9c68d22ef5d90d99a0680b60ebe72054863f8c29f76d0", "swapFeeFactorForBalanceWasImproved": "0x1e388b1aefe26c7999b5916b8d315dc220aab3bd1abf69d022fb2ca798af1d87", "swapFeeFactorForBalanceWasNotImproved": "0x42455fb0390e5144cf404e735d539d273f23e0599527cd4cfbea64781471c11b", "atomicSwapFeeFactor": "0x142a11abfeb0ce942f834c8c1824cd4f4054f9c895ecd8cd620997fc38524384", "swapImpactFactorPositive": "0x8879db97a79f1b27c0eaf1b7e8326ca6b02dde9dab4a136bf6de2ae5bc87eb43", "swapImpactFactorNegative": "0x267ab1bdc0e337337fb57913abbc1774c61393c941ec14405210702c243dd087", "swapImpactExponentFactor": "0x42417562a37eef95c1e2ebc561a16eb5d2719490bbc0c214707c278411bdee69", + "withdrawalFeeFactorBalanceWasImproved": "0xf2484af6eaf492109d781ba61b78273e636861e1868a1e717fa2933a91f0088c", + "withdrawalFeeFactorBalanceWasNotImproved": "0x10879fae518df75d11665a5bea356135d3e6a03ea56c94b47d9ea796a8cb3382", "virtualMarketId": "0xbd5d0629f6fa7cfbbc696188d6e70260c1965336daa35470f96c58867af8ee36", "virtualLongTokenId": "0xf1560d4507be69cfa4a1caaeb724e1a2e5a3f483f931332ea5ae9d057224f287", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -568,8 +578,6 @@ "maxShortPoolAmount": "0x1f5836422874f52e62a3e5f9b18dcfcc4f756e18deaf8970cb8f8b22cbc870da", "maxLongPoolUsdForDeposit": "0xd037e3bf6b8fd9542598f8d4b32d056cbefd1f1b7b9389c3b0bb2e8702eacab1", "maxShortPoolUsdForDeposit": "0x303e01786379e113fa64d7e00fe38cbb41517f3273b6d45f196985c156823b66", - "longPoolAmountAdjustment": "0xf6e31dc8ea13a1ae2858567339b85d2dfa627da93631df992c08da350b6c0926", - "shortPoolAmountAdjustment": "0xfa261879f962482d5193f8ce26ba18f57d8943346b2a56a01b06e728947a004f", "reserveFactorLong": "0x63bae2f62e73f425dd3151bacf894c0a693ae52e615c9b92af1d0446182c7c07", "reserveFactorShort": "0xe2ae33340f4eb98c6db75dfa90b5c8a07792d3436becbab39ed1097ee7330692", "openInterestReserveFactorLong": "0x66375251f2286c9d1aecdb09f09ce30983c44b376609697167c0cd1eadf2da71", @@ -607,13 +615,16 @@ "minCollateralFactorForLiquidation": "0x34f110ea583e9f5ddde6db52500fdfa0f533d4289608e8385d6e8eb52b6ccc43", "minCollateralFactorForOpenInterestLong": "0x766fd0d002f43488d55b72193e9da1714d44851b4eb0e813cc8d280bef17a17e", "minCollateralFactorForOpenInterestShort": "0xd7db435910f38921a33518f369da861bc79b935c47e55310cda4cac15d5e8817", - "positionImpactExponentFactor": "0x2efcc03e271bba8971dffc9f4ceb1afc8fc3c3c21d00a7c3b55ce76374ad79d8", + "positionImpactExponentFactorPositive": "0x789131799ba49324e7b2002a25c04fcb7e89c721fbaac57eb0fbbb8033fbba15", + "positionImpactExponentFactorNegative": "0xf4c4a149a4d38e0d84360e5b95d3b81b5036f32251bbf5e619728696f1f35395", "swapFeeFactorForBalanceWasImproved": "0x33809fa251f2a79834e55024e55c4f8108575f4de5b2cb36a20328e5ab447533", "swapFeeFactorForBalanceWasNotImproved": "0x2cedab9e26e3f9beb8d6b7ed636b6bafb5c22480925bba846038f0c06b622eaa", "atomicSwapFeeFactor": "0x2e955a1d4b845ed986f466bb7d4be7403cef7c3ef1da3cd000250bbb251d2bf9", "swapImpactFactorPositive": "0xb63747d677b3f4894bf83370aa290ba493a3279ab6c71e8f627d6a19200fd0c1", "swapImpactFactorNegative": "0x6db11718caa3c178b5c71b0ebb38438e678887ee9808ee5fff12f45dff61f523", "swapImpactExponentFactor": "0xecb5d9ab804ddb4babf57af0763d13484ab59dc753b190aed034545d261dad6b", + "withdrawalFeeFactorBalanceWasImproved": "0x0fb5b96bca76cfb303ce0e955d1045fa1670a8277585dc06bf50a9be6cbdd248", + "withdrawalFeeFactorBalanceWasNotImproved": "0xb29495f08237d108260e161ab2f665aa0d99df14e22b35aa8c44dc92cd56dee4", "virtualMarketId": "0x403b84c44a43de012d5af0d352ddee18816098b6dc9ab85d18725c6c80ee34ad", "virtualLongTokenId": "0xd75a55ed2ecea1a03f2ca36bf769ceee55b3fcaa9c02f4cf863518485ed4918c", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -624,8 +635,6 @@ "maxShortPoolAmount": "0x93f6c9bc0eea0dd04594416ae4296d38b68f4392dd54b70d78c8a5e261286039", "maxLongPoolUsdForDeposit": "0x962e6363f5f6db5bb775a2171825ae83d1933bbeff0018de29bda54488da6b2a", "maxShortPoolUsdForDeposit": "0x32153c99b3d40dc8c10cf4008b39dfa7056a9dedafc097269c92aab12ef876c3", - "longPoolAmountAdjustment": "0xb249223bf4f78fafb799532ef2d3c1051b062906f9c0078f7b20a4e7efbc4925", - "shortPoolAmountAdjustment": "0xe9d6461d1253952d7728d3353f0f7755d6e6fd78c26584f3046b14b0d1194a9c", "reserveFactorLong": "0xf0d74a6066ac8b666c5c6985229190cb526b6f92bbfbf104971d42c15c608cf4", "reserveFactorShort": "0x21fb31f5c7825cd9085a102961308096a7e0818094775d817e814a07c7ca308d", "openInterestReserveFactorLong": "0x2e9ba8c354794ee137efeca795cbe0582624d0d356a60d7609aacd8e2a945cfe", @@ -663,13 +672,16 @@ "minCollateralFactorForLiquidation": "0x44c72c9b6faaa5a6a01ee3029c34a5998526cf5d06621babe61728a74452cc9c", "minCollateralFactorForOpenInterestLong": "0x534530389b87caf5d983a7e0e861fa8081b2a7a13384cf923705a64a186c5230", "minCollateralFactorForOpenInterestShort": "0xe5b9a75cc9c16a9e118200b3e6bd4b4a4a3849781b494af86fd3b61368f3a9ef", - "positionImpactExponentFactor": "0x2f3fcc42ff0aebd5654ab91b39ee87bf3782130d659ee6dcb17bfd46609a202b", + "positionImpactExponentFactorPositive": "0x558e8c26a30d2d584eb5c9f5685703bb36ef313ca2ade37c82350c3f472a53e8", + "positionImpactExponentFactorNegative": "0x21be4f2a52424c7e0c294f47bc3f6326981804c031989ebba8fa38128d6e2369", "swapFeeFactorForBalanceWasImproved": "0x76240fbd6e985d59376b17429e35328adb92d235eaed290e881d2905f4fee93c", "swapFeeFactorForBalanceWasNotImproved": "0x98d812495968f772c1430ad5bda82be56209a512f5038e644d21baa4649258b7", "atomicSwapFeeFactor": "0x5f7d86e6dc36460d2f9ad7dd34579a510203f38e3b7fad173fd2e07d1a930cfc", "swapImpactFactorPositive": "0x322d07f82afd4f2749d56278757d206f52add338aa5bc9359b259a5ddef4e514", "swapImpactFactorNegative": "0xe765a130a8cb9790e3c622efbb5422a8fd76ba0ed4a41840a89b667104954b19", "swapImpactExponentFactor": "0x4f3835c05f851e1cdbc009ca97f15327ab116a04ddef47c133d035ef3f3fc8fd", + "withdrawalFeeFactorBalanceWasImproved": "0x6482919517cbefc354730f235ac3fb3c9e604810ff185b3145b597f5208ef624", + "withdrawalFeeFactorBalanceWasNotImproved": "0xe4f9703e28c90a7e55c15558151452c6165ea2b30a43c4564ef5849f888a0478", "virtualMarketId": "0xa0146dca4369d92ee7d0993f033b43f1e64a08340ed10878c24f2be4dab96b54", "virtualLongTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960", "virtualShortTokenId": "0x982754fe7fcef5cc4e54f2c0fa354975d1fac185e1b78a6ce1b38c9b7c9d8cbb" @@ -680,8 +692,6 @@ "maxShortPoolAmount": "0x0b4d5a27f35b6f184c50a9215b16c15c8d2c83c850835d1c8bc8cd1f80c16d15", "maxLongPoolUsdForDeposit": "0xa869348d8cb49599fbe5d249b7cc3ae0e4a1b6a3faef22610a435a332c09c4c6", "maxShortPoolUsdForDeposit": "0xadf6ef5018dfa50c5a97a1b73996db0f87bd471c8a972e2422cad95d0df76790", - "longPoolAmountAdjustment": "0x8cab141db1e9a38e7e20758c0c082003b5b154bc9f589d7813d4b02f33902e0d", - "shortPoolAmountAdjustment": "0x9c7c6f94f767818f7f89877d5907835f0d7b4ec27c9ebdb8a0e259a9a2e93f25", "reserveFactorLong": "0x7ae71b31d48a1a9def94cf61b69009b6fc60c6c809ca6ef90525f55a4f4c5c2b", "reserveFactorShort": "0x74e0a986629f91e67d4ad1eb01fb7b5b557166e51a12fac4f9402819fc317ac8", "openInterestReserveFactorLong": "0xfc096de78cb126ca2154591a6afb07f4c24e8f7697c564df2882438dbf6153dc", @@ -719,13 +729,16 @@ "minCollateralFactorForLiquidation": "0x04392113bc40d454de730f577ae537fe8a7a03c8699523dd377868df099dd735", "minCollateralFactorForOpenInterestLong": "0xce841b0d0a75f7f23b3068a8731d79d46ffd5224bf752b82c99278c615ce9610", "minCollateralFactorForOpenInterestShort": "0x095df3a0a35194c30b382a21aa95ff97440c497a9fa7308d9046a7c6a830a077", - "positionImpactExponentFactor": "0xa776cf8b6750764a7baceb04c49b3e8316f86ba63007da12ce39fac78ce94815", + "positionImpactExponentFactorPositive": "0x895577f6b249e6ffc9e776cc0527713a49de1f019e7fcbef0dcf855498be17fe", + "positionImpactExponentFactorNegative": "0x21255d618f0dd72b4adebe8598c1a186b331333a738d76198751e77714a84d30", "swapFeeFactorForBalanceWasImproved": "0xa5c03fcca15132bd6eaab72fcb0be1671560cbff2bb1216ba7a680423f852cc5", "swapFeeFactorForBalanceWasNotImproved": "0xad609e8a1ec4b62de757f26762513889a12b50c490a2c972b4cffdab526ce5b1", "atomicSwapFeeFactor": "0x21912c9b2d2663de7ed5f3dba461a5b257e5c2aec9f3f7d0ee25da86d40ef075", "swapImpactFactorPositive": "0x40780b4dfe67cb9032a30a9ae910a8e63c568c0bfcfbac6962149a0480760e02", "swapImpactFactorNegative": "0x981313e20ad119ffd4e7297d65ac074bda816af74f76dc5ebef3a288ea0420c6", "swapImpactExponentFactor": "0x3a49bd6e93391cdc99dfea5cfd912c9e3cb54ae1dcd9c56801924b4db11e9b9e", + "withdrawalFeeFactorBalanceWasImproved": "0x29bc514fec6d9e2cadc0e8a8d2ed5b33f63194faa89c6dde14cb202591d4a8c1", + "withdrawalFeeFactorBalanceWasNotImproved": "0xaacc8d0f72484363e6c0a9440bb44d6b40880e67ed14c9c570b412d0ba224fa4", "virtualMarketId": "0x15704d8d313a8a9b84f0554bc4b8b032736212ce269bc3222f3a50ef32a72ab4", "virtualLongTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960", "virtualShortTokenId": "0x1ce9cae7dec48a356431d92c03845f8929446aee01fbea8eb35c1407e345a5f2" @@ -736,8 +749,6 @@ "maxShortPoolAmount": "0x81cc635bcf88d5fc104ca8c585e79ccf35330862b1542bc7c056bc4fc36b3bc3", "maxLongPoolUsdForDeposit": "0x7e6b7df1d22f053ca257972542037730222d4922d33fac138327c470da617178", "maxShortPoolUsdForDeposit": "0x4fc4be02822546883970c09b35f4f95de56de5c7481e8a758a972e8f4d932f47", - "longPoolAmountAdjustment": "0x7d5c45033a0311271128e11f143ad8c5ed8302b90a0af7bcf75a7523a3c64517", - "shortPoolAmountAdjustment": "0xa367d030454373bd0efef06e71602ed44b939beefef351dcdbfe1d95adc36878", "reserveFactorLong": "0xd8bb63239f8b899bcff044bb63ba286070ff4366e12cf336a4dc0f85f0908796", "reserveFactorShort": "0x5327107d7e1a1b8b1c16868e3a6eb257fa499f6c88ff038bb20b73c22ebf4351", "openInterestReserveFactorLong": "0x90e6e19f6295a0183ce68a8823e2ae5aa1d8e609d80b8585ccd3f578283ec08d", @@ -775,13 +786,16 @@ "minCollateralFactorForLiquidation": "0xdfc2ee462858568defefb730ffe6b557448fd43946f479e841fb1d8a07246f89", "minCollateralFactorForOpenInterestLong": "0x2236f68da88942f622d2e117770f8f2147a2e26a5ae248e7facaed024241fff9", "minCollateralFactorForOpenInterestShort": "0x97b31e77e2349e5ca9393f9b039ae4c6e08b561674013325694aee511fa70f4d", - "positionImpactExponentFactor": "0xd29cc14774ff37425210a4b4982d64598d960517246358ca6ae31e8278b88171", + "positionImpactExponentFactorPositive": "0xa7e83c402eabdff13eb40d60f699d9dd39cb133cbf5fb9360f45de4442044259", + "positionImpactExponentFactorNegative": "0x68629e021856beba322b6e997c26fb36db9fde23e3044d633a2126d441b8f9f9", "swapFeeFactorForBalanceWasImproved": "0x2453b281ca272f6b3c4aabcc06da5f61a03fde91143ecbb636906d8760751038", "swapFeeFactorForBalanceWasNotImproved": "0x43fdf293b2369b23c689953b361e57206f130569d07cdec5b02a91f7db302988", "atomicSwapFeeFactor": "0x7dfd70277f86278a779644d88083c0680c47bb02f02bdc9161268e2c24f8d092", "swapImpactFactorPositive": "0x6e872e48337e83b9b0974c98123f42c6c42133a809dda28947e45044fef0d763", "swapImpactFactorNegative": "0x7f74925d83c9749b52d3c463b52f75f56d3df222aa8091d320be024fcc136ab5", "swapImpactExponentFactor": "0x93ac087aef99ee1d1d4337027e16e9f34e2b3e95b449f6e1afd4969af2b95d99", + "withdrawalFeeFactorBalanceWasImproved": "0xfe7c8fd2b8bcd6c14d0d670892d73d07a41d7fc1819630eb6551c312f836fa00", + "withdrawalFeeFactorBalanceWasNotImproved": "0xd6bd23e9bb76fbb983534f115d3ddf9b3962098be4f03f6ec3c12dee44b90de8", "virtualMarketId": "0x20bf0a582d4508bc430f8d7e00de90061aeb901a0c0e11076d70511678cac8ce", "virtualLongTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960", "virtualShortTokenId": "0x31d656b47c3d16978767c8760419f35660ce6b3f01fa1add1aef6fd361fda2b0" @@ -792,8 +806,6 @@ "maxShortPoolAmount": "0x4e804829b61b4a8ef75dd498c47d231e56160c494bd8d40515bb413fc777d5e7", "maxLongPoolUsdForDeposit": "0xe179c8aa812fe724113753f8e7735894da602e37c8109bbf67782398a574db97", "maxShortPoolUsdForDeposit": "0x6ab6233fab510097c6143eafade050e9166d20d72ab6614b4ba55ac5356fe94d", - "longPoolAmountAdjustment": "0xda25a1e17e62d1bddbb481cd18a5ae16ddde5acbb8fd8c8c96b2dc53803b5c67", - "shortPoolAmountAdjustment": "0xb6e34e87a1f8e633fae5fa3626c547f51f24494b8e5ee6c2161dee19d7e68b84", "reserveFactorLong": "0xfc1101b1047085db2d628cfc59d344549f7fe0be0c815b1f45523922e030343f", "reserveFactorShort": "0xc3b41b507b5f324ac2e4d8b2e5639a5416648a0ec00ea0c3e0c07e0d8cb96c81", "openInterestReserveFactorLong": "0x2158e1bc5d3d391e0818960999eee66c0fd7b00d133fa26808996ec248b5eca6", @@ -831,13 +843,16 @@ "minCollateralFactorForLiquidation": "0x72e936023ba9fcbaf12a7120e82d41da53972b921ffd5dd1ad50ac1ae93bb900", "minCollateralFactorForOpenInterestLong": "0xc91baace01ed132d5a1f539fb6ddacfa913f012c6d706993f1f9d21e28646417", "minCollateralFactorForOpenInterestShort": "0x42ab637ba5ede5ce450b490c92fd5308a4b63d814d521886092107e000564243", - "positionImpactExponentFactor": "0xfbaadfdbb5b204e122e8a78505941f01262e57d5b600482db442a452bdf0c5e4", + "positionImpactExponentFactorPositive": "0x2f51c51e7f95d96ae1bd1fcfe00d7b922b787b0e96100a17bb87c08639b116dd", + "positionImpactExponentFactorNegative": "0x24538eaff69e4742b77e5431cfa21c9ad4a684a049baa36b18c2f065d56a41db", "swapFeeFactorForBalanceWasImproved": "0x13c0be771ab61c6f159c7b5afdf946b2e46e53aafb8881484d71a028dd441160", "swapFeeFactorForBalanceWasNotImproved": "0x7b665b4b365ff791322993f71e61afeba792f6ccb7a2f5f2163825643637c897", "atomicSwapFeeFactor": "0x1509233a29eaeb1b61f20040be4dd415f027c0b543b6222075a8c10f6a3546c1", "swapImpactFactorPositive": "0x6d7c56088daa2bea15028f86d6f54e24a63768356083dce669015965c9f5b873", "swapImpactFactorNegative": "0x3b2c183b4353852490404ae6be59826b51e24517576e18db1483a6c593a1a99a", "swapImpactExponentFactor": "0xde8e209ca4616ee04606284a891e35dc078488672e5a98b257aaef147e46b5cd", + "withdrawalFeeFactorBalanceWasImproved": "0xe7fa933e782c58112eaf5652ac761d7f97d07de2d1fb6568fddb8ff4b9b557ee", + "withdrawalFeeFactorBalanceWasNotImproved": "0xcf0c9e5132f29d02f67f3b300cfd2056b35a6ec62aef67fd72378db20c07823b", "virtualMarketId": "0x33ce55e7dda117ba6480d3120f3d7403d8db763bd7606ca8695846851288c789", "virtualLongTokenId": "0xaab37f889b9680dda34f58a689de3023cb22f7ae14d32a3c1d45798a973db1f5", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -848,8 +863,6 @@ "maxShortPoolAmount": "0x0625bc3dd53555a03320174e5be6f468deca9f67c95db201f2d8bd48814b8373", "maxLongPoolUsdForDeposit": "0x30cad517470e6f44fb271fd7ac7050169248e1cb3e02d6b7e2629ff3ef94a2f2", "maxShortPoolUsdForDeposit": "0x90476494490e62a97d255ead9bc174ee42b889f4a716654b2ce17a5387ddb26b", - "longPoolAmountAdjustment": "0x023cfe385001f6f535f804f5c8c4364cc2d2d861dde939d437e5f94d6ada607d", - "shortPoolAmountAdjustment": "0x76b438e5baa05bf7d9fb43ec067baa90d1a5530254e79a731f997d913760c48c", "reserveFactorLong": "0xee12daa6322646c6ad0f613f13fbb115e7147e646365fcf22638c311b3baa657", "reserveFactorShort": "0x7e6c586a5e265f204036389179d4d4987cbb2a7edafe47868d12dc426a84e2aa", "openInterestReserveFactorLong": "0x56cd4bd3e0a7a42cfd55e27a9183d595660ccff7f5702723b69561212ef17b18", @@ -887,13 +900,16 @@ "minCollateralFactorForLiquidation": "0x045488831e4d7b120737807287cdd91326b56a531a357dfc178b1e621a073fda", "minCollateralFactorForOpenInterestLong": "0x95ed56a404dad3b4f299ec1ce25cef2de1a828458f02787a404fff019baaafa4", "minCollateralFactorForOpenInterestShort": "0x8f5bb4ea781f12eefd8cc65f9cbe17af85a9e315fef4cc50fe63e7471af42531", - "positionImpactExponentFactor": "0x2ad9516b4cf9062372bbb664ccbba50dff378bedfb8e9defbdc4eadab8306d1d", + "positionImpactExponentFactorPositive": "0x94fdaad95e7224550a3bd78eeeeac17f66252a43b90a573597e0ad0337e864b3", + "positionImpactExponentFactorNegative": "0x0c5bb821c3d48e2980b2876b5e33b187209a14206d3a6fd379d2b42822db6983", "swapFeeFactorForBalanceWasImproved": "0xcd711380dcd676e0544ad089e8c882686c308f656fa651d48a0747b7f70fd564", "swapFeeFactorForBalanceWasNotImproved": "0xfeadc380b20cab88593bd96433d4b0ee08368051055dfcfbfcc594a02a98cf08", "atomicSwapFeeFactor": "0xe7e08dc2e46bdec6bdb17e9860d93dbd8ec4c73bfc46e0fd78170aa3c5bd33de", "swapImpactFactorPositive": "0x737c7f824ed4b98d1e563da86dd27bc6555ef0c5e3a7735a9d2efad4b87dddc1", "swapImpactFactorNegative": "0x71533255ae7a74548b062c095bfbf28d36199e44d3481ed295bc9075f5137ef7", "swapImpactExponentFactor": "0x1a4ce691b5691f71e7bee1bc45b36e300e1549a3ee40a24945c65d0146428e30", + "withdrawalFeeFactorBalanceWasImproved": "0x8c668cbc4cb618e79cb8f4b58382e4cc1cd044d430fc12be544975e5890cbbe7", + "withdrawalFeeFactorBalanceWasNotImproved": "0x08aa1667748458cc1c70180e0b757640c7259dc707684575847e0e97724b8d17", "virtualMarketId": "0x3eb5746eac364208e2f9195e45b599e3646c837956a8a41ffbaa1c75bb8ecdfc", "virtualLongTokenId": "0xd923fa1e30d3730f7ae064ccdc6dfa814534f0e8a5cbe1eb5f035a80ddaa2843", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -904,8 +920,6 @@ "maxShortPoolAmount": "0xf1bd2e9819a756bf388aa0508c8a28c93d8d07ae738f1b752c7d02c25e04a973", "maxLongPoolUsdForDeposit": "0xd36217e92178e4fee13ff1d3a3a2b7af92b48adea8448e8491ad78fae6e45f58", "maxShortPoolUsdForDeposit": "0x2cb3bf88d0102c24b25375930a7a1dfc4eb0162880c7478aa8d77f854ec369e2", - "longPoolAmountAdjustment": "0xe32de65889fed6ae7dd25a65e96276abb215ff2a287b4adcc0dcc2eddc9eebae", - "shortPoolAmountAdjustment": "0xf02c09739d49303805d645434dd3e4c5a6d2f70587ff7a53c7b0d36747b56a5c", "reserveFactorLong": "0x5fa5fb4a664608c4fcc52f5db846d70c0f1b327816ca3b1da3789dae20cd7d06", "reserveFactorShort": "0x77cf584ea7d32edc66fe17b14cee220885107de50d12af6f7718d47aa64ad321", "openInterestReserveFactorLong": "0x7dc5ed8947657008db74db38a50bf5decc638e75627a758dd00c215a4c057594", @@ -943,13 +957,16 @@ "minCollateralFactorForLiquidation": "0xd0362b4c48dedbb4f87db87c773b0f4329525d6197ab8617c15dd6e4668d3264", "minCollateralFactorForOpenInterestLong": "0x6d844c42863e83e23fa960ab45a1a5696e1be08fa1e4e772366172c0ac93229f", "minCollateralFactorForOpenInterestShort": "0x47f7b3459fe7e68075e8c6444215e21468de24ee4f0fdb3ddc04af016f6755b4", - "positionImpactExponentFactor": "0x6193f8d462c3326bc8cb666374837667c596f93cd996cffbd81668a636843061", + "positionImpactExponentFactorPositive": "0x0bae5d2292ac4bab9ce44e9a534190279ea43c78798460c43ce1cd661031915b", + "positionImpactExponentFactorNegative": "0x8210339d847383c626da6e4ba60be231946e7e9e08f54a40edfa167a21d08fd6", "swapFeeFactorForBalanceWasImproved": "0x2fc46450b98092e9b66e0bf7696ce02d4c833be88de497cfb915d3f39e3812ec", "swapFeeFactorForBalanceWasNotImproved": "0xb37a74e4f029bbab4db5c9a9bf086565143dc8e25ac8cd13909d079fb770d4c6", "atomicSwapFeeFactor": "0xfdf1e814ffbae35f4df6a90a4d167e0a998a23174ca373a153e356504f28e7ae", "swapImpactFactorPositive": "0x027553df27e8e9b5a65bebc5f963f76e85ff58fb8d9c1ae933ca099379ca4b60", "swapImpactFactorNegative": "0xb75f6793ffd5ebc77458bcfe941d32c2939bfde678876cb5795ef174242a34fd", "swapImpactExponentFactor": "0x3db9029b93780175fc0b831246129f3a2dd55c2f32d7f03ec0802bcd1e83a748", + "withdrawalFeeFactorBalanceWasImproved": "0x353d661a20fb7ed1ebd88ec325c0ea9cc591b2f9cb19fb989dbdf475a4e2e425", + "withdrawalFeeFactorBalanceWasNotImproved": "0xde7630b118b42fb72d9f5976e550848d14002f0917e30327b5e2b146dc9f1cc3", "virtualMarketId": "0x682b13e4eb57bc482b33cd2f48a9c3fb262fb4e645cab8fc718a866f7ca7b83b", "virtualLongTokenId": "0xe72465f260a5f100354daa20326f641873d2ee6b58b8697cc900105b58981005", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -960,8 +977,6 @@ "maxShortPoolAmount": "0xc2a2520a542fe97f34a8ba34761ece112d54b5db49bb72a95bcaac6458b37eee", "maxLongPoolUsdForDeposit": "0xeb0b25ff20dcb6801b23043589e08010abbc85aa8ca517067189f2569ae22da6", "maxShortPoolUsdForDeposit": "0xbb56a9f5e5053d96ecb98e2a6507f2f74c000f96604ca9f37326d8536a37190c", - "longPoolAmountAdjustment": "0xd535d0416d824c2dcc75fc4cc6b705dc005edf148655cd9b8ec8585aeb1c0854", - "shortPoolAmountAdjustment": "0x016c2dceeceab1f9efc9a0bc5c55cf2b03a64037ad77b48a338ca9f77f6baf4f", "reserveFactorLong": "0x4959cae4852bbe7bd7098d8d537cedab036f12956dcf55cff8f76909d2200957", "reserveFactorShort": "0x0a318dc81f7f1795d47da970a606c903326ce7087b7d836132a5fbbeadc57418", "openInterestReserveFactorLong": "0xfdae1f05d9d02268df647c589fdd9aea9bfd69872a9891cd4f3b48a153386d53", @@ -999,13 +1014,16 @@ "minCollateralFactorForLiquidation": "0x71ff8d76e7fc434950cad2cccf97e7b7ba4f414cbf807094440bd8599e6a61d6", "minCollateralFactorForOpenInterestLong": "0x2a50bf17c53f122cad04b207535a3c74b062687e8c8f8657ea2f927b501c1062", "minCollateralFactorForOpenInterestShort": "0xff365ea9e77f3aff0dea18e392461b9ca0e3b42051708fa32969f77d5ca76b87", - "positionImpactExponentFactor": "0xd0d2c3fbe177c70b48f1f2866e4a15ccedeae13f3e7c96726a6e367325a045dd", + "positionImpactExponentFactorPositive": "0x6224422fb6e034d7827b7a700d27b1183b767e212fef495bf70abcfdf0695121", + "positionImpactExponentFactorNegative": "0x25867b75f614416c854f87b2f4c718aeff4bf9c64fab1ba1ca9d178f0006205c", "swapFeeFactorForBalanceWasImproved": "0xf9e19bb3189d432360663917ab7316f9eb15e32ca0fc81158e76cdcd51084b52", "swapFeeFactorForBalanceWasNotImproved": "0xe5f10a8eee33843ebf12cef81e4141d649bfb8c2584c80c0fc1e71d1e32d0d0e", "atomicSwapFeeFactor": "0x6f191cb60f240eb255b18e35b30e69a2555b7cd004db58df4413f6ce73989ac1", "swapImpactFactorPositive": "0x51f43de19f522a77191e09d4d845cabc4a6b411ed843bd7333c97c0dd2a1e99d", "swapImpactFactorNegative": "0xdb943b0a66e6c7d34998c8e3ff6ce90d1f79df2b550aac083000d80ca80b1277", "swapImpactExponentFactor": "0xb4650d732840a970384403281dae1ab9569caa614bb95e82e845e5dbdec3f3ae", + "withdrawalFeeFactorBalanceWasImproved": "0x5f24a5ca2c66ceb9a02fd188af35712bd76620b5a0cc2f40555437fd5dd70b26", + "withdrawalFeeFactorBalanceWasNotImproved": "0xe7e2003da6e587c83414bd1f7de1890a2fd7d37b1f71c8d2f7c15f5008040552", "virtualMarketId": "0x682be80fbd5b14f1b05cbea1a5e3eef02bf3a52c7e8f908903d6eecf1e1fb093", "virtualLongTokenId": "0xaab37f889b9680dda34f58a689de3023cb22f7ae14d32a3c1d45798a973db1f5", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -1016,8 +1034,6 @@ "maxShortPoolAmount": "0x624b26cd3400ca82e218997da9deb37a448529d324d656b68323a0e424da479c", "maxLongPoolUsdForDeposit": "0x6d109b65036ff66f517f9dfa757532b95fbcd02537c4594275450f6aa86d1e2b", "maxShortPoolUsdForDeposit": "0xfdc403c04d446af9e5bdc81dc5396dd557b75575ab1414c7103fce0c3423ab5c", - "longPoolAmountAdjustment": "0xd3dc79af22d17188c7000d4b955bdd47c3f0842765c98dc4f0967135c08ef9e9", - "shortPoolAmountAdjustment": "0x1ba76d3b2bbdf19d17c0323f31ec835f4fc62547c764f8ada71b925b4d8ac823", "reserveFactorLong": "0x3d4877d86175f53799446bb2b013b6aa134e5859247ee3408c0daf972c085db5", "reserveFactorShort": "0x2a522e9d2efcfdca342e80206ec9f2142da2480000caa9d81a292ce75166fe70", "openInterestReserveFactorLong": "0xe6d0736ea27358e0c989141cc0613863ec26b60db37d0eedf1d287d080500881", @@ -1055,13 +1071,16 @@ "minCollateralFactorForLiquidation": "0x5cbd1eda2c597db32bc6c3e5e9098bc9dbf2442d0956252f63722275452b0da7", "minCollateralFactorForOpenInterestLong": "0x9a7f1df75521d5245272629ae3d633c5b1df32b56dbfb7bcb79f6ed1783f3207", "minCollateralFactorForOpenInterestShort": "0xa3964e38e2bfad919081510f192eb40d3c12b8102f229d74230e94476af37ba5", - "positionImpactExponentFactor": "0xc59aff205787697cfac1654c750728376206127692ee4e7134bb41d79217bcb6", + "positionImpactExponentFactorPositive": "0xe93ecfb71fae4127d6f55b6500ec9b52b63e537e8dca270d8a42923eef9a9763", + "positionImpactExponentFactorNegative": "0x93b3b6d2ef1decaed59fe322b649671567bce4325e9c693ecca71994bd86d704", "swapFeeFactorForBalanceWasImproved": "0x3364c0f9fc9f8bb96a1008c317d26b51f20c5ea1d1130799e4662d8c4a7bf3b9", "swapFeeFactorForBalanceWasNotImproved": "0x305d6a42c6ccdab58c16ec512fc0b9394bf2dbdf82516c15d09cdcb76085e4b2", "atomicSwapFeeFactor": "0xa911e8a22efd7c8716579f5327ca2b5363b5957bee2a2ac32ebc7b04a009c024", "swapImpactFactorPositive": "0x6ca9dab5d892a8a0c799579aad85021f29ddde1c808da563752093e0ddf2d4c7", "swapImpactFactorNegative": "0x0a2d863399db84d689cfdc9148b1a486ad96583764fdf636a66862500cc51b96", "swapImpactExponentFactor": "0x081a97750956cc6250ce06858d4427b11c1f050d0dacb64792d92f18f66a8da9", + "withdrawalFeeFactorBalanceWasImproved": "0xa62337a6ed10e68f272b3731cfcd930971e1d2ce0cbefe071d0cb1df7a7af926", + "withdrawalFeeFactorBalanceWasNotImproved": "0x54ae298deef1d6f79d233062afc19661cd78a5da437116f6b6225d051a28dd7b", "virtualMarketId": "0x1b85db12d28f55ab49eac5c82867a61b99fbd1658d56cba37cc8538120c18520", "virtualLongTokenId": "0xaab37f889b9680dda34f58a689de3023cb22f7ae14d32a3c1d45798a973db1f5", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -1072,8 +1091,6 @@ "maxShortPoolAmount": "0xb13020fd6d863e44055fd2ab14e7532745ce473f1d8152bfdfb0ae956c41dafa", "maxLongPoolUsdForDeposit": "0xdc3ead598f0d2baa900d0cae632c96696e1b8bd63b1e585d9a4e1b20c527f124", "maxShortPoolUsdForDeposit": "0xf626f650f71f86a1110dc06d2dd20c30b798056869ebd550493ad1e18195c616", - "longPoolAmountAdjustment": "0xd0f13bb49c3ce6f4aa3b14bb6f1f3cdd3569595d37a721bd1cbc8b105ffd3bed", - "shortPoolAmountAdjustment": "0xb7105c2b473d388b9564d4cf92ebf102e35475feb34e399190e15a8402eb9453", "reserveFactorLong": "0xe365962def257c0197c21509b0563974200c951567a224b2bee630dcc9390a01", "reserveFactorShort": "0x9c95664de36e3b90a62a3ed43ebd43c109fbd2dd31a911033df84cb51316499d", "openInterestReserveFactorLong": "0xb1929b4558965c059ea4c201b0958c7c5102481eb4803689a9055f9d56fc2b1b", @@ -1111,13 +1128,16 @@ "minCollateralFactorForLiquidation": "0x3f735896b5ad89fc720a25fd616b3c729789db640f8a0620238eefaf2fc2de7c", "minCollateralFactorForOpenInterestLong": "0x5b29bc756da04509ebef8e49358a85e1b080ee9d9b19f646413c7ec366643c4f", "minCollateralFactorForOpenInterestShort": "0xc386fa4fcdecdfd9ac1d63b2d86d391f4676ced1e3ddb89d47bbb629bfcbde6e", - "positionImpactExponentFactor": "0x2214e49931ae131c89d827b277789c69bccf736319f9448888c99ff753982a5f", + "positionImpactExponentFactorPositive": "0xa9ac4716eaf839b0b5841b19083eeda0ae4764fe588ddd13911d4c3680a0491f", + "positionImpactExponentFactorNegative": "0x661587c820cef2f8c0655748f7f8d506f5990ce7427314bf76148daff1840326", "swapFeeFactorForBalanceWasImproved": "0xcf099a51e285d31b3ded24bb284f311662deae9715dff06251f99a1a623a7c01", "swapFeeFactorForBalanceWasNotImproved": "0x54f7ac0acaf50fddc48a4d1687ef164394bd31f48441c86b9fea6d348f7d83c8", "atomicSwapFeeFactor": "0x16e598fd74c94ad3c757bdf8764ccf02388d376df4d70c59d9e7e5b05a8dc129", "swapImpactFactorPositive": "0x004df3c0dc3d5b0aef8045ddf6c7170646212a2708d9c8efd90d42aa68887f7c", "swapImpactFactorNegative": "0xddc46fbfef1ad897fbe83b4250c0e21dc33408f6035ed37f98b4349cac818569", "swapImpactExponentFactor": "0x923471186f28cf538007fd535bdbd75f7378d1331f6d07cd2a40276153e34550", + "withdrawalFeeFactorBalanceWasImproved": "0xd07341375bb8af16176ce9c5e7310790c9c01029b13edd0a9edb539d83f01436", + "withdrawalFeeFactorBalanceWasNotImproved": "0x702b93be52d36b39dcc8e27fc0a7b3dec7340240378034c7edf2010167f5bc88", "virtualMarketId": "0x4e2463fdc8eb0e623472d4e6fb67440aaf8b50db715ff81c918dcf0a9b4f6e02", "virtualLongTokenId": "0xda567314a5104c9d1832b3d80c0f411685db2478bc7f0a7d8c607bc4aff2bebd", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -1128,8 +1148,6 @@ "maxShortPoolAmount": "0x9e9ae241036832a5f184407c222b31ce65f7d0e7a4b3ad6d93fe139c23860f29", "maxLongPoolUsdForDeposit": "0x3b24e4ea1aec213c99c0805eae35b42e6a1dd86fc0f7e1efc5cf87705a663d29", "maxShortPoolUsdForDeposit": "0x376edf6873a9adbe218f792fb6aef0c132027c432d0ff76ccc3768f2c185680b", - "longPoolAmountAdjustment": "0x8402bd23f34524aee932454a15615f4d39ef171d9ec562717b3d685bcdd5363c", - "shortPoolAmountAdjustment": "0x22d2937d5327e4186b3ac8774aa62d0bcfdf407c4880ee9f3d94c7d45d5668b1", "reserveFactorLong": "0x7287a470dcffbc2c5bda4769185c34e3cc00aaa207ec5ec36e1a88d208768da9", "reserveFactorShort": "0xab263cfc97448c25c573cf73d610deec79616a03f09453de76d7ba5c4bc3e014", "openInterestReserveFactorLong": "0x38f702462a67b9ca1b107dd2f00691b13b5b5955b7fa9b67d12834f820f4d111", @@ -1167,13 +1185,16 @@ "minCollateralFactorForLiquidation": "0xa3555afc1b6acabe022942d56a72327d65daf86bf7eec60ebd84645c8793ad58", "minCollateralFactorForOpenInterestLong": "0xc711c4d6d1307e7c53adb1d3e70e48374818834facdddda9f3aa07ab3b84b6eb", "minCollateralFactorForOpenInterestShort": "0x43728b39e120b4a41ea9f74f87206a5de82c1fd6020b9c20e8a12becd690628a", - "positionImpactExponentFactor": "0x58ff383b5858a0568214aa46f74f6c6acda40c2de4e119a9fc703e6e9f883533", + "positionImpactExponentFactorPositive": "0xe6ebf323081695873fc1d81a0f644852d8ab527c6dfa28c3b32d3080f3a27b3d", + "positionImpactExponentFactorNegative": "0x211783c8e753ff879e96c974797b9a36b2f0b55dc9aaeece18f58dfe1c937cf3", "swapFeeFactorForBalanceWasImproved": "0xc88b708cf46980ee7b53f2d31c02cae3f4097451afe3d262d1ae325896e2fb2f", "swapFeeFactorForBalanceWasNotImproved": "0xae26f90162d5a9dd0c751088ef6e3d8ad0a4e4d4296c92959aecebe6eba55438", "atomicSwapFeeFactor": "0x5671a7614ebe14a1898c515d300b8190920c147b248e214499e630554e877391", "swapImpactFactorPositive": "0x9afe4fd264c1db9a7311ade7ccd92b9901cda321ff91dc4a544e60e9aefdd403", "swapImpactFactorNegative": "0x24b8ea4213ef6ea1381eef1d22c8be6e6a2776542043f94cd0b75451e722acc3", "swapImpactExponentFactor": "0x4436d7db87e33e8caf71800781dfda7be283203615038a5bc6bad07cdfa8ddeb", + "withdrawalFeeFactorBalanceWasImproved": "0x18dfef67f3106a2cfec3f9954416052069469a836bc3f23babe3494d1e3e116a", + "withdrawalFeeFactorBalanceWasNotImproved": "0xf952b60f38497c80452924b5c6e28f86c59cfe3803462aa96df2b9e0be703ac8", "virtualMarketId": "0xdcb08bed475a372d58c8d4a4106e2d728aba9f394a7edbbfc9af501300fa7578", "virtualLongTokenId": "0xa7a9f75b7dbea0c14f881634e911f467cea6ed6b8b309892a16f6bb88196f4ac", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -1184,8 +1205,6 @@ "maxShortPoolAmount": "0x84654f983352393a35235f362b8e4416978a11bf9f7e392453fe8d9094f878b9", "maxLongPoolUsdForDeposit": "0x3afcc1a93aafa417b7ef751cc7467d330c8c473359b617e2d77349fd4a8f7043", "maxShortPoolUsdForDeposit": "0x3afcc1a93aafa417b7ef751cc7467d330c8c473359b617e2d77349fd4a8f7043", - "longPoolAmountAdjustment": "0xf5eba6d704dd5bcb627dbb0dc30172dccbd254c52d089a71f66b2633d4ff248b", - "shortPoolAmountAdjustment": "0xf5eba6d704dd5bcb627dbb0dc30172dccbd254c52d089a71f66b2633d4ff248b", "reserveFactorLong": "0x4ff0c4325193101a3ecb3950dc5b118ed1a07a2455a54a2e2e35d73f679f226d", "reserveFactorShort": "0x6f311634950b830983054fac96de7c535351c97e9efdb5324e3365caed8db4e8", "openInterestReserveFactorLong": "0x0ccbbeb76e1a4f47e17937cdedffb4963a02f6379cafc9fc56d7ea9bad2cb952", @@ -1223,13 +1242,16 @@ "minCollateralFactorForLiquidation": "0xf2a71a4e761efd126653b700f3f521749f94b22a97852ad66374cdd674e545c9", "minCollateralFactorForOpenInterestLong": "0x7be7f22de8ae3c36d8218b44d06c5a126ea07b5bf1176ff4e90c34ccdae32302", "minCollateralFactorForOpenInterestShort": "0x49034ddfa16113a80d2c700f7fa75fee26f684beec367e2c7d7e4f3f08320bb8", - "positionImpactExponentFactor": "0xd0316ba8768fcb3880ea8519def956514eb9bc7d1cd1d9805bc936e379eb8610", + "positionImpactExponentFactorPositive": "0x72925e9a9d269f2fb8143b6dd0e73ae7f2952958b658c72d4a2a962fd68b62cc", + "positionImpactExponentFactorNegative": "0xd6bbe5a1aca9f35a1d4107f3382844d815c66385f7df58b1bd99ac4a4926039f", "swapFeeFactorForBalanceWasImproved": "0x3097eb783f61d26eb308b82a5f390ad8a3b17605c548f16f6c22a9e4a9d4fdfc", "swapFeeFactorForBalanceWasNotImproved": "0x8439bc00c0643f5214a648849ed64fad4e16c6fdaa17c415cec3232757a71e70", "atomicSwapFeeFactor": "0x5c32414b2d8daead8b548e58f19445b0a6fa9c0ab06c88a953caa92b0e0e09eb", "swapImpactFactorPositive": "0xcc58aaa5866cf4113e41fc4df9e5ee80b1d697ae5449bb1aada134f5eb228cbf", "swapImpactFactorNegative": "0x02fcf4c3f06217571778935d3f7e97c3e8d72c50baa6e937265d4b9d3cb65b37", "swapImpactExponentFactor": "0x68b31e362df2067ef9092172713fce629e43c8fb3ae7c604fda0e6ba18967a4f", + "withdrawalFeeFactorBalanceWasImproved": "0xd1bac7b2b7d3362d261881e7f1e0c9c853f73edceaedb6579662db8a257e350a", + "withdrawalFeeFactorBalanceWasNotImproved": "0x1280ba84bf0f688f6157d2e3b535f163e54bbfd87522bc7741125cd08fb89fb3", "virtualMarketId": "0xd8d68dd67fd4509abfc2afe7261228687df5a857867ce0a35bf860e27184d77a", "virtualLongTokenId": "0xa59040b7efb6b7122a74cb318a192ebc6732849dff5332ee3ba40b90dfa0a04f", "virtualShortTokenId": "0xa59040b7efb6b7122a74cb318a192ebc6732849dff5332ee3ba40b90dfa0a04f" @@ -1240,8 +1262,6 @@ "maxShortPoolAmount": "0xa6216f68f1ee28685382ab766fabd8398532ad41b358ec5ea8a3d38db6c7553d", "maxLongPoolUsdForDeposit": "0x3326be4089d11ec02c8c6f2effbfa5cdea20fbe474830f2ecbfc06d0f5cef695", "maxShortPoolUsdForDeposit": "0x3326be4089d11ec02c8c6f2effbfa5cdea20fbe474830f2ecbfc06d0f5cef695", - "longPoolAmountAdjustment": "0xf9c13e51dcbf38a3b33d6b2a683d44a9761232267923d9aae10b7993215b5f6a", - "shortPoolAmountAdjustment": "0xf9c13e51dcbf38a3b33d6b2a683d44a9761232267923d9aae10b7993215b5f6a", "reserveFactorLong": "0x02e5d3361e614a40d445ebdcb9ebd26d2c1e5b02afbfdbd970245343ed3f73fa", "reserveFactorShort": "0x7d4cdc5c53db8fa5d0f35fbded84d6d05231c22a5cffb76f6b7aab0635e7c536", "openInterestReserveFactorLong": "0xe3ddc2a7f56eda5e56cc8d3c17d6fd2e43eca0f8a295fbba518bf3fe21548ba8", @@ -1279,13 +1299,16 @@ "minCollateralFactorForLiquidation": "0x7c2459f97adc8e43337e81a934c826ed807ff31274e3f0092cc5677aa9ff20d2", "minCollateralFactorForOpenInterestLong": "0x35859412d8490a4c126fe4f1bfc34c55cb8fe37dfa500acd3c8b86af666c5ec3", "minCollateralFactorForOpenInterestShort": "0x9fbb1a4f2cee065baea2f8cc6c37830cef07cbbc7a5c433a7a525949f5ecebd1", - "positionImpactExponentFactor": "0xb6bff386e5ea9af0e6720bebfdd73d88abd8d3028c1819942bcee244f2ca9405", + "positionImpactExponentFactorPositive": "0x9f2395a2044d0da82372182c9cba8aaec2c15a02eca37e0fe1d39733f997448e", + "positionImpactExponentFactorNegative": "0x2a0314d214fa5cfdc1288bf00bca5f9fb26e8829cdb46c3371ed487a164f8ce3", "swapFeeFactorForBalanceWasImproved": "0xaaf64b979df9faef0f42c389d81152da8e9d914ed4fae4f41a31ef0f70334eb0", "swapFeeFactorForBalanceWasNotImproved": "0xbe982294c986c3affb4919d120c418c791a8602c614700dc2bb0ca07815e6ed0", "atomicSwapFeeFactor": "0xf53ef4c33158142d328bfc7c66ddd8ddda3b43d1f6a9ebcdf63a7e2a1d439ca1", "swapImpactFactorPositive": "0x9fd271446b4cb4dabfda536750bd6f93b58bfb591131e601bae3c640d9609b2a", "swapImpactFactorNegative": "0x4a7f2a5421a3eb1067a7e45de84e107fc455e79cfbf6236aa396f99272cfe4b0", "swapImpactExponentFactor": "0x4ddfcb88742329060e7fae862f0bd237355ac1d858fc4be4928caa94ceef9abd", + "withdrawalFeeFactorBalanceWasImproved": "0xe1ed463ff9479bf2480d30ae0557dcacf7dde80bcb7c5c4b5042ffc8c08f3a96", + "withdrawalFeeFactorBalanceWasNotImproved": "0xee887a52dd5fcbecdd243f640ad761807d0583904db9d999d017a15bba81d404", "virtualMarketId": "0x418e7c8fefa6d403a9778e123defd25ede196ce24b2de6d119798652b05a2d0c", "virtualLongTokenId": "0xaab37f889b9680dda34f58a689de3023cb22f7ae14d32a3c1d45798a973db1f5", "virtualShortTokenId": "0xaab37f889b9680dda34f58a689de3023cb22f7ae14d32a3c1d45798a973db1f5" @@ -1296,8 +1319,6 @@ "maxShortPoolAmount": "0x9e9c9481cf518b0abb0afe32270555724613f96935fad6d208959abaab7362f8", "maxLongPoolUsdForDeposit": "0x7163541d793ee6c014f266a3d320bafa0f22980981c6dd1c222dcba2e5e5a858", "maxShortPoolUsdForDeposit": "0x2cd620bf307a42ee0fcd880255508abbdebb5cf5d650f658e67c2bddac8b284c", - "longPoolAmountAdjustment": "0x2a3b1c06d0773b973002f56de5b5bacf2e3be323ebbb3b9d635008c727cf53d3", - "shortPoolAmountAdjustment": "0x9f16a6c4fa9967595c0c27896865c7204bb530970fa596d03685389612f5b510", "reserveFactorLong": "0xa919db502fd209965f823fc33320b58b98b538ad07d1f2c882521d10fcfb1330", "reserveFactorShort": "0x7ab3d81c87f79a924973d0db364d6ea3b139307056a0d61855f1054741d7616f", "openInterestReserveFactorLong": "0x73432956b0a36fa668a930273af2d971d936a58916b8049419cae3d7aa51e0b8", @@ -1335,13 +1356,16 @@ "minCollateralFactorForLiquidation": "0x5bfcbab875f4417b539e955ceac950cd006a69b7f451081607ba40e7fbb369dc", "minCollateralFactorForOpenInterestLong": "0xb53e1f7357d8985ac911799567e535ae47b4b735a3aa570d896d2675c5ebb6d9", "minCollateralFactorForOpenInterestShort": "0x24518edda98ceefe82f1204ce0f521627a009586216d80895e53abfe2ecf184a", - "positionImpactExponentFactor": "0xd0f2eee3c7933f4cd4be61e89645e29cc81fe2e6b8182b4622055eda40e77d48", + "positionImpactExponentFactorPositive": "0x3f2ed2e6d90046e80f4f01698835171d2ebb466086c2947ece83248ff34299d5", + "positionImpactExponentFactorNegative": "0x9705adab0ab902d945254f095b3333db70c8c36520b9002c33461403899e37a3", "swapFeeFactorForBalanceWasImproved": "0x95cc059a74ab0cc2d211ba23f2332e2b506142a89fddc54e2006bc3f35931464", "swapFeeFactorForBalanceWasNotImproved": "0x4771d81fc424f4ad1751f397a8bf3cccc268f477d6a35c745a0e9d1841e1027b", "atomicSwapFeeFactor": "0x121d44595c73c7cf96dbeb5db9d1e30a4f96ace8ca98fc55606bb043dab27176", "swapImpactFactorPositive": "0xb5f17a97f65ee498fdac7f1788550bbd6a729107081de95c3890c697fe931481", "swapImpactFactorNegative": "0xddcb4f9e4b88feb61b957dbc5dc0bd03435c471d8ab9c3c985699b0cad17ffc2", "swapImpactExponentFactor": "0x83899b2c9cd5391747c3988b8797dda3e5f3189c446c3f43746edd33e6e4bd1c", + "withdrawalFeeFactorBalanceWasImproved": "0xff25b89c3e7f3707c1aa5891453a8252ef8c002b2e8df584e1243dbe0ed73db0", + "withdrawalFeeFactorBalanceWasNotImproved": "0xb8d705498f3c744e0dbee5078400faec2c32a8f0570eb70f1b6efbbd240ea7cb", "virtualMarketId": "0x0f02984b3dea380f61ec0a6c8d7c60fb497a489eb055b2d95d8ef2826282fb45", "virtualLongTokenId": "0x383a0fdd5ebac620fe9349688ff6922600f2d5659c01c204e11f3181114b8700", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -1352,8 +1376,6 @@ "maxShortPoolAmount": "0x3d160932eb28ae21446ad1c8515556b1daa7235052f8f68b5623d411259911ec", "maxLongPoolUsdForDeposit": "0xa3778c6c0133d0e2be190772c78dc34e0bbabc486a1e09155be4f14e27ac13e5", "maxShortPoolUsdForDeposit": "0x4e600770e19cbc36cc0c9b1810745d875e229ee3c3512e3f0bd1ac460c6bfbc4", - "longPoolAmountAdjustment": "0x93b2ef5691e06ece3fc4a84a97d3f7f25a0eb2905fac34e3376a37c89075f1f6", - "shortPoolAmountAdjustment": "0xef8a3cab8bfc23c73eb979dd9a95212376f0defb55d7eb0107f824091f223148", "reserveFactorLong": "0xa67c17f5ad9f9c3a670e6ca824fd553e48a0a87ea1627b399e15d102d084e2ba", "reserveFactorShort": "0x1994481d5f277f989af8d002caa26a8ec31be4ccf63be579fe70db2c78b534fb", "openInterestReserveFactorLong": "0x17cf1d8fbb84f8e10546a951b3a2ce8d217d879959cfccb31305e435109868d9", @@ -1391,13 +1413,16 @@ "minCollateralFactorForLiquidation": "0x58a728580355a6c6f82d3091d369b941e0376ff8b3d79274d71ad1d29d0748e2", "minCollateralFactorForOpenInterestLong": "0x4279cffcd52e0915df8447175e708381712393531426166172e9a466f544ea6e", "minCollateralFactorForOpenInterestShort": "0xa7dd5e63b8b99bbd36c61b26e144889399099bdc86c904aa8dcf3d53670a8806", - "positionImpactExponentFactor": "0x3a2cd4a711e8cba8017733aa537e32ebfd2e5fa858bf0a773a3967ca2f7b30b0", + "positionImpactExponentFactorPositive": "0xc218908cf633fc208e8a57a389fc220e24474ef643572028aad6aad230752f02", + "positionImpactExponentFactorNegative": "0x79a98278e0578fadce4289305997c81b19552b55932d034bcb21d51e5fe16b92", "swapFeeFactorForBalanceWasImproved": "0x4965fc8a21524ad70b41143626dd638286b9b42ceaa02dbb9bc821f614cf9fdf", "swapFeeFactorForBalanceWasNotImproved": "0xf890051400774cc25b9f4e404ba50d42ebd497e3b1c8b9541fa1da94174e71c2", "atomicSwapFeeFactor": "0xcfb92ad1dd016d2ee0067cd81c7dc4c64f292f95f56158b5ab39d25a80821d77", "swapImpactFactorPositive": "0xa6399402207293d84fc48222f3238feae062d86e26e725edaca06fab54bf2e4b", "swapImpactFactorNegative": "0x8c3bbbb69bd132cae186a17c0f17fec773e3b7d2ef52c639a31ce3ecc4bba196", "swapImpactExponentFactor": "0x9a72811ae0698e31c2231403ff4e3263f7a83255c3ebd61ff1a9e6c90a5014fc", + "withdrawalFeeFactorBalanceWasImproved": "0xa5db5743922daf9145931ceda81b02a9bb341ba6aaeea162c64f16951092336e", + "withdrawalFeeFactorBalanceWasNotImproved": "0xa2dd806859f68fbf6780897da66590ff02a574db63af43c8de0b51642add1ec7", "virtualMarketId": "0xc0d8524413137e633578123c56536277851f30fa476e320824d3841d54e8331f", "virtualLongTokenId": "0x94039423f90376014849cce954f0d034b4adc74ce9d0f4142524fd668580cdd3", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -1408,8 +1433,6 @@ "maxShortPoolAmount": "0x67d641d32e1eb1dfc49886ff8259989b5bf70e5dfd2b53c7b6e87a80fec525f0", "maxLongPoolUsdForDeposit": "0x297322829eaf1f798c0926208744c90c2c5684664457deedb2178d80b26310f3", "maxShortPoolUsdForDeposit": "0xca2451fe7f61f020d4d53f55c5c84178ffbae6d918bfba03fb6c50ed5cc54527", - "longPoolAmountAdjustment": "0x934cbe2b03cd2a8197cd2d3d9a47c79c3e3d22839a2f20e8a7372756446f7802", - "shortPoolAmountAdjustment": "0x0a4ce0fe2a8a8ebecfc6401e12a5185cd0d721505a10c0d126569d5b3e27d15f", "reserveFactorLong": "0x924eb0ec3f72c21cd5eb5c7311bd82f0f795be5cee2c1440f73192353f39f6cb", "reserveFactorShort": "0x895b9293d82672cb457c407fee8c753900dfff1de6987e00a0798eae9e253890", "openInterestReserveFactorLong": "0x8a0c3f5a0b7e9e23e72b960138a9d0b69c8fe644d76cdc8c604c669660399658", @@ -1447,13 +1470,16 @@ "minCollateralFactorForLiquidation": "0x59c09f1291f52daa4c169c57c3226ef99241adaf315a955970e8f7c25f3735a2", "minCollateralFactorForOpenInterestLong": "0xf62a2cd524471634da150460345daeb42bcc47fc9a8b5ea5b1a581013edfef77", "minCollateralFactorForOpenInterestShort": "0xd9b39ffa382462e2b24dd0ebd1c3baec3d78c5ade8d4cbee813c5b8a51baeb20", - "positionImpactExponentFactor": "0xa2af6371bc1aeebd6802ac29ccd755b5ab13703022b5b772111b4e555273e745", + "positionImpactExponentFactorPositive": "0xb1f81411cd148dead9163e3060f9171151bb7c786dc43ce9ee96afed0c511e75", + "positionImpactExponentFactorNegative": "0x17d0358b021539d7cebc77cbf4dfaeb3cc0e2b5aaca84d15d37bb2a5e9f5841e", "swapFeeFactorForBalanceWasImproved": "0xa08dd6fcd6029bc48ce2addf2868af78d216638205a73838668634ca2a4981b7", "swapFeeFactorForBalanceWasNotImproved": "0xc9bbb4bcd2036e8e18f3fd37c85140389749faa6bb95005ded218d00ab217029", "atomicSwapFeeFactor": "0xf8346cdca37cb62bdba7aa727ef4a442631ad1e0b5043132b92388fddf5aec81", "swapImpactFactorPositive": "0x9f5c1ba768149251f1ac9bbe83db59ca66c5bc1dac404af7fe71e644dfe9cbb7", "swapImpactFactorNegative": "0xded0c3d499ee81a6f139dbbbafd11a57b4b0d741c4deed0eb81b462952739816", "swapImpactExponentFactor": "0xcb33824480bc1af4edb3a02742e93fc84d154d007addbabbf9515e6b900085c3", + "withdrawalFeeFactorBalanceWasImproved": "0x3f4e0f7751af29236a9afb45c2d7dff1b2c13dffc3f001a70fd16dd16aa16a15", + "withdrawalFeeFactorBalanceWasNotImproved": "0x5a281bcff7a6bb22c450a3b68a074eaf2f59d0441e60788aea8e8b221f4228e5", "virtualMarketId": "0xa1f23522ffd6ecb1fbfee47dc3174341b74a30afb70d283e382b19fe9da9e5eb", "virtualLongTokenId": "0xddc8f44ea682520585381041be40a0e629e6ad51d6ed26e690d316dc2c55e957", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -1464,8 +1490,6 @@ "maxShortPoolAmount": "0xceb14f2ac022eed1874d3aadad7ed13eeb5ea4f2a34d5a2b2cf43153ad0a0bd6", "maxLongPoolUsdForDeposit": "0x1c2f2588f73d49540a57d30a63636bdde044bef6519dab60c5da95dee1ba3799", "maxShortPoolUsdForDeposit": "0xb7a8d66a3e3dacb53d43640fb4e4d60e7242d4a714908de9542fba7b939ddaf9", - "longPoolAmountAdjustment": "0x7e4b883b3033627780ceae6cd9d485a7e9e2675f4fe2b68a2b370a19e68f9ada", - "shortPoolAmountAdjustment": "0xb9e1ea6544cff347f113032a75f716e5fab58a3376bdc3d97e9ae52702695354", "reserveFactorLong": "0x74dcfb1ec201febc51a93944380bc289cc6f62f06329839f8cb5885ec20f2000", "reserveFactorShort": "0xc015788b418e8385d5e0fb37693a1c876761531efc4f223e8c75b7633f326324", "openInterestReserveFactorLong": "0x29e053a0c90001e3c9ebf771bef8336cfdb3ef59b2b799ce582d3d964d94a462", @@ -1503,13 +1527,16 @@ "minCollateralFactorForLiquidation": "0x917066ba7cd6f4221b0632336d34aded85c1e557fa3093cc7014cb86885d30fc", "minCollateralFactorForOpenInterestLong": "0xd0b617f09379ad18f7bc551443b94d4b5c55e0023fb79c7165eec37289860743", "minCollateralFactorForOpenInterestShort": "0x45b9bea14109e02351108100e302342f22e4658eb48584be5fe6b4d585dfe27d", - "positionImpactExponentFactor": "0x751f7109c025778b3f40dbc637af12a93d5a0c622c49f4115dc80f784b299eb7", + "positionImpactExponentFactorPositive": "0xa760f8ce9248e2c5c7ef57e823a4f048cc6d9484a04b34e07e9fe3e1f1b77365", + "positionImpactExponentFactorNegative": "0x61e188046187ae8643a45a12a9de6bd16af0e373fa5ac975529c34ff1148afaf", "swapFeeFactorForBalanceWasImproved": "0x83492ab5df99806cdbd8314795b516b6a9782b0942161be4f1af9bca88951ac1", "swapFeeFactorForBalanceWasNotImproved": "0x63766eeca2ae5b09a2e0eb72120df5dbe6a8875527d67cd7b45ef9aba940e951", "atomicSwapFeeFactor": "0x8e88387d1a012a6f06628e8788e16bad6616eb06ba1404096c0c11a9bccea974", "swapImpactFactorPositive": "0x5a6f6f80c4a3e8d65986a384398e538c8faf9088f78210ea7b4f0f390633a51d", "swapImpactFactorNegative": "0x8f02874c8602664244cb90ca2139b5ba51aa0d59bd1479b6b94603a7cce88086", "swapImpactExponentFactor": "0x8ed2859874287cb901256ffbfb84ae0f23e82f31893202aa1d67db64e2b63a63", + "withdrawalFeeFactorBalanceWasImproved": "0x13eebd764abe6c5b8d7c3d745914fea3891b4b913d4157d65b37e4be37d97ca3", + "withdrawalFeeFactorBalanceWasNotImproved": "0xf59ee975613ca4518e5d2db40d7a851702fd43d113b05095206930a80cdf310b", "virtualMarketId": "0x1d28b1001e8de41d554667802ab510f6b1b76aa6dffd943ed06a17c9bc0a9c97", "virtualLongTokenId": "0xd6866dd6a33ff4abb4d6c4e944499daacd97b3fe0599c1e0d9988a698a0acc8c", "virtualShortTokenId": "0xf131c85158814e22bf5ac40e4556e1134eda0141cfdf3a0d22cd0b81ea84107f" @@ -1520,8 +1547,6 @@ "maxShortPoolAmount": "0x28c45d36bcac82b721ceec0a9dccc06d8dd32f476b0dd0e24c153f828c7d944b", "maxLongPoolUsdForDeposit": "0x4fbf27d5a44910ed1579feee7db0177825d875dc7f57ed584c7f2fdbf0fbac4e", "maxShortPoolUsdForDeposit": "0x685ac339463b4bfffffe884b308a0501abec935e3bd11398923deb3550606305", - "longPoolAmountAdjustment": "0x69192ee4c24942e453a30cfd8c09ca162e830144728ffd54c33cc02b518951f4", - "shortPoolAmountAdjustment": "0x0f08a960d782cd94c0d4f9596e81bfe9bf9c94b243d9a571798897125e4e72d1", "reserveFactorLong": "0x02ff4a63b6e2283a4743cc7e0103715cea79ec1c839804850c09efef903b8d38", "reserveFactorShort": "0x9754cd390f91de5a1ba60bfed09f2e0cc722fdcc17e27a1bd86dd382b83a5187", "openInterestReserveFactorLong": "0x44c32e3441ef3a134403ecc036f9dd685dc7341dfc25d84e5920a104ec0f9bb7", @@ -1559,13 +1584,16 @@ "minCollateralFactorForLiquidation": "0x306a88af5ce2a5f6da2d23fa1fc4da931f660d33ff5b01adb996552ee7a1d8bf", "minCollateralFactorForOpenInterestLong": "0x974698c39aecd68284a0766fb070354eb0cc788557c000717eb1187a717a465e", "minCollateralFactorForOpenInterestShort": "0x2cbcfa8219414a67ac30cbf47e0c87e3f98fa566922e42b7109f5148feb792a0", - "positionImpactExponentFactor": "0x8799f37db27fe4c64571774da8d11bb61b5a5b914a054aa230e26e58f694148e", + "positionImpactExponentFactorPositive": "0xdab078c24b992935b1fd1c71bbf1abcf98dc8d69778f17f0200e1401900ef5c8", + "positionImpactExponentFactorNegative": "0xf04bd4ed8e74b3d3c7d48c84366dbdbd4364c754311ca7e76d8461f75e51b8d8", "swapFeeFactorForBalanceWasImproved": "0x6141d666bb9b2a68a9749663d3c3dab876615cb1c1c19cd40b04bc1c90e89109", "swapFeeFactorForBalanceWasNotImproved": "0x154777b0009efb8b45f129e93dd06b79d93a034e74db99ee4c7f53fd6bb1064c", "atomicSwapFeeFactor": "0x896ab2b294e8a2d39a9c6be1b2d256a79d7f6b414e42c5e79f5d364db730dc8b", "swapImpactFactorPositive": "0x461e2c7445b7c5765c40de6c216908f8dae1dd7515416d2b39d09c59c9410f9c", "swapImpactFactorNegative": "0x844b935996c3559c7315004f459033cb6b4daba806b740a81bd8e9bee4d5f47a", "swapImpactExponentFactor": "0x1cef00edb03ed714041d7451cc3bd97b04dc3b8f965505a3e78e9f1a5dea6179", + "withdrawalFeeFactorBalanceWasImproved": "0xa775a05fa2ac9bc4dca76a4345f4ff0ff6ddf9a4aafa573022ed5b56ff0a11f6", + "withdrawalFeeFactorBalanceWasNotImproved": "0xd4341a3d3f4b16d022836614b9fdd36a730e1aa42b0417a031da5a38679761e2", "virtualMarketId": "0x7de0ff9083c9fc4846e6cf984949de1b3d7986f334a415d69b151b365010bd14", "virtualLongTokenId": "0xd6866dd6a33ff4abb4d6c4e944499daacd97b3fe0599c1e0d9988a698a0acc8c", "virtualShortTokenId": "0xaab37f889b9680dda34f58a689de3023cb22f7ae14d32a3c1d45798a973db1f5" @@ -1576,8 +1604,6 @@ "maxShortPoolAmount": "0xe76711bc7deb3c00954ec048962a3f25e1f0e42be82df06054387f3263c80bd3", "maxLongPoolUsdForDeposit": "0xee5a73bc337f601dafe0e51690c5b1c110f82ff619981c22d5d297361772f205", "maxShortPoolUsdForDeposit": "0x16ad5b65e7ad854aac38ca484ff9e1c9569e0056f3f2af2d9a52cc68762aac9a", - "longPoolAmountAdjustment": "0x1654b373050b752cee11814ca4f9ae9d99e2c3b406320688f23dffbaaf55ad88", - "shortPoolAmountAdjustment": "0xdd5a51ca019880590d9ab4f021b618774e7a0b14684ce0708ba78f45c41dd465", "reserveFactorLong": "0xf551f9c0eb0963719599b81f2d71729ee3cb9a246fcd262381c867a082773b8f", "reserveFactorShort": "0xe4edaa88594ba2c29213b5919996375de2bdf20a7a007a049874e0e545e47183", "openInterestReserveFactorLong": "0x1e13c61ec092328aa6fa0a918ed70e3ee10f16762e38cb9e69b1176c9d0fd162", @@ -1615,13 +1641,16 @@ "minCollateralFactorForLiquidation": "0xf999a6e4677e32df80732fac308066abf0b941fa1b8de71fa6ca65c62766fe19", "minCollateralFactorForOpenInterestLong": "0x1a91d60f924b7371fe96dc19aec25c04a3c778b64b02909898c8ba552f8f8d74", "minCollateralFactorForOpenInterestShort": "0x64a53510be4bbae7a856bad32346bdf81c3f6d8895c5cdb6d9b4c3061c7113d3", - "positionImpactExponentFactor": "0x8ccbfcefe45e6333409c1703e2b19a344996c8805280f1a49c6922a10509a67e", + "positionImpactExponentFactorPositive": "0x180a721083ce24f9a23cbbaa4401d4f54630ed7e8936c19a27cfcefbae9434b0", + "positionImpactExponentFactorNegative": "0x5d6c104546ae227912090a780a450282c010ee339c547ce0769a42d4749fbea0", "swapFeeFactorForBalanceWasImproved": "0x1590ee2481a3040cb0d23eb50d8e5f03df05af2a0adb6647b64d9dd18409e4bf", "swapFeeFactorForBalanceWasNotImproved": "0x9ef8535355d5ea75d57b8faa5093312c6a291fecf76f923fd04bbd8cf9461f0a", "atomicSwapFeeFactor": "0xc3292e50be21e9087d06b18f3b871f63e311e17c7d06deacbb676bbe7ef65890", "swapImpactFactorPositive": "0x3ce367a95fad78d15965cfa917ca6137f707a3d77022ba1f643a316323402f4b", "swapImpactFactorNegative": "0x4cbf632cb133bbcc438fd421654e7dae88fa165ba171fd6e6044c505eb728017", "swapImpactExponentFactor": "0xe7d7639aef796eab87ec1ac108ef4ae5de1a5f867b9624bde199f46297b78a32", + "withdrawalFeeFactorBalanceWasImproved": "0xb8edae91057d261feff236403cf096e54d46a0a96c24d88f4f56315547303222", + "withdrawalFeeFactorBalanceWasNotImproved": "0x6b974dea02f400ce26f7b05147ba3dd294b2ceb042735c187de33f2029a2b356", "virtualMarketId": "0xdf0a8d5e921c33cd5da9de36cd122eba3630c34ba710c1e9c17365d57b985988", "virtualLongTokenId": "0xf131c85158814e22bf5ac40e4556e1134eda0141cfdf3a0d22cd0b81ea84107f", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -1632,8 +1661,6 @@ "maxShortPoolAmount": "0x9f92b886a29cf5c0f395972393c54254728fdf12e64d4422b6dfa58e0828c6b1", "maxLongPoolUsdForDeposit": "0x8e8a33a35ab4d6bf88fea7400f1b3156755cf154f37fa306d3681f6cdac92b5d", "maxShortPoolUsdForDeposit": "0x198c20ab100a043b232f3f553aabc4cdb38c4ad46f6122f9248f6cf0cc3c3719", - "longPoolAmountAdjustment": "0x36f91a9f6c0b23a1a5fb2034e4e87c6c63767056fa921a986616166204570776", - "shortPoolAmountAdjustment": "0xace1fe34fdc3172c12730e608492dc95160c0e5cd1effd59ad736ccae2ac4082", "reserveFactorLong": "0xb942291725efadb47f90b489a560166356babc41889c76b3e701b09a3be44a67", "reserveFactorShort": "0x72cc372c566a117f4bc76cf9e36a1c453fc2cce23db5e1e171bc8339f715d9a0", "openInterestReserveFactorLong": "0xea3535598f41c182bf9a6ecf1407d5526041953bfd0ff78f7e3bd183fa36f85a", @@ -1671,13 +1698,16 @@ "minCollateralFactorForLiquidation": "0x9a80dc36f347f59c5ebe196f2c8ec5e2915f9143d378ee582a5421ce121bb69e", "minCollateralFactorForOpenInterestLong": "0x159b5efb14ba5fdf82eb9483ce36a5cc511603ddc0851867d2f62e061a1eb5a5", "minCollateralFactorForOpenInterestShort": "0x5ea79f8f1091195b3a4b2e7b906f73a855a4677d85a563c73c636da18a4c3b61", - "positionImpactExponentFactor": "0x5de08cfc1c45dc70944717fb92318d5f3f66c26fc83ad52ac82277eb036d81db", + "positionImpactExponentFactorPositive": "0xf53b3d463b3ff032cf0e4cf22e4a30da59b09fbb4247c8b8265c3248ad2f592b", + "positionImpactExponentFactorNegative": "0xa7c0a1a61fff70d644c00d1428ba82301e19d4be40dbd87adeb1c47032eb7578", "swapFeeFactorForBalanceWasImproved": "0x8039a612505e93d3b3b411b3e667f13e1a54b0d830e9dcc16cb41d838b85c6bd", "swapFeeFactorForBalanceWasNotImproved": "0x07bcac70080ce14495a72e4e38fcbf3cf15913013379a12d4cab5ac6c741851d", "atomicSwapFeeFactor": "0xe3c7dc581d6b949ca503f256de43caf8a5615491c7b5750fd52d054c50989417", "swapImpactFactorPositive": "0x16e0ad50beb175b5eb950fb44fac610b3289a7a74fe8a788d974cf667cb024a9", "swapImpactFactorNegative": "0xf4d68d4587e30f6e4d7a9ee6eb78d8d4c1c05ace6f9bafd291483c9ce9eb1bb7", "swapImpactExponentFactor": "0x97d1c1c0f5ad236f5f1edac5fdf95bce3537739693abc65a09ed0a3dcf34498d", + "withdrawalFeeFactorBalanceWasImproved": "0x81887e98d2281fa06842b927b25ee3f771167a3dd6a4d83db0e6fa04e65c2176", + "withdrawalFeeFactorBalanceWasNotImproved": "0x993ef60725ee787c1395a01afacdc46d0d6b523b2709f667c7b352edf886abbf", "virtualMarketId": "0x03f15dfbb59683ff19459d28557cd3323f0872a7f560af3b99a3d3f9653d01bd", "virtualLongTokenId": "0xaab37f889b9680dda34f58a689de3023cb22f7ae14d32a3c1d45798a973db1f5", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -1688,8 +1718,6 @@ "maxShortPoolAmount": "0xe73752519aa541a49b1ae6c397342bab1b0e39df55d6ccee20ee3d62471e4d3f", "maxLongPoolUsdForDeposit": "0x1fd569a5eb7ecdf1939b28605e1643850c8299bf922812fe43e3fbc9b906ba22", "maxShortPoolUsdForDeposit": "0xbf01e5edb903e400523203a86dc4523fa749411884418921767b03b990214279", - "longPoolAmountAdjustment": "0x7643bdbbf851d2422681152476ee0935b2d33c863f98b7feba89be587f8ff2ac", - "shortPoolAmountAdjustment": "0x67df1c7379d41ca7d760f5ce511d298a31c2308c2608b4eb69383235759243d0", "reserveFactorLong": "0xf9b0e634b9ecf0769dafc8520e64c31ab144a27f8d2bf29146f760d185160255", "reserveFactorShort": "0x269ea276239f8685144a50b36f392128a5da82b657324ba1a137cdffcbe047e2", "openInterestReserveFactorLong": "0x12f184070de2fba8ea4c7cbf928de4e80c853046f908077238f64ed598f0b780", @@ -1727,13 +1755,16 @@ "minCollateralFactorForLiquidation": "0x6427bd32e101cea4a95641d89d9c833ff5045eec210d362d5a271894653c6bfb", "minCollateralFactorForOpenInterestLong": "0x3037baca9542bb9bf19e795a3ea8588f62fd7aa7f391835394eb39113b24f199", "minCollateralFactorForOpenInterestShort": "0xdb99a450e0b3214c2eac3f7523de613aab2352d659dae70c2a748d158dcb92f7", - "positionImpactExponentFactor": "0x24d3d26a6be3949ac749df173c37d80cf593084309fc6214c3f2b987b8b5bf3a", + "positionImpactExponentFactorPositive": "0xc0cd7b16c0d73d5a4d11debfb6595ca1bd227192114e0c90774e4688e539f574", + "positionImpactExponentFactorNegative": "0xf5e05cc9bfe102c81b3d989e03a78fc0fa69fc6bb620642887c0d35103865095", "swapFeeFactorForBalanceWasImproved": "0xea7cc342e21f8f0d3929c81522fc565f43b539e5cdcd8b06e27fd147f5ea8122", "swapFeeFactorForBalanceWasNotImproved": "0x293b0ec6f9d1dfd04f394f6a2ac44c3c5dc6390cc10d3cdf91808e413ca6cad7", "atomicSwapFeeFactor": "0x4b45a7b2d6be1622e1f2aa8ea096a9dc8b58452956fac9b4ab17829876da0f17", "swapImpactFactorPositive": "0x43815a7794b4f7f293baf4954ce22899083f202f8bacb7c6318febdd200c8647", "swapImpactFactorNegative": "0x1b4e062640c62d2ea26baac2c515da1c438db5cdde51ce3b7e87c389c4588648", "swapImpactExponentFactor": "0xec66bc2197cd85704c758f3f88d82b4e96952086421a0744e4e4bee8043d6b17", + "withdrawalFeeFactorBalanceWasImproved": "0xce78c97db859044e861e5c997b5b19883f1e0fe476b939e64be1e4a8e438a40d", + "withdrawalFeeFactorBalanceWasNotImproved": "0x8308d3331e301904ab9656672fdcd590dd5a48950846c2d160380db8d73a130f", "virtualMarketId": "0x8e4b9ce4d107fbfa15745d1d17325cc3bf6d44d3ae1a092cb5d22ad813aba8ba", "virtualLongTokenId": "0xa59040b7efb6b7122a74cb318a192ebc6732849dff5332ee3ba40b90dfa0a04f", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -1744,8 +1775,6 @@ "maxShortPoolAmount": "0xf11ba26c551e48305fb097e28d33332263a580f8ee53a144c2147562aa8f79d4", "maxLongPoolUsdForDeposit": "0xb93927c7aa98a4dd319f4edd9dd7fefe165f60bf7a6c3a9d741da5be6d6cfe21", "maxShortPoolUsdForDeposit": "0x52eb7de69933408ec109062646ffce951c4d286b4a8137f041dd38a042a40751", - "longPoolAmountAdjustment": "0xa9555de3101790eacba3af4524b4b8a09284ca5f18859027918b75d3a5fa31a7", - "shortPoolAmountAdjustment": "0x8ed4c6b7a64a9ef0d33b04ad58d451ad4590ed706d11b5b3d313c3bda136a7e0", "reserveFactorLong": "0xc9198d3e323008926aa2b18d0bf8f76f9112c58b1f93206a02f634d8adca65a2", "reserveFactorShort": "0x16c3c83bf90d1fc32e5ab142adc07ea251302e7fac4853c99a07190ae31f9ef7", "openInterestReserveFactorLong": "0x935f3e2115512905fbc8e0d568c61d1659537af9a142e3b0d730fe131bcef29b", @@ -1783,13 +1812,16 @@ "minCollateralFactorForLiquidation": "0x6af824714604d471f55475449bcebc7aa7b3aca42f27ceba6c7d803506af84c3", "minCollateralFactorForOpenInterestLong": "0x093de38ced41ca0b1ed4b1125b61d2b919957df4784cfd03a2bec7169efe69d4", "minCollateralFactorForOpenInterestShort": "0x26036e46776ea0eb1742bf11074ac5e347c4a16656bffb61ea87249d85908f71", - "positionImpactExponentFactor": "0x5c860ae9aabebb3cbd58b3aef502c6e8d7de7ee9352d4287a53912877b065f6d", + "positionImpactExponentFactorPositive": "0x0cb9a1d972f0efb1992feb8a951891f944a4bc9f18650edc693072b99160ff65", + "positionImpactExponentFactorNegative": "0x202b943f84c4a2250f541c11fa8a76c8c46c8eb09ff67a686fd9511c0e353eae", "swapFeeFactorForBalanceWasImproved": "0x83f7fd8f66ad11eaec868ce47d0d0f0541d3c5b97db7510c6a5221f3d7742049", "swapFeeFactorForBalanceWasNotImproved": "0xd55ebff53d86bd23cf89b366ce663d0666ff69f0b57bca785f06f9a8241278b7", "atomicSwapFeeFactor": "0x2c55e0139a71c101d54a4a5c27d08df124018ba5e5a018b86f0d305d6d122b65", "swapImpactFactorPositive": "0x554aa25ead86224ab91bef3c3666a62e090f2ff373660d1ad93b5bce40d86280", "swapImpactFactorNegative": "0xa635d2782a0a1a49d0f0109507ad9f758eb8d886465a59b2a6aa4a0d4402b411", "swapImpactExponentFactor": "0x99ae407ca0909a5ede62cf8e5e0cd01c88b10c8bcc977c6be4c60124609ec505", + "withdrawalFeeFactorBalanceWasImproved": "0x24fbc8dde4b6e65b4d9e0f3d0f7b7c2e01a1078d78980a78b92564f8a736c327", + "withdrawalFeeFactorBalanceWasNotImproved": "0x16f836d653ef045404172c8de4841a702f354143d6b013b25d63a6384e646e20", "virtualMarketId": "0xee0116ab2f3ff5a9baf77133e43fe02da8321a8490c5ac205369bace02758d51", "virtualLongTokenId": "0xa59040b7efb6b7122a74cb318a192ebc6732849dff5332ee3ba40b90dfa0a04f", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -1800,8 +1832,6 @@ "maxShortPoolAmount": "0x7aad45d57c12171f54e3aa0c319db8d017d36cbeb01198a290ff417d1a466324", "maxLongPoolUsdForDeposit": "0x600ad826951026922c214cf85b12616d8105bf5f28bfdf78be2b080c71c3b1fb", "maxShortPoolUsdForDeposit": "0x600ad826951026922c214cf85b12616d8105bf5f28bfdf78be2b080c71c3b1fb", - "longPoolAmountAdjustment": "0xb2046a6ddb04fb47b3d1beec1696671fa693b81734820dc61322f0952b470d6f", - "shortPoolAmountAdjustment": "0xb2046a6ddb04fb47b3d1beec1696671fa693b81734820dc61322f0952b470d6f", "reserveFactorLong": "0x336907c3530dacf62d7f844a0fc0a625aac8976e3098f365f341b73a0e3d4f5e", "reserveFactorShort": "0x92303b878a586fbd13bfcb31b380a27039b9045afbe1c33ea79a37765230ca92", "openInterestReserveFactorLong": "0xb52d55ed32e6329e2ebd8f07be29f2c119551217cf6f7a70511c2c9c07de004f", @@ -1839,13 +1869,16 @@ "minCollateralFactorForLiquidation": "0x3393a73bc28e5c25db9ac6cb5d316468446a57bc0eab962823b7b1e58e0205ed", "minCollateralFactorForOpenInterestLong": "0x1677f8025e1e4279b5a1db64264a79835c58c80818191018a56890aa23e9416d", "minCollateralFactorForOpenInterestShort": "0xc62d3cca1c3f6cf4e2770239bc3db387c22a0874a46b28bd8d86bea5d0fd882b", - "positionImpactExponentFactor": "0x8d37091394262b6981015a549871fe3c908943afaa10321a82aabd7fdca918d3", + "positionImpactExponentFactorPositive": "0xa2be9db8ab142242bb26ef3452c46d15432917176b92c93d46edbe6a9a498ca6", + "positionImpactExponentFactorNegative": "0x13de067fc60e4fbf87a3ad5ed52f7637dd627dd9229040e75e76649baf6db12f", "swapFeeFactorForBalanceWasImproved": "0x5cb96b68635c2011b20c1a103f94a8fae1fd3a1a31f929db520a540f3521a224", "swapFeeFactorForBalanceWasNotImproved": "0x3af0747e232c7341bb056cedc52a023be289515396288b8bea2867bd132efe38", "atomicSwapFeeFactor": "0xdc378c54100ad2d83cfd42eb62e50eca23df736d38d7ebaf9d4567b5f9905a70", "swapImpactFactorPositive": "0x7c0dcaa54ea81581befa553bf6ad5d1ed18aa7ad80bd7b80fcd6ef9b1615bd43", "swapImpactFactorNegative": "0xd9536a29966ec9255729ded57ca8f7dddb0c0b9af89354db014171689595efc0", "swapImpactExponentFactor": "0xc0af564625767bd4c8d5c3450753dfc573b1e93682d4989afd2f90ef459922e1", + "withdrawalFeeFactorBalanceWasImproved": "0x2bd1c9cf0922ba1e0b2bd7ca9e2ce1b2e33509db48f7a7b0383ad554a78a169c", + "withdrawalFeeFactorBalanceWasNotImproved": "0xdd5b6694b4a87ba1ea992bd7306880def03617f1edc8989c24c48143054a3d92", "virtualMarketId": "0x679bde52b07e75dc728418cd095c199a7defdfe74368c391b3ea89e729e49b63", "virtualLongTokenId": "0x4586a40f82486304a403813a3e4506085f44f379287675806f0d785961e1f46c", "virtualShortTokenId": "0x4586a40f82486304a403813a3e4506085f44f379287675806f0d785961e1f46c" @@ -1856,8 +1889,6 @@ "maxShortPoolAmount": "0x0d5fc1fb63990200f37ceb299514810cf4eae58503991038738b72bfc4a6ad7f", "maxLongPoolUsdForDeposit": "0xab9dd7c528788e85bc7a9519bd2685601fe692298fcb1bfaee73ba30f859be2f", "maxShortPoolUsdForDeposit": "0x5396fa492e3eea37e10f37702285764fc7d089831df3feff45be5cddaf234ee9", - "longPoolAmountAdjustment": "0x03c5efc409512a272ed49b09bb790562d7e55d230653195cd8c834078243858b", - "shortPoolAmountAdjustment": "0xa631468b07ab1acafad36fe6af8e4dd6171e5b15b0f389152863d5ed47a43449", "reserveFactorLong": "0xfbb6ba697dea0007f2dfe63729f9b6d4d78cc2c3888fbd8bee34c7f53793c791", "reserveFactorShort": "0x9152971cd2a935c9fe8856427ea6e67dbf4a7d7c91dd3d8453bb284440a3e777", "openInterestReserveFactorLong": "0x686ab0fb8f1a7ce1e6168ac1136baf6ef1d576f45c4d9edd406b5d15731c86e5", @@ -1895,13 +1926,16 @@ "minCollateralFactorForLiquidation": "0x70b5c091c0658a67df16c7e57093a054c69c4e6d02e411141176276f33a3517f", "minCollateralFactorForOpenInterestLong": "0x28e3fb3d6672b82c0d07651dc08f2dc5b1a60a464edcc11c4ea8b5e0421cb3e7", "minCollateralFactorForOpenInterestShort": "0x85d241676b23e38f5edd65fff0fbaf35ab45a4c062d5971bd99d31a6cff3be9a", - "positionImpactExponentFactor": "0x4fcc2ef0a8e8cbd0a35c3560320662a39b102617306b41d31e0db602ccbdca2e", + "positionImpactExponentFactorPositive": "0xdbe1a7cef84b1dea52d1f8a4016ab2dcbfa2b7073e2f454ed293e3ab1e3e9f48", + "positionImpactExponentFactorNegative": "0xfdf8abbda95c1d6d888fc026c03e76fb5d0fdca669e74c692c2af30bf64b833b", "swapFeeFactorForBalanceWasImproved": "0x762f094bbedc499cfb8ab344894a1337fa2827d9ca29c1652ef501a23a5796de", "swapFeeFactorForBalanceWasNotImproved": "0xb98d0057d669fde48bf1bfc5fc807f6783d140cce36c5c796f0c9d1f957924c8", "atomicSwapFeeFactor": "0x31cf5da07077e68eb185b9d1b8716f538cf11fa63e92e22919c55fcc93cae57c", "swapImpactFactorPositive": "0x609b62f795290278ccdd73a7134158fd53801275c79a62f4741c967904d3bbd6", "swapImpactFactorNegative": "0xd1aa256ef61e9f42f8c1ea56925edaaab20bf4c9c894a1769748459cdc9f1a13", "swapImpactExponentFactor": "0x4b108c71c95fe54771a329eb035d3e8270d64ea5b79e3ddeb1bdf9d208a39ad6", + "withdrawalFeeFactorBalanceWasImproved": "0xab9fd6f2c573e3cb70f55e6bab5f81a1e8d5c14b86da499050c459283b8897d2", + "withdrawalFeeFactorBalanceWasNotImproved": "0x4a38112d8c08753109c5f0d13f616ec915dc416663edc1db1d230835bfcdddc3", "virtualMarketId": "0xb50280db73b9cb00f37072e37efb197cfdce41d687b639e2dbe8f905083cb6ac", "virtualLongTokenId": "0xaab37f889b9680dda34f58a689de3023cb22f7ae14d32a3c1d45798a973db1f5", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -1912,8 +1946,6 @@ "maxShortPoolAmount": "0x18df251cd91a664d158d2f545dd82839c53e1c1de85e627bce2794991b6f9bba", "maxLongPoolUsdForDeposit": "0x18dbe7e3853cf96bafe3abb51ce87fc7a027a4c39249408c8214362426861eab", "maxShortPoolUsdForDeposit": "0x652aee64a1e3d3e37310386895139fa6a63cba630a95c122f47cd4017abf8ce5", - "longPoolAmountAdjustment": "0x4208f8b3088247ed04a2a2cba18423b3f15ae0d661e86b646425d2f5091b9eca", - "shortPoolAmountAdjustment": "0x65623e126e58f80eff131d11e398c2f88f9712009e0438f0db0e05883b89d1a2", "reserveFactorLong": "0x3168294bb39bed96d3e6d4de8ef7bb7d135c5be041c6314414e37b57a6c8e4b9", "reserveFactorShort": "0x74725f8e48d7c2966a90c0572ac4b6b03395ab0c6cb9ea5348c58c2ac603fd2c", "openInterestReserveFactorLong": "0x65717996963772abf0e33287a8c5db6b2fb8e32edea0fdfd03f931672ef86421", @@ -1951,13 +1983,16 @@ "minCollateralFactorForLiquidation": "0xb0d9ffa1e7e99f2fcef00b4b23323d9b2d060bab7c552c2e7e56c32a638309e7", "minCollateralFactorForOpenInterestLong": "0x5b602b41a9133139c01e6d0627ad253da782dfa70d615dea06e636974c0d2190", "minCollateralFactorForOpenInterestShort": "0xb184fd747edc421383cd0ef45d3eca4c4551ef1be063daa0f93b350e0ca63299", - "positionImpactExponentFactor": "0x56936ed105ce2e078a8a02d6d884ec7ca0971f6e5bb24cd79e1a74c33be26c37", + "positionImpactExponentFactorPositive": "0xaf6d19acc84e2ef2ab65ca456ff76163169322b47f7d7f226e4164ee6281e08f", + "positionImpactExponentFactorNegative": "0xe79fbe687d54bfd916c5c946216d758e821d44f766380bb512f201ef3a7c3979", "swapFeeFactorForBalanceWasImproved": "0x0c2a02cb5d4ca72eb638bbc23178fbd9ef50fcad6ed4563b43600dbdc7f69874", "swapFeeFactorForBalanceWasNotImproved": "0x6ad012eb794a17a8ffcf7423e99c003381fe99e2f8a45ee381645195a360a090", "atomicSwapFeeFactor": "0xd90a7caf21cfec07cbb77bda9745cb5a367f9f089333ca34ea7124a53d1b611b", "swapImpactFactorPositive": "0xf173e2084eda5671a0f4ea671bd7f0837776cdeda6178d17d5926537f468c7c3", "swapImpactFactorNegative": "0xb792682cfb2272eee71294b3bed2d420d96f3b838650917f08eeaf20c6861eb6", "swapImpactExponentFactor": "0x79ed42232c53bf8b095cbc2384a5205b686c5a13b1b9c7ae12b224621296f95f", + "withdrawalFeeFactorBalanceWasImproved": "0x2f74242fe77a22b68b038280bab8be3335507519dcb3bd304326f9f5672369b2", + "withdrawalFeeFactorBalanceWasNotImproved": "0x71ac7b00e3ae9b76ab1c7c406d1a05143d509d528c7ab202bb0753a208b464ed", "virtualMarketId": "0xffbd86a67d642bcd2868d7a851df40c2fdb83ff61c2b1d66ad63ced8b6051792", "virtualLongTokenId": "0xa59040b7efb6b7122a74cb318a192ebc6732849dff5332ee3ba40b90dfa0a04f", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -1968,8 +2003,6 @@ "maxShortPoolAmount": "0x077e6e84f0a3354a4d838cab6e90faa79614b9e0ac471cbc9483a5860aa91f98", "maxLongPoolUsdForDeposit": "0x39017d8985f796b09a205743b334c400ae1e76fd40709e7de38ed0f8894b0943", "maxShortPoolUsdForDeposit": "0x8cfad6b706f31cc788d11e9c51041a7c7698cb7996227efb51ff7ca78e341435", - "longPoolAmountAdjustment": "0xd5469cc2f366f760b6764ecb7a207690f0aeb92ded6738c5b86ec9fb8339b073", - "shortPoolAmountAdjustment": "0xe1f3680737522e673b01c90a5abe06ba97b912ceac0e26cb03de8816f6ef5762", "reserveFactorLong": "0xbe706db7226895515632c2d72b6e0a958a430482e60d7360f2e9061abb578007", "reserveFactorShort": "0xdb2a481015bb13576346d37b6047c1f62b77f8cc3d0b4ab101ad2ede73332249", "openInterestReserveFactorLong": "0x2d6034005f0b507fa2cb067c33401703e248f3ec89274f531de1713d22f1a32b", @@ -2007,13 +2040,16 @@ "minCollateralFactorForLiquidation": "0x2a0767e62c001f898fd730979111f1910f5191d8fad78cce263bdf4caa573131", "minCollateralFactorForOpenInterestLong": "0xa9b976f225b7a1d9aa149a1674b712b8da2245e1d36f7e336a96c3794de912cc", "minCollateralFactorForOpenInterestShort": "0x67fcd6cd3ab04ad285b2a1bb5393df7d7e368846bc8c2654c872e61cbdadb18d", - "positionImpactExponentFactor": "0x6fe9d3e57df23a89ed73e33f91d91d31fd23406654cf3de63dedfb6568389941", + "positionImpactExponentFactorPositive": "0x548b4f4d9fc79bf94227f246ba8f8f306609e1498da90d2b0a42ce118998cd66", + "positionImpactExponentFactorNegative": "0x55da1b3e5853d4618ead8ec2eebb0fe93e997e6457ea75837502bb7385b21af6", "swapFeeFactorForBalanceWasImproved": "0xc1d2acd5c88eedc10e84ea9905b6cee5274b2e01c1325a574170d39a27a28603", "swapFeeFactorForBalanceWasNotImproved": "0x9eb334e661c82faf90d0bfabbd8831d8bbfffc2a15d5caf6a53bea1a52a11f2a", "atomicSwapFeeFactor": "0xa517d70cfd722c6194d5cf52f6f06947406e1a79aa6ee92031a9924894d5c0e0", "swapImpactFactorPositive": "0x995b47106472df08b1d99bfcdf5a5c58a22fd505cb0454ba3c65d25836e5e383", "swapImpactFactorNegative": "0x6fde49ded6431284fad0ab80a5d2bb9e23bc71bdb6768018feb1d0d92cea86f9", "swapImpactExponentFactor": "0xe7230f74591696274ab9b6e56d5f6a7da17e29e6a1e6df2ade2e8e6837d6cb0f", + "withdrawalFeeFactorBalanceWasImproved": "0x0a2213af446705414cfeef644e30fa905608b01eea2fd5f7fb9a6be1016cc2c3", + "withdrawalFeeFactorBalanceWasNotImproved": "0x35fa5d926da8bac45eac6a6244842b2fe1c899001032fe7f5792c26c9884f7c9", "virtualMarketId": "0x867f8307648d7c8c0fcfa9ce7bd2e268ae4b215c281fdb565dc0dd2a0fbb02e5", "virtualLongTokenId": "0xaab37f889b9680dda34f58a689de3023cb22f7ae14d32a3c1d45798a973db1f5", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -2024,8 +2060,6 @@ "maxShortPoolAmount": "0x41d79cc17934907521c7dc2b7b24f7aec03b9425cdbdcab54c74d3a35711f084", "maxLongPoolUsdForDeposit": "0x6c5eb7f9d4d0928b5469d0944942eadaebc0f62922442e011ee0feec327126cd", "maxShortPoolUsdForDeposit": "0xe06e15b2f7c8143a29ac75b446a8133194b708351ed0ba81089ef8be4319a97b", - "longPoolAmountAdjustment": "0xa637c37d4fd1d67c0d3890d92d44ea2a277857b8b3bbf53568420420d21bb1b5", - "shortPoolAmountAdjustment": "0x034b1e59aec58391324f3b58b470b403cd3389b6afb4050081984df995270ad5", "reserveFactorLong": "0x5dec12aadfd302aa6928230d5dfc6fde685430f2061e55462b4a3b4e1a2223d2", "reserveFactorShort": "0x4cde10f84bddaf4ed2c3fbd897d5c7353424b3edbf48577bda0e44c6f16f5ab9", "openInterestReserveFactorLong": "0x85e69e50a7b4156001204bfc3fe7098acf048db35d141d1fe624ce9d916749a3", @@ -2063,13 +2097,16 @@ "minCollateralFactorForLiquidation": "0x184f66f184f238b6d676e9de3e79ca166004e6e66c6ef5e51ee3ead951e11a5d", "minCollateralFactorForOpenInterestLong": "0x49b7345940105477f772afb7f563688a99053ca3edca50f043ea031ef1bfa630", "minCollateralFactorForOpenInterestShort": "0xafcbb8875e23ba9ea3aea7c817003ce9fd6c9f7e3a7397dc9d355d7030c1c6b9", - "positionImpactExponentFactor": "0x0e24bdb43d7906365809d9ad11ddd0a0b2d13541544125fd45e8f3e772df585a", + "positionImpactExponentFactorPositive": "0xeeff77db71ac5cfffddd1235708a487d4b03c0c48fc66600875f903545e004ac", + "positionImpactExponentFactorNegative": "0xb03e2d1dae8f4fc9a0a2334531b0b6c50231a1cde00a41d7534669d4f6056682", "swapFeeFactorForBalanceWasImproved": "0x48cff709ea1bc1d7c25bbd8a21ec36fb0103a61fea7b2d79e71443214893b878", "swapFeeFactorForBalanceWasNotImproved": "0x0404920bfb8782dd3c3ca6bfaf367ed5b12377e0ed5cc20539714b87331a1e35", "atomicSwapFeeFactor": "0x9eada6b539ee0375006e15e7e12028007d7ce834db4e1d6624ed151abb77b704", "swapImpactFactorPositive": "0x19e448c0928954fcb9a9cabbcf59f3132cc20f890325d3b12a4c7e8cda0fc283", "swapImpactFactorNegative": "0x6a0d172623fbdc523516101821ee8863144416e7dd357b967bc205842b287bcf", "swapImpactExponentFactor": "0xfeccfd7ff923ae1f8ec494e1b6701a513a7d9c47b645572d323b17a79e0f4bc5", + "withdrawalFeeFactorBalanceWasImproved": "0xb384246dd2e34131072c5f26e11d28102d5aa49e19360e80070edb490f02d219", + "withdrawalFeeFactorBalanceWasNotImproved": "0xca8174f117fe0d2decaef56cc2cf5cd4bf7d436836c04330ffb054c78194fdc0", "virtualMarketId": "0xa4a5ca1f8a367c4926788fc57c91dbc9e5b2142056b0c9b6806c597606437b2e", "virtualLongTokenId": "0xaab37f889b9680dda34f58a689de3023cb22f7ae14d32a3c1d45798a973db1f5", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -2080,8 +2117,6 @@ "maxShortPoolAmount": "0x75b01148baf3ca4e605487e57f83c7a5cd8c8dcaf9d95b9d1337c2697570a12e", "maxLongPoolUsdForDeposit": "0xd6eb01dad0afd5f39d0bf04a1d8d837d78397e654b3f121ee995a58a2bf9ccb7", "maxShortPoolUsdForDeposit": "0xf600b4b9b0e68f1d6266086e22ecdd527cdd06ee50b67d6a9eb56abebbd54c4e", - "longPoolAmountAdjustment": "0x0f22100599a00c27f438ed457c29c76d055d3ee17d8be268a822813a73bd2eb5", - "shortPoolAmountAdjustment": "0xa5c611fd1aaffc32f289d06ab7e0c5b6cff79e699189588b26cbd3b9dd13d5a8", "reserveFactorLong": "0x12ca7eddc4f110353a0a86c16d0a9995d54c04325238797592699aab341788af", "reserveFactorShort": "0xfea167067b4a1bc0b5d94f514f4ee53c8c2a1f7f15142aff87539ee474eb321d", "openInterestReserveFactorLong": "0xee329acad8b04a9bf204b2a5fb6c131b451b20a095ffe6d919146221be2bc44a", @@ -2119,13 +2154,16 @@ "minCollateralFactorForLiquidation": "0x716807f898c897a453ca05d0f2aa6ddcca6f7db64055b57f81c8e41ea7848fa3", "minCollateralFactorForOpenInterestLong": "0xffea67e6c99a9d19d8e0fc2310bfa16b75cdc3634fa319d67a8ddedd5aaaab29", "minCollateralFactorForOpenInterestShort": "0x5b380cc5290171b8adb5730fc97eeaa8eb027e04035944e2ee6dd395cc26143f", - "positionImpactExponentFactor": "0xc883aaf52b8c7712b5e3de31516b99dddb2d07514d55d14f1a8ccde642ac9ffa", + "positionImpactExponentFactorPositive": "0x64b388485990fae90843200e70d37460b71d912a026eae43f031c9635ef91710", + "positionImpactExponentFactorNegative": "0x282ca353b134be4914177f7f4e8fcd778f21f3b4edc1692fed2c578f151009a7", "swapFeeFactorForBalanceWasImproved": "0x54ed8f84ebf52a26785f7383623bfeea82c8602db2cec9305c72de8bb57c9880", "swapFeeFactorForBalanceWasNotImproved": "0x69273f9d47ea8b35c92c122a3100ed560284f8f1dd8a75144f5b184e13f2f88a", "atomicSwapFeeFactor": "0xb3f675c4eda79a6a026b5204f3291148c4fd7aa5b441661d8c5b218f4f77689a", "swapImpactFactorPositive": "0xff7b5bd53c1fed235757a116187bd94c2bfcc5dccf9c79d3afb485782a5a86e8", "swapImpactFactorNegative": "0x2349db6b6cb6bc3749db19a55dfa7795476c7bfbb8ee0474769e5537adc48653", "swapImpactExponentFactor": "0x88a425e4fb5c7e4b0d858949061fe36dc6212bdee8d5e60a704ff90577560e5e", + "withdrawalFeeFactorBalanceWasImproved": "0xd2a1dcdb19bf34086c26450b12befb7edae1fcf970d0ced9fdfd9351c1bec029", + "withdrawalFeeFactorBalanceWasNotImproved": "0x411cc321a498710e7ecf914665127a38a6516603b60426122664d31f58fb4fd2", "virtualMarketId": "0x352d11c1d47015bbb2f18d6dd602155a9def60d9b7e2b8c501adea36dc0126ce", "virtualLongTokenId": "0xaab37f889b9680dda34f58a689de3023cb22f7ae14d32a3c1d45798a973db1f5", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -2136,8 +2174,6 @@ "maxShortPoolAmount": "0x29ddf8072e6e4fb9e682ccb0c541c7d15d3caeeaaf2801f553a51694f949a687", "maxLongPoolUsdForDeposit": "0x150c3e183d86da659c5144b8e2f8de2c1fe4817967ccd9a39f972e04cefbf698", "maxShortPoolUsdForDeposit": "0x4e0a77b97ad82ca4aab700400cd7ed8d02875c3ed8566e31a69ee3db7d39d573", - "longPoolAmountAdjustment": "0xf12ee754a9c2b7f3172d8852df529e35fcfb5c868d9b3ddbba626397cc661de3", - "shortPoolAmountAdjustment": "0x195a8be658537b44e4b238b949dd48762fa4e5229eda4579a300be9235628e60", "reserveFactorLong": "0x998db8896b7d69f152199916a26991dd3fe6e7e989a333071236edc7077740a7", "reserveFactorShort": "0x0c320c244888cae4e7ebff6d303a6d8b3d72360e85a4c9f4b750f6821f8e86aa", "openInterestReserveFactorLong": "0x6eb35c2ae6dcd4b81602ab9fa3400324ebc3fe0b9768fbaac22da77cc23edd21", @@ -2175,13 +2211,16 @@ "minCollateralFactorForLiquidation": "0x3bb903a46ad84ce28b36d1c2d16311120b9390829b2edb3e8495b0ef53784c01", "minCollateralFactorForOpenInterestLong": "0x4d83d368f9ff304adca7477a95605fca7d41bd25fb35ffdba3dc61e7bff2a83b", "minCollateralFactorForOpenInterestShort": "0x62e8fc9c6e9f155895f43e9edcf84239b180c4e9737887a8b86545ada24195c0", - "positionImpactExponentFactor": "0xc2b2c25918334d3d885588d558503500beb43b71d72e9cb05e3e2b86e5bca6e5", + "positionImpactExponentFactorPositive": "0xcb316ae606cb1ac123cd2e52fc58a17343d2087b2e6dd65b67ca6b19e85794f7", + "positionImpactExponentFactorNegative": "0x2d1fa5163456792ea6a4a465d3bd221689c276557a791f2e5cf091fdee09b586", "swapFeeFactorForBalanceWasImproved": "0x4fb41fdd043a724e464d95478c74670b21d3a4ea15c7c2e96269b41df178abc6", "swapFeeFactorForBalanceWasNotImproved": "0xfbaf2e48e418c8af4d690859073a3a79040c63c1f4b4cd1c41bae9a5787190ec", "atomicSwapFeeFactor": "0x7fd3db35948558ae1c117892536d43456b15a2bc8f4bdedf385a8de5ba9ae99c", "swapImpactFactorPositive": "0x7459c01ebffc50f3aea8bf2ef8ab6cf36d2b2e7398811e79ae65b427c7a4cc45", "swapImpactFactorNegative": "0x42f1b2dcd3ff9e25ca0ea9e9ae7ce948a668d2ac2ab3d078020a55ef96400ce5", "swapImpactExponentFactor": "0x0836eed83cef2717c66ecd1b31f6d02efa3ddb2278915485d1c5f71f220a1928", + "withdrawalFeeFactorBalanceWasImproved": "0x22d401645648b5a12218fd5793766498aad1ff283065a6efe3000de4205294ee", + "withdrawalFeeFactorBalanceWasNotImproved": "0x61b4ed7a667b9296fc380d3576067fa42ab9c833fff6dd2fef566333e13d57ec", "virtualMarketId": "0xbcf8771e6647348c49962927093ad7bb98b885b43bc7955aea88ecbc01e86b5f", "virtualLongTokenId": "0xaab37f889b9680dda34f58a689de3023cb22f7ae14d32a3c1d45798a973db1f5", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -2192,8 +2231,6 @@ "maxShortPoolAmount": "0x84faab0ccdf3ee4e7105dc73594b197387cc6bb9c8daa33723580f7439aff018", "maxLongPoolUsdForDeposit": "0xd6eb2c8aa7ac89bd3dfb19a91fb683935b663521ed17a7c6a662d988aa6a45b8", "maxShortPoolUsdForDeposit": "0x5fe3f10e4cd6db855d0c8699b469690515a88984e85ed698fb2ce138840d520d", - "longPoolAmountAdjustment": "0xb558ddc272b1613bb91320b6606a0085b4fdc5c62edc190cd4cd8d886672feae", - "shortPoolAmountAdjustment": "0xbb071d7a07fd095c75a0893a9729ac2e0645ff5c53f3c335bb30967916400b62", "reserveFactorLong": "0x4277f84bf91ccbae1b0e075827097edbe27a669f91961a39614a7f9946ee5b9f", "reserveFactorShort": "0x799f0f314fb1532ad600764baebc4083c270a82a09b059147c9e8eff7ff42899", "openInterestReserveFactorLong": "0xb8a05c2cdb3ddb962f40734e3bb4a1bb3fd24e70d5802749fb400651c7877ec5", @@ -2231,13 +2268,16 @@ "minCollateralFactorForLiquidation": "0x1c9315aa7049bbb5d2b8bc32ed041d6e07526fc71e2658d12fc64700ba0a85cc", "minCollateralFactorForOpenInterestLong": "0x2352a72b34e744b19d46183f2e17312f8c6d8e6e55ee031745c01426f29f46ec", "minCollateralFactorForOpenInterestShort": "0xcb4811e66720bbc8c900831dbe35327485a8fa6aa48d94e28be4ad20e7cfeb05", - "positionImpactExponentFactor": "0x335695a5a27844054e1229edd8c203f61834fdae52a2761be583d5a8b2d87f5f", + "positionImpactExponentFactorPositive": "0x348ca4f693cc1374966dca2204d9104f98daa281a1f8a1d8e43a1038dea64bc7", + "positionImpactExponentFactorNegative": "0xba4a7a2883d1022ac22bd39a21f2adc9c289823fe67fcd3180ac5ab5ccfb9137", "swapFeeFactorForBalanceWasImproved": "0x0dbec8f5dddc19030eadf103f8d951bb8a586ec11a30f86b8fdf75d565d9ac58", "swapFeeFactorForBalanceWasNotImproved": "0x59d63cc7ab7a3dff92097678f7a98e7f1a3cf7a97616b312e871fc39bcf673df", "atomicSwapFeeFactor": "0x85a84c358cc5dfa7d09a8dabc2856e21e985b799c3eeb59371c15d87a4517059", "swapImpactFactorPositive": "0x461a95b066cf6086852497f137b3ea75bd3ffec0796c7d9400c8e5a92037d7cc", "swapImpactFactorNegative": "0x499433d197d5305ea41dc1d247e491dd6975ce88fab6979e485537a86d043d6d", "swapImpactExponentFactor": "0xe10b5f823fb387f827b6a600f049a9804073a2b410ad2d1789dee8f418388267", + "withdrawalFeeFactorBalanceWasImproved": "0x8ba097e85349516443f8af3f1e7adce2daf124a713f76db0db69c81e8def84b3", + "withdrawalFeeFactorBalanceWasNotImproved": "0x28e31f77029d3369e5088ecafe413c3060a60c54c8b6491ca9e5eb34d56b11cd", "virtualMarketId": "0x51d0a8b4aced607bde6034b727d384d3b742d8bd6da553a2f63802ff762209c0", "virtualLongTokenId": "0x4d68d2798555d20bf717b1375b599dc49e3af2789d5a47388d3d34b97b7d9f67", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -2248,8 +2288,6 @@ "maxShortPoolAmount": "0x7cacec68920f057960601c467852cd1c05a10e546a7d23d66326e1bd7e332a11", "maxLongPoolUsdForDeposit": "0xb3691355f4618fdd46f03046d1781539509bbb07e2efb08fb33b59e8108209c1", "maxShortPoolUsdForDeposit": "0xfa914da48abab816d982df4622bee9262d9840d4e97eb095f2fd9eb856d339ab", - "longPoolAmountAdjustment": "0x203a0758567629ef9e34e21f1251453d8f6f4bc6da0be052cce031e73657c99a", - "shortPoolAmountAdjustment": "0xbfa7b79a9ef0076527b4409f6e8d5ed5c168df000eccba8ef67f734da488d353", "reserveFactorLong": "0x4a96aa84fea7967b22a283790b994176fe9c6b7994bdaf147515780c5f70a7d0", "reserveFactorShort": "0xf533ae904343421c18793a353b3dbc67caaec80411525a2b37f1a45d601a1fc4", "openInterestReserveFactorLong": "0xb3faecca93177abbcc6f639957564b18965e4ee42896e82c19b3d4e416d02729", @@ -2287,13 +2325,16 @@ "minCollateralFactorForLiquidation": "0x5424fa2cdf22e059599b3129445bc0af41411203cd1c67432b1676ab75977d3f", "minCollateralFactorForOpenInterestLong": "0x17278babb19736222b2d9de676d18653ddf62c086d3665741aea4e5073e56fc6", "minCollateralFactorForOpenInterestShort": "0xd5a1fad8da19fe7337b65624c25c09577ce75115b54770ff38ef6bb95dda326c", - "positionImpactExponentFactor": "0x804b39a27e2dd8f1ff7b9c8b9e8c617f279de79423a04c8fa048b1a7d04e0a87", + "positionImpactExponentFactorPositive": "0x42dd964a3dbaa7c18ab481866b8b0dd977219ba782d279881f99da502e4dab30", + "positionImpactExponentFactorNegative": "0xb21e4f00914051f1f9de4f13b196d40e3b4254334a3ee4d6f0b1fdc0b759d97d", "swapFeeFactorForBalanceWasImproved": "0x19c203129972249281a0b60e7b622a8d66a1d7bf798dc42ac056684d96e71805", "swapFeeFactorForBalanceWasNotImproved": "0x323d04891a07265a4b585037fdbdb85d79170c22cd5f34dc3864039d93a1a6c0", "atomicSwapFeeFactor": "0xcf9a0b348c47c4c56342906d69d1ee4c2fc385c51a90629ff71a814173c6984f", "swapImpactFactorPositive": "0xa71869892b9b6533e98daebca840e5d5536dc60b02f242dd2aa099f47e3a36bb", "swapImpactFactorNegative": "0x4179e67be0eb7afc3c56a4d16854b7b691f85c5592c3c13c743bbfe2e519a76c", "swapImpactExponentFactor": "0x399b4895a6bb319b3a1df26d56ff6b188547f4da5697c2a2d3109186c8d50962", + "withdrawalFeeFactorBalanceWasImproved": "0x71d8556968dc379e1c2cd03dbd67bd6dccd314c4f23729139a72742cb826b68a", + "withdrawalFeeFactorBalanceWasNotImproved": "0xbb3312c61a9791abcff24900f3ed12734dbd30bc56d7ab1d71652f545197afab", "virtualMarketId": "0xd3a3de86c5e60d99f6739730b9d43e55d55d3759cad41b823bf67cd07aec447e", "virtualLongTokenId": "0xaab37f889b9680dda34f58a689de3023cb22f7ae14d32a3c1d45798a973db1f5", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -2304,8 +2345,6 @@ "maxShortPoolAmount": "0x2933733a651d96ab7e4c5f0d575485231d9001d78f0a763f3ab35d8c748c1dd9", "maxLongPoolUsdForDeposit": "0xdc40bcc145e3e7bafa9855edfc69054077e68567c4e132f133c6e9f3945172ae", "maxShortPoolUsdForDeposit": "0x6a96bb3eb9799aeeaae8eadf0337bb7070815271b5aebe4c4d83a5be7d68df78", - "longPoolAmountAdjustment": "0x9bd644c35a482aeac1f160000a4925e608224409510e485f297289b0bec6b3b1", - "shortPoolAmountAdjustment": "0x24433be76fe8f04418fd90c834d3fddf43cea0ba1bdaa94380763f14a5c5df8b", "reserveFactorLong": "0x5bd8ffbafa1901194812b34bc0ac74297625744458ca5a5324e3d766668c611e", "reserveFactorShort": "0x3ce777e232b1b5e7678b1456ad4b086f6fea8b08e2ad173246dae9e536369350", "openInterestReserveFactorLong": "0x0a07af97d2fb02322745e04bc7249e135efb9fd6d7cfa37ada97fb8c1508001c", @@ -2343,13 +2382,16 @@ "minCollateralFactorForLiquidation": "0xf753b5b18d0dd10ddf23bdd1059939f3879247e5f5e1c6b0352cb01bcf4cf5e2", "minCollateralFactorForOpenInterestLong": "0xbf0cbbcddabe14afa33f3d923e06fc7c713ad118078f7e77f3d2bb9a8d648619", "minCollateralFactorForOpenInterestShort": "0xd54c4e668acaeb80926b6c76790870e89a47e80823955189e02c504021ada729", - "positionImpactExponentFactor": "0x0d0b5deb037a6e299a4f6746578fb10d363fcdbb8f713c4194e64cb0344002b0", + "positionImpactExponentFactorPositive": "0xd5d29d305a4e922be1df9fe26e2eb8a5a7f7a8add0cdeb747b08c35fa4cdcf69", + "positionImpactExponentFactorNegative": "0xb6808cc83d1a30343ed7b67941450666e01e8b7ce882eccbdfa56935e64fee34", "swapFeeFactorForBalanceWasImproved": "0xa766d46faa67189be6ffb6615e6ea31a5f403e8ece029a45b4cd3eeb08cbe02c", "swapFeeFactorForBalanceWasNotImproved": "0xab3e9d384304687b4fcfaf1fa93376f0f72ba120fc0511f2d7f009e7e46622f2", "atomicSwapFeeFactor": "0x7c769c06dc7c6a4ac6f4e0848dbaf356ad5fc344dd59201cc5f9970f51f7a105", "swapImpactFactorPositive": "0x13eda227af6bd9bd0817e3771f202173a24574f81d1ae84a0b394fcf675dfa8e", "swapImpactFactorNegative": "0xd5d924bf90f87618ba23759e1df30db025573ec12a4af3940533c4f03cad76ad", "swapImpactExponentFactor": "0x8b1b0e78966a367740b4f1d102a9188442fa9a450eb815d28cd384b8e0616ae2", + "withdrawalFeeFactorBalanceWasImproved": "0x27d7a39815a3146bfe2ac59255cc1f0178ff67440a5c35228b6a24fd2b7ad197", + "withdrawalFeeFactorBalanceWasNotImproved": "0xa1e959a045af0aebba29e01808300f1f3a7748717815844ad779ffc1e20be82f", "virtualMarketId": "0xcb51081d96fa96ccb10c6d6ab05ec9199cfd76d538d6dd2adfe42a09b7480261", "virtualLongTokenId": "0xaab37f889b9680dda34f58a689de3023cb22f7ae14d32a3c1d45798a973db1f5", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -2360,8 +2402,6 @@ "maxShortPoolAmount": "0xf4ae7bcd55670907e9019de108537d0fc6663cfc3730d987212f1575ddabbb8e", "maxLongPoolUsdForDeposit": "0xef6eab07416299142ebdefe351e37dcd396a6c29f100d41912cbc6b1469dda3b", "maxShortPoolUsdForDeposit": "0x45e30abb85641d690afa8eca39e7259617a294877f1708f57702b16cf91554a2", - "longPoolAmountAdjustment": "0x37ff45a8c6ca260852c395fb2d106d310ad78c81e1ef7c1b867c01e7e0a21fd5", - "shortPoolAmountAdjustment": "0xed554cedf68d428c2603c89103d69ae7bdfc024e88c2787ba4395735c3d0b728", "reserveFactorLong": "0xa04f9df1fcf32549bace65240db2d31e0f8cbfd8a47b2d4d5677ac95e15672c6", "reserveFactorShort": "0xd8715b4407c801e1a0c66d45d93c8bc7556af7479412975b49043f3c73414074", "openInterestReserveFactorLong": "0x7f30f4a3e88e84daafe8418d449c003109f78585149d5f7420fc7c6d8bed2683", @@ -2399,13 +2439,16 @@ "minCollateralFactorForLiquidation": "0xaab69b6b17ca07fc7c5e074a238946779c61ba7b06c80ab5ae092d0fa14f5d04", "minCollateralFactorForOpenInterestLong": "0x4e55b36b90bb86b6c710c7a94743860cf086374614e1de9788b5d60f6f2af678", "minCollateralFactorForOpenInterestShort": "0x0c8510fa2a221d973bba3edcb9353a25738e7d0e3a217a5618077208ed4df0da", - "positionImpactExponentFactor": "0x142524c8e6b264412253aab7e884fea1fcf5610232b882cebb399d9d5a20adfe", + "positionImpactExponentFactorPositive": "0x627eb2e3bbec23b4a6450f3057b94f98b4cffd5797033244cbc2a2a98aaf7110", + "positionImpactExponentFactorNegative": "0xafe9f0a73235a7decbb6f074f703ce709448be62687a621d2ea39bfcd6808e31", "swapFeeFactorForBalanceWasImproved": "0x8882eb6d03e0ebad72e73c10506efbfb2062a15fb87ef045b2a5da71e2807ce0", "swapFeeFactorForBalanceWasNotImproved": "0xf572e75310cd3f77b9a3f87cf5815f0a95e7c97841906d11ece78caf827475b3", "atomicSwapFeeFactor": "0xc9ba772087f3c8e13388048b4fa1b89c1f85215090717860d20c0b6fd5864356", "swapImpactFactorPositive": "0x2c164a61e689a8a81aeda0f29bff44d8a7f2d8895878c64b4e41c5aab8c4389d", "swapImpactFactorNegative": "0xb88ad88aaa77586d993ed016bbee3584738069ab1f80fc3f7d9a8544cd6b6916", "swapImpactExponentFactor": "0x6f7ac0f128733366619afcddeca36ec6a2da3b379f9938024da379e0be8c1fbb", + "withdrawalFeeFactorBalanceWasImproved": "0xdd08bcb96aee6a22f6132eb72cd9db5c6fc70f7db4f079e70d86eb6079b05a53", + "withdrawalFeeFactorBalanceWasNotImproved": "0xd290ac8378ddaa1f7a48dc76989e168ce65ba731baa94210aa9da754859dc890", "virtualMarketId": "0x49e3aee310864cac3bf7766b04a8a0f4a0dabb5803f5113c583862fea4f74ac0", "virtualLongTokenId": "0xaab37f889b9680dda34f58a689de3023cb22f7ae14d32a3c1d45798a973db1f5", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -2416,8 +2459,6 @@ "maxShortPoolAmount": "0x9fbe7feb72ef3fa8fbb3f80f7e2fbcc0304c7e94bd3189429b537ea7a8c40fb4", "maxLongPoolUsdForDeposit": "0xc474f466efc875b862d186ec0136f4e3b41e6220ea3a8057de249dfbfbeb3e2a", "maxShortPoolUsdForDeposit": "0xa907fb263196ee0f976d2b2cd6b6fb5e5ad52626968d3699243458bb3c30d77e", - "longPoolAmountAdjustment": "0xaa0a126aeda6fe0c44a6af5142cd4f66ed35868e6e4a5aa6daddb3405225e279", - "shortPoolAmountAdjustment": "0xa98e7e47887cf30a68a77d2fe1343ab06453dff80e2da4bb11be2dd7b107e380", "reserveFactorLong": "0xe7a857e936aa00ed034bdb1f793649a012c1b85b8d689d01e2a2d90737902604", "reserveFactorShort": "0x6061dc0000551bff2389afa2a66887bfafdab606c426fe7d8a2f11bded5c58da", "openInterestReserveFactorLong": "0x6cef370e3ba2903a2b20f4d46ce510f62301f5298e1c90a5dc5539662b30ee4c", @@ -2455,13 +2496,16 @@ "minCollateralFactorForLiquidation": "0x07395d2acf2523661f22bac10669c8a51ca55b1618d2d5d8f9e293fce20539de", "minCollateralFactorForOpenInterestLong": "0x36e72daab303600b4522ff9c0d0bb9a1eaf31c1cce97b8ae17084f0ebefe5924", "minCollateralFactorForOpenInterestShort": "0x93a0ba9c685fab64917a6ab1a5e27dff7537836ea12f0c7645c76abd965d21e4", - "positionImpactExponentFactor": "0x78b509b0ba1718dc95363e99b4b27fbc80a15ff26f4c7af4d09bff22b4708a36", + "positionImpactExponentFactorPositive": "0x64ce8803e679492ba0eceae26146b4d94b2df6e453ce0b073e1bc63815c67522", + "positionImpactExponentFactorNegative": "0xe95685144eeb42b728ab6cfba69ab2bee568ebda0c84969d7d10c1047a29dfdd", "swapFeeFactorForBalanceWasImproved": "0x1bb948b925f5b0890197e4a96a36efa3405166da0bb37057376b1c9afc67a1f9", "swapFeeFactorForBalanceWasNotImproved": "0x3936d99bd3d40af388a17a62030f9472559e4073150a3b7df3e29aa7b5652a9c", "atomicSwapFeeFactor": "0xc1251742314a5c7bbc29fc0d0ae9f882f422cfbefa2b4cef4b1094e2ee40240d", "swapImpactFactorPositive": "0x43fd312437e0556e2d89f99e604d50d1ed9c4b02d4e9804bf69d8c71c1ff2928", "swapImpactFactorNegative": "0xe5ea472c4d680fd020ee7c372c33683a5739fb3822fe39d969f07cbe4167bd0d", "swapImpactExponentFactor": "0xdde80356bdb18a6e5cf7fe6659145d4e2236f7615e6934e10bca1ea8e618158e", + "withdrawalFeeFactorBalanceWasImproved": "0xf851e8da7a895cd9d28274cdd983c1f65c08490ac06b5e723041f4ae2cc840f0", + "withdrawalFeeFactorBalanceWasNotImproved": "0x73cd1ed8c749aed6e2dac9f45e9b0d91001b3c291dce63593731b4930ce34259", "virtualMarketId": "0xf72c205a8c133f81158f89a7e84d278fa326b2b0cc4ad79f0be5a53e25b7d22d", "virtualLongTokenId": "0xaab37f889b9680dda34f58a689de3023cb22f7ae14d32a3c1d45798a973db1f5", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -2472,8 +2516,6 @@ "maxShortPoolAmount": "0x34dd611eb98c9bec3c9f7a1a1f75fc00516fb28ebe94677df83eacff411f4d51", "maxLongPoolUsdForDeposit": "0xfcd8a025234bb9019be43d20897f1d4b4ad617257257bff56cf9f864b8d0bcf9", "maxShortPoolUsdForDeposit": "0x2967db980cad6b94d648a88e85632d34df55ebca128ba25fbb2a6df4d85fb19f", - "longPoolAmountAdjustment": "0xb8addd626e5c549ac9c0e0fce01569410dc95c3faee22eaacf53fd6969ef71b7", - "shortPoolAmountAdjustment": "0x62fccc038523de6eaadb323ab42b760f47546d5f042ff97f01da7f019cb35813", "reserveFactorLong": "0x8570fd6cef84d11d53508dac39e41c311bf49a4a1e1f890268b35c56f0cce470", "reserveFactorShort": "0x560049974825eeeb3f8ba81ba98f0402a4c17068d5c88fddb56eea4e8e57af53", "openInterestReserveFactorLong": "0xd3058e052062a90b7c297d4b008f9f0d490ad37d88e074d7125215bdf7d7ccf6", @@ -2511,13 +2553,16 @@ "minCollateralFactorForLiquidation": "0x80c09ef7c9fd9bd8cfac4a4dfea9a09e895612ea378f41668a753350c6932f69", "minCollateralFactorForOpenInterestLong": "0xb1f9e034cd8013cd53cef9f0bdec7c7bdbc4db862e555e88eb9d1cf5e6511956", "minCollateralFactorForOpenInterestShort": "0x20b6d2f9b79b868e1524b9e961bab3641f9f799c6d97d63911dea52d70c5cada", - "positionImpactExponentFactor": "0x9f1b87272507fe9ec122c5535383fff447e2ebf7c92121965b17bf0f4184fd41", + "positionImpactExponentFactorPositive": "0xe754f7e1d6839de3fc2d6ecf96aac6f692b4b02d3317b0a9b81c53ddead92fe1", + "positionImpactExponentFactorNegative": "0xd527a43681a5ec49b7a4faf1202e1848172e56fe6238791eae7a9ab42f08dcf1", "swapFeeFactorForBalanceWasImproved": "0xadd2c67471f951b61e2eff6f7decbdf8c2ef20f48059afcbdea87d9a435d01c5", "swapFeeFactorForBalanceWasNotImproved": "0x31edee4dfd4291a0492f60b88b76f2f0752edfe619e20e30710894daac78e1ca", "atomicSwapFeeFactor": "0xaa1e103bf62db569d5534ff50ca53b37314f09c697813b0f9d753cebcb252601", "swapImpactFactorPositive": "0x36e871427ac1ce490403c9351e871024aaee072fa90fafeea3a09ee1296c5100", "swapImpactFactorNegative": "0x6a34903a427c705b14eebd04e3d807ce9465c22b28c84ae75b83b142bc0e34ab", "swapImpactExponentFactor": "0xe04a2a7a7efdaea4326561690e5a525f60dff65d3aadb010dd528ccb6a083752", + "withdrawalFeeFactorBalanceWasImproved": "0x3fa3c2b387d2f9ddd460a1571458b8d6e7e0e8b189f0c661f1a65b9c3bef075b", + "withdrawalFeeFactorBalanceWasNotImproved": "0x6696211cc27d2ad460769df7d85d438d4d170ce0cd50f3a97dfe0a0d694c2ab5", "virtualMarketId": "0x1748a903ec4a04ecc4e805b5916ae06350e4dac5585e31be9fd0184f1dd5d9dc", "virtualLongTokenId": "0xaab37f889b9680dda34f58a689de3023cb22f7ae14d32a3c1d45798a973db1f5", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -2528,8 +2573,6 @@ "maxShortPoolAmount": "0x2e611022b5e858059595ca62c1ed36bd1abfc679c60a2fed5b8c8c21f0b9980f", "maxLongPoolUsdForDeposit": "0x0b21080f351ea67a96136767a19e447d5ae164678cd5a4a451f1866b264a627e", "maxShortPoolUsdForDeposit": "0xb73db61fd11bd0606b71c9458d4bcc8aa620a29529a85107079e403f37fcaf01", - "longPoolAmountAdjustment": "0x1dc2c26bfe3c234a2631254939b80dd051fb62247ad011db6ec8984897eae9ac", - "shortPoolAmountAdjustment": "0xe449722dcb48b8fe1fba022a10ea6d1efd83fdeed9d150cf303162ac8a41ac5d", "reserveFactorLong": "0x98b9d61ddcb47f1d817eb0530c68a260b8a414c77fe53388c10da8166a36a86d", "reserveFactorShort": "0xdcfa6daf28427966016daf3a4acaa5c3862b560ed51fc2ffd381d63b02040a88", "openInterestReserveFactorLong": "0xbd8babbc0cb8ede14a9811a84a47d3fcfabeafd39ab30d2b06280e276aee8b96", @@ -2567,13 +2610,16 @@ "minCollateralFactorForLiquidation": "0xa872cd93df49b89091c0c052b1f9816b051bc3c837802ad34c28a32716a65cf2", "minCollateralFactorForOpenInterestLong": "0x43fd25f73c5ad7cfa51e170a8e62c4b5267f167b881d77c8db40d0fff9b0cbfd", "minCollateralFactorForOpenInterestShort": "0xbe919143794d2b200798bb5ce729615b2c0da3f4918a5928f7020ea6fd19899d", - "positionImpactExponentFactor": "0x68e38c9e7e097fb2dca604ab440cc4c81ec75b7cb19de8a626c93bd00019e02e", + "positionImpactExponentFactorPositive": "0x26f85a547a1482c23096e770c074d972d1a6545aeb63ebad14504ebb9306272f", + "positionImpactExponentFactorNegative": "0x8add9176dffa7a8d9811768954d0d3ae061eaba30d2921027f89b9854d43d797", "swapFeeFactorForBalanceWasImproved": "0xed597aacfcc0d2c97088b29821bc7c5481db8decbdc266300b3998ae014dba2c", "swapFeeFactorForBalanceWasNotImproved": "0x605173de6a0cb1f167f584339ff5b46851ceff4ddd725a1db918231f9912a43b", "atomicSwapFeeFactor": "0x572c7a723c1c49a0e78bd8ffa219de256d375f1098f3accf55ca7c0d303d141e", "swapImpactFactorPositive": "0x208c6acc0507566d2cb55884616eee785678beeba5542607b18d32de7007639e", "swapImpactFactorNegative": "0xbc075ce4fb66dc695cd10edf51e201ae23591004d823be69ee8ad5ab0ccf87f5", "swapImpactExponentFactor": "0x446d2f81a872accc792188ba237193feef42d1f282e2b7ac0ea9660566f370f8", + "withdrawalFeeFactorBalanceWasImproved": "0xe66e986c6bf07ac37b009ebcc1674062fd30a607f0ea78321cd9954f89078d3c", + "withdrawalFeeFactorBalanceWasNotImproved": "0x2d4241f29430bdfcef95ef324d1d7ee63bf5358d42b837a2f7d1c690d9c1659f", "virtualMarketId": "0x7bdb363de42627474f6a80a35d34a43a708bb74f5687e255fdcee6e4738431ca", "virtualLongTokenId": "0xaab37f889b9680dda34f58a689de3023cb22f7ae14d32a3c1d45798a973db1f5", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -2584,8 +2630,6 @@ "maxShortPoolAmount": "0x2b385fcc8a90e2da7583dd1101c7473d3144586972ed5c091cfacd3d31db04fb", "maxLongPoolUsdForDeposit": "0xdf3e7f9846153685ac1ffcaba326cd57f44b6a4e216eb5a19934067b8c336701", "maxShortPoolUsdForDeposit": "0x4b5a82d7bbbb79c46bf727c75f6dcef7f61689c85380cd483d7cf9138d50c2a9", - "longPoolAmountAdjustment": "0xd067fafff785b9e8f27a45d4ae7889932f0659f7bbb9a343b5ea499ee5e85946", - "shortPoolAmountAdjustment": "0x2d0615cdf4c22651dc46c0e46249fed18bbd10b6315b38e2d0963822386cefee", "reserveFactorLong": "0x592d63effd3f0d7bb6f8c94142ec962e118f849a9c9e6d62c941ebef63edffc6", "reserveFactorShort": "0xeb4400c11786cdbb533d508acf9f687c914f0f2c0b7165319e8f49ac97c5a345", "openInterestReserveFactorLong": "0x775833e7169e6b22bbff183dfaf9fa7d343aa759aee1bdba8a713a5de17180df", @@ -2623,13 +2667,16 @@ "minCollateralFactorForLiquidation": "0x17804f6665dca57aaf8fefd6e6134d40f30afe8dae60b79da13190d4ca798641", "minCollateralFactorForOpenInterestLong": "0xb41bba385bea8b61ee3a31a77f9b22ca93ddd1ddd4c0b2122a1479c41245a918", "minCollateralFactorForOpenInterestShort": "0xa3cfc4f602f38bf736284ff16d11b328ba89cdf571d87a27d801101fe18a89d3", - "positionImpactExponentFactor": "0x4717cfc01a1a24ef675701768beb7343fad800404065332a016f33c3fec290d8", + "positionImpactExponentFactorPositive": "0xcd5943698b3232df03549572ef349d314817e504e77dcc9771efbe3bbe173bd5", + "positionImpactExponentFactorNegative": "0x79e1cae7252e428e835cf650e9b1b728f4df947b0010a6cc00793fa8b5afbe9f", "swapFeeFactorForBalanceWasImproved": "0x712f5742039b496858cdc383ea6f4f6db9dafd98bd4bc0682e8bec1036758869", "swapFeeFactorForBalanceWasNotImproved": "0x39ff0ec8537e6c67dc3aeb20d22f14835a509939dd4c2535b1d83677bdb58dfd", "atomicSwapFeeFactor": "0x70b27f118f4f8264a881ff28afcf50d90a22ddd062536d52cfc0c09831ce599d", "swapImpactFactorPositive": "0xf36010feb1e7e5bf88eba48c62b7cdc9a00bbd23007f4afb33cc373619624b2c", "swapImpactFactorNegative": "0xfb915dffefd667c9f6211dad9e8b7236026971701504f4c5b591c964d750c9aa", "swapImpactExponentFactor": "0x368c32963de4e32ea01c9f7356e2a1ad5fe2fc223d6a5d0ae3e497e8928dc90b", + "withdrawalFeeFactorBalanceWasImproved": "0xb7be1aea155e8e3219c6e10c865dd11594d9fa53cda9a638803a30c76f5a694a", + "withdrawalFeeFactorBalanceWasNotImproved": "0x5e28d667a51f362190d1de0dcde200ac84e12b3c7a8168282cfbd2938455a985", "virtualMarketId": "0x239e7661fb9112893ea39f1024aadb5768d31f7d444409e21dd781b95db99d9a", "virtualLongTokenId": "0xaab37f889b9680dda34f58a689de3023cb22f7ae14d32a3c1d45798a973db1f5", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -2640,8 +2687,6 @@ "maxShortPoolAmount": "0x860b099489a59689951b42a48f00c9c912c6429ef0b1e1a35bd9465b2d87404e", "maxLongPoolUsdForDeposit": "0xde70680e9810ab9af9e03e3bb330bb189349021946953a1bde5b418cab1f70a7", "maxShortPoolUsdForDeposit": "0x9d8895c2bce35e2f85a92036a3cd2ae1a4b27c7788c419e3ece51e7893ec855f", - "longPoolAmountAdjustment": "0x5b8dd28561d66ab419ee6803fc51f53116c71c196672b9cf421f3df1380a5abd", - "shortPoolAmountAdjustment": "0x108a5c2e613f70762353a5c80513058df9e02a538ab97e2be8597e32852ccaba", "reserveFactorLong": "0xfafb263fc988f11c17725a6ba61f2a7d8c1d8c1fba62e57b3be638aa5feb9684", "reserveFactorShort": "0xf09bb168ecce42e29b4d0f0b2b8fdb343f91153b15c8c1b20211ffd854efd1b7", "openInterestReserveFactorLong": "0x2baf4eaf8f5ca8eb68a92e788adc1ee6528d018d1c6b723d33390b25b0481ed1", @@ -2679,13 +2724,16 @@ "minCollateralFactorForLiquidation": "0xe95b93b905611839520fd90f7f70626dda38eac36b11245e48bd0013c4a96ca8", "minCollateralFactorForOpenInterestLong": "0xc777cb82bf5fcf2085423ebb02d83a2e797ee69fe92e28bb541585d6d3ef9776", "minCollateralFactorForOpenInterestShort": "0xea1786adf77d76ecc08ae1ddfb961397bbf8037fcc1f39f407ca682bd0cd31d2", - "positionImpactExponentFactor": "0x9fb394e7a8ca562a80c61ff34aafa3780f223eae1c7bab55bdd65f3e74d7c10d", + "positionImpactExponentFactorPositive": "0xad5f231f00dcf6199a0babf7b7d465e86ae331f99ad2ef5e6aa988e6e158ee2b", + "positionImpactExponentFactorNegative": "0xae6981ab1efd56d81484a66e34bec8b5071c4d9552acb8a29cbb0e102f440592", "swapFeeFactorForBalanceWasImproved": "0x8fe25e4cd1a3645c942c5754cb52f61d884f867f40c795ac14d8c0c4cb5a58f0", "swapFeeFactorForBalanceWasNotImproved": "0xfe43f1671a9753bc846216959f80192c4bd06d228525f64f1bb0ec0b21616e08", "atomicSwapFeeFactor": "0x98488815b3e5a70a0181740e0bd65220f81a07d1c039b338bbe14abe54844499", "swapImpactFactorPositive": "0x79e2b21fccda79427457db054b84bc2dd39d6e71e802603330463debd9e2cf2e", "swapImpactFactorNegative": "0x3fb93539d5a21b0bfb035b684c90c976559174c5b3cb61a31eda7052cd0a8df8", "swapImpactExponentFactor": "0x9545c1fa52965fed0922740abce09210eaf7584507acee7bb1360a4d9e1f2ed0", + "withdrawalFeeFactorBalanceWasImproved": "0xae3b8d3d8bbd8712762fe3088f560407ec91c847466a302644e1652dcc64e14a", + "withdrawalFeeFactorBalanceWasNotImproved": "0x098842bff4c0e478e5ec54a944ca6c5d14de034decb2b967b15e8560a26b0c09", "virtualMarketId": "0xf06bc1c76184711dce12891c4c427594295b8acb4611ed63f67f959841339acc", "virtualLongTokenId": "0xaab37f889b9680dda34f58a689de3023cb22f7ae14d32a3c1d45798a973db1f5", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -2696,8 +2744,6 @@ "maxShortPoolAmount": "0xc522cd2cc3aab97de8b4b6bef4c721666db2f0160251cd8bea561b45c102b54f", "maxLongPoolUsdForDeposit": "0x35dd1b0bc08f806fb946b944e00057df4b3faba4d7b01f11e898c6f70a8c9115", "maxShortPoolUsdForDeposit": "0xe6467e7f23670c517ea118df256d82ae26964ab6df069d02cae65e5d488ab1c1", - "longPoolAmountAdjustment": "0xc8972d97e544d38052eac848d1b3785234234ddbb693c2115fe4dff01e2c75cc", - "shortPoolAmountAdjustment": "0x0abab9170372dbe2c2cb903eb390556881f3951038a32c39e1c28f63948bacba", "reserveFactorLong": "0x79eb8bbaefd5c3b54dd03bdcc99bdcda650ef0eab4ea2096cb6ef85e80ab3dcc", "reserveFactorShort": "0xce32182cc7f00aafcdd28b36c93eef501912f96da531eb521473f1b424657fc0", "openInterestReserveFactorLong": "0xdabac9c9897d22aff8fd56888a3fe190042ff10dd4104ed9b6ad134cb25efe8d", @@ -2735,13 +2781,16 @@ "minCollateralFactorForLiquidation": "0xefd57fd6c01e403503503b2f4e057243ce629c1fbb965350bc5b699db54e3515", "minCollateralFactorForOpenInterestLong": "0x3e352a600ba2709aa41ad9fe571943bf3119a5d4e2ed56b8d9c26f6b61c24df4", "minCollateralFactorForOpenInterestShort": "0x74cd50f69586972d5835b60030fc59197abcd83dc5ed4952cf7211769bf9303c", - "positionImpactExponentFactor": "0x5be4f5dd05e107edd86e920723f94647246b593d1e08b704e42721024d182c3c", + "positionImpactExponentFactorPositive": "0x7bdf30154ce88e8e85db45913144a69f8a408c70c7c453d333ebd3ad677040b5", + "positionImpactExponentFactorNegative": "0xf1d03c9bde0c25cf23595d46d8793e2402454b85adc71e5a118d343260788553", "swapFeeFactorForBalanceWasImproved": "0xb7614344f2d22e57b6d2476711c7aad17d112f92c7f0b87606553bffaa0e7588", "swapFeeFactorForBalanceWasNotImproved": "0x3c744c1515881778c9d315637561923c3d185bb0922e2816b2672425cf9c942f", "atomicSwapFeeFactor": "0xb1d430a0cefc57e981a25023afc486a84ea4adff0e5dc45ed25b930df872e0c6", "swapImpactFactorPositive": "0x88f491f2b910faaca2409fa56898c9873596d94f61459a799f22aed18c3f0024", "swapImpactFactorNegative": "0x063d716f2663e42baa3255283db6cadd96bc6e066eea5397683e050758613f72", "swapImpactExponentFactor": "0xe15802d95e8f9fcde01134de2f73e873fd63c2038546f54c4734358dbf9d24df", + "withdrawalFeeFactorBalanceWasImproved": "0x6c3f79e0e57c292ed6a43b3a9c06560a543450835962fff94d78c035cf43e01c", + "withdrawalFeeFactorBalanceWasNotImproved": "0x0cb5ee053e68a9c5b8e088a3089d3e6036a1f5ba8253d4f13e987464b6c3bc91", "virtualMarketId": "0x2a1907659d4afc6a54a0a01deef0c35b880da7344edcb626745819dd50792b64", "virtualLongTokenId": "0xa59040b7efb6b7122a74cb318a192ebc6732849dff5332ee3ba40b90dfa0a04f", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -2752,8 +2801,6 @@ "maxShortPoolAmount": "0xf4923e22d8d2ed5bae6c1ad7acd69e4f87ecdcaecc3cf1f18fced7df99f29322", "maxLongPoolUsdForDeposit": "0xecad1e8f73e980be296099a49ced054c19e2f7de0e50b1a9732d5ac2146a7115", "maxShortPoolUsdForDeposit": "0xbb7c10c935bfbe117112427615ce0075ea60f81e8fbcb6156d797e712e939841", - "longPoolAmountAdjustment": "0x7d691d45c5a5589ca85823a7dafc604c107b1920a2f64d0ebcb1efe61b2f867e", - "shortPoolAmountAdjustment": "0xb39fb491ec016e32151077a364b4e003b1c0513674cc5618cfb0a0a1e72fd1f9", "reserveFactorLong": "0x12ae2b86f2ed60ffb51255dce288e0b5817c5e29a8b9f396c898588cf13afd9b", "reserveFactorShort": "0x4dfb4002f479e5210e1716840c1440fc069b9f061fda1f6df035141a2b530cd7", "openInterestReserveFactorLong": "0x3f0226c07474ef33c1a97de9268b6c6a0d9343621789264195e13c765321835a", @@ -2791,13 +2838,16 @@ "minCollateralFactorForLiquidation": "0x751618cd5038dcbf1a35c7b6a4fad895b25d3c85860a57fd5e6f5f677ec85bba", "minCollateralFactorForOpenInterestLong": "0x1b990975b2ec9cb3d7800bdcf4c2483ad891a580d9bb318b533b40c52c2f9ba8", "minCollateralFactorForOpenInterestShort": "0xa7ab6290b680865cdb9d52ee69ecbff08162372ac6787a60fa23c1576752b9ef", - "positionImpactExponentFactor": "0x4e8013515d6c6158dbe6773d5523bd3aa689ceca388b13daebe66b8535a1141d", + "positionImpactExponentFactorPositive": "0x201b17cb1b93a9e8eb1ce873b5e30082127a59242fb4b63c79253bdc604b0051", + "positionImpactExponentFactorNegative": "0x85c4d1d7e616e035accf8ab84ef69b6ae4d06a7cb517754655cb3132bfd940b3", "swapFeeFactorForBalanceWasImproved": "0xe7891c63da843b7666b5eb17a233335244d607ef5e28491ff80a739409753cc1", "swapFeeFactorForBalanceWasNotImproved": "0xff76682edc62a55d824fb3027104a8eeefc1aedcefe710468bda4a16e940df65", "atomicSwapFeeFactor": "0x53fb9a87309e0503a17a7cb3eb74b75cde5bd7b36a87ca33a03323ea8fed03ea", "swapImpactFactorPositive": "0x914773be0246bae3852f2415f162581641c3fcbff05d9f9968dc8831bf8182c0", "swapImpactFactorNegative": "0x736841319b2b2e9d22670e879ec64651e9e2ffd751de069908bc1edbedd8d0d7", "swapImpactExponentFactor": "0x0ce9dd673cc4800b8a6664251479bcb647068469074cbb7839160b995624bab2", + "withdrawalFeeFactorBalanceWasImproved": "0x6ca77e5a74f8a0f9bf75f1631634ca427abb91b4b4e68e09cd5387bab688e04a", + "withdrawalFeeFactorBalanceWasNotImproved": "0x2fe5e98ab32c9cbb92b7c40b6cf66504c05fcf0fcb3aac52fefa9b250a5b7932", "virtualMarketId": "0xdb239419e310d0cf2769e39b9ec4c5a5dea293bfb4f494dc31a7f041337c228a", "virtualLongTokenId": "0xa59040b7efb6b7122a74cb318a192ebc6732849dff5332ee3ba40b90dfa0a04f", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -2808,8 +2858,6 @@ "maxShortPoolAmount": "0x8e619514e37f188f03450dacf216fc5f1af0dacc111a5538867ffb1b1b42c035", "maxLongPoolUsdForDeposit": "0x95aead2245b126c2242eed61f1eec4b55afeb21464aef1dd3f21910d3d109a20", "maxShortPoolUsdForDeposit": "0x725c0eb40d63c87e959d7c66f9568f0b9b316bc6dddd4d1d457b240b7abdc1e4", - "longPoolAmountAdjustment": "0x16d9d79fdc1a11cf9663fcb7bc8f8d246afc860901381a995343e21a1c5dc9c8", - "shortPoolAmountAdjustment": "0xf17d6cdee17e86a931e201b1052b0f292ae26809acab2acfb92a2abeb874be75", "reserveFactorLong": "0x81451ed96083c74b7ea4b443265191ce63fa709bcdd3a2ed07ebdb646800d817", "reserveFactorShort": "0x7913a6bc232993645206c85be5adb594da10c46a5ac466593cf84ad008693d52", "openInterestReserveFactorLong": "0xec71c897c5a1afc2803d7c66a4a3f4c134b8c91bd7b40610af82d549ed871a49", @@ -2847,13 +2895,16 @@ "minCollateralFactorForLiquidation": "0x0e0c4eca25323de2ad594c25be09587a84873207c577ed3466d2c25c5c588307", "minCollateralFactorForOpenInterestLong": "0x7aba0e66c4752d2788a33b21c7156bee0a7e7db1ddec971a23e4745cb4af6a44", "minCollateralFactorForOpenInterestShort": "0x7877dc6df20ea3c1896337e048ee1dad2b313d2753a43186a3d574f71f06069c", - "positionImpactExponentFactor": "0x15f86469a0ce25e4d194855ed6445f3c23aea50cb148f365967050da0ce93cde", + "positionImpactExponentFactorPositive": "0xf7e604cf57124a24a967da8c54eda2c890dc0bab7352eb77c5e65eca3fb6bf20", + "positionImpactExponentFactorNegative": "0x0fec5449a60dfc7fb6fd43051d669ff06043a7466789eb98453f549320016773", "swapFeeFactorForBalanceWasImproved": "0x4db5b6b4f93926225227f3e2887f72c9730b813d441fe6ce335cacd22f2461d4", "swapFeeFactorForBalanceWasNotImproved": "0xac158b78400849537bf0f83aade16c435943f4194a4767e602aca8c41e366e77", "atomicSwapFeeFactor": "0x8dc037ec9bd8964e45b14319b948aa9956a0c8db71bd5a78d1d06130e76ebae5", "swapImpactFactorPositive": "0xa3b7813df6db3b7ed3edef24c4e1955bd5e9062c80ff1abdb528cd2c550e8abd", "swapImpactFactorNegative": "0xa77511e977f042648b2b03ea93d721a59db658e5437b141a25987849ea22dea2", "swapImpactExponentFactor": "0x348400b3425cec4370585aa38a068c75cbe896bc7a7865020fdacf3cc64bff80", + "withdrawalFeeFactorBalanceWasImproved": "0x1964279ebba52fdb2e14b6a07be070dd8d1334fbd3e89dfedc6d34e86aabd211", + "withdrawalFeeFactorBalanceWasNotImproved": "0x5b74b231b722eaf53e772f8dfa51f8e0c6fed8323669d2763ad39d7915b82d53", "virtualMarketId": "0x3f997e86143f313e40fddeadb0f61dafbcd44f8a2d2b0dc121d733eeefce9368", "virtualLongTokenId": "0xa59040b7efb6b7122a74cb318a192ebc6732849dff5332ee3ba40b90dfa0a04f", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -2864,8 +2915,6 @@ "maxShortPoolAmount": "0x9a3ab597cce842498002cecfebc2f7fe373890e371e192d85242432ba81198bf", "maxLongPoolUsdForDeposit": "0x259c62a58dcd674d9dddddf47b0b741b777dc6814612a279987bf724f6a6cc84", "maxShortPoolUsdForDeposit": "0x41b41f4e919cdb5bd02517f6939abd60fa637dcfcf68094a38280399802ca744", - "longPoolAmountAdjustment": "0x93ef2d62a56763bd20159108effa00cd5ae8c9ed807c8d9b385639391fb57e50", - "shortPoolAmountAdjustment": "0x44180b4be0420c0abe15d0e17dcefc6362b4674104992699f800af31c209f335", "reserveFactorLong": "0x3b4a3f101ac2275dfb40d8325b66d95d28ce09273e48d3d36f8ab5341200e572", "reserveFactorShort": "0x04d6b353ff58226947f19a1e11229c143790efe72b7bc9203fcff1ff2da03a29", "openInterestReserveFactorLong": "0xad29d6f619a9027afe1b9a84379c49be593fed500c17424b0748ee5ffe8247d3", @@ -2903,13 +2952,16 @@ "minCollateralFactorForLiquidation": "0x5e72cbdf15c7c2759bcf483ad4e11e757e1be816fb2cfb21d0a451017677e93f", "minCollateralFactorForOpenInterestLong": "0xe92ef25b6ac87cf0fe6420ff0b94dedb1dbcb99afdf6c01f4b0db2532a75bcfe", "minCollateralFactorForOpenInterestShort": "0xb35e315882bf52eca4d8f8a1c1d0d0e47e8bf6d2e607efee31f62929e397ad33", - "positionImpactExponentFactor": "0xfd23c3422c995f8918ebd2dd7c73eeeff142ce0c12d07195868aa9d28d66cacf", + "positionImpactExponentFactorPositive": "0x734fe53dc1f53851bee707d3e743f6b4a5a94811e7b8f02a63cb53c9f906aeed", + "positionImpactExponentFactorNegative": "0x749bd33569879ce751a9a8ce5b3201003cc8f23e8533d2d5dbc4c69f198ceafc", "swapFeeFactorForBalanceWasImproved": "0xcb64f5f3f45dc3723f11856db5925f30725fccf1bc1b2a79a60b5604b7b28fd6", "swapFeeFactorForBalanceWasNotImproved": "0x440a1479e78766ccba8b1bda85ea239877dfbb362fc1ca7e790944538d1b11f5", "atomicSwapFeeFactor": "0xbdd876ef95fe02c21b1be1058a8d1de9fdf924a675eec857ed69c3a03f82231e", "swapImpactFactorPositive": "0x45a4bf705485557d4d27f88259722f6f264abf19c6067e7e7c80cdc45091f812", "swapImpactFactorNegative": "0x102f11c727669364e295911cf2eeec0f717be0aa5c2954b9271ab9f497dd878a", "swapImpactExponentFactor": "0x56ad8a94a99b9fb545af26dc677d20f81628bfe1973d7899ac0b1a7838db010a", + "withdrawalFeeFactorBalanceWasImproved": "0x726e889f3c935467ad400816f5c35c7dd4bfa539673d79da67afe38849cdbab0", + "withdrawalFeeFactorBalanceWasNotImproved": "0x96ba15e31e498ddb3eeb3ead183ae0ec046fe1dd3fc39493517c6e0364f669d8", "virtualMarketId": "0x23bea52933bae5e3f00fd2df309b665c3cc4c09c4097d0b33c44990b28ef2037", "virtualLongTokenId": "0xa59040b7efb6b7122a74cb318a192ebc6732849dff5332ee3ba40b90dfa0a04f", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -2920,8 +2972,6 @@ "maxShortPoolAmount": "0xe6fd3ab5bffa4e3a8119fde1409e5248ac69ae76fe1d7482d8652b130e33c2f8", "maxLongPoolUsdForDeposit": "0x55f4ebc1737a2dd8810835427b06e83cf8408140f69e21287749af681c7e2a82", "maxShortPoolUsdForDeposit": "0x266beaceb2c86230d999931c6f243a63bf0bc6064d33a6465391cd3e3badf609", - "longPoolAmountAdjustment": "0xa21f76a9c452ca3164554a5f12c7635c85cf90ef9ae4aa78288d1a978046f912", - "shortPoolAmountAdjustment": "0x8c7e6ff7b85400f03c601336c7883456c4e3055cf8c71179ad59da24479c28a8", "reserveFactorLong": "0x614a8504d25f3e3326c1e00dd296ad7ceae6cf7b69a680a7c2231a471bd404e5", "reserveFactorShort": "0xd19e4594c884391eebe42f90f30798ee18f1f466ddd8415df933f54ca565191f", "openInterestReserveFactorLong": "0xb701c244dfefd9ced44aa1a3ccf6cbdfa32b5d78bbe7a670f2f81f8a641e4f10", @@ -2959,13 +3009,16 @@ "minCollateralFactorForLiquidation": "0xb62e8ac26d1c39798214c05ecd3b4d2dc5d3af8866088b3f315949b47730a843", "minCollateralFactorForOpenInterestLong": "0xe51ceab2786b6da44608fcf1c9da64d1760bf55d57ff7ea1f9376b82886cbb20", "minCollateralFactorForOpenInterestShort": "0xb0560b186b7882b503fcbe17a89c5103ccfa322beb5d1f323dc56c929db3ab3e", - "positionImpactExponentFactor": "0xb5eece59faa64c0cdbc8ee882453fb67959494a8c73137a924d203b375a1468e", + "positionImpactExponentFactorPositive": "0xc2dab14d0868885b8d5df9778ee64c7c8040e1fe30e9624fdecda2fa0ddbe3ce", + "positionImpactExponentFactorNegative": "0x7b9985d29fe4db532c0bd99244df01c9868e47d080fc5bd6f9ac8c12975aa1ce", "swapFeeFactorForBalanceWasImproved": "0xbee33858c2f53747681135515053cc556c047320c641ae43bf2ff98c77b29113", "swapFeeFactorForBalanceWasNotImproved": "0x0bfde157fd2ee3277abf7b7ff6c1c7fab4f935d0af6f51626219ff39a43792c2", "atomicSwapFeeFactor": "0xd73ce0d7096bf317aa16e7d1245e8e75965719f1f557bad58a9c567a6b75bd19", "swapImpactFactorPositive": "0xd4a5ae415f77d62783af1a2f28e78949cc864fd201805dbe149f5ba71a7bb5f0", "swapImpactFactorNegative": "0xfca9588687c74abf7fbde4beebb4a829136a5a82f3f370b2de4e0c73e1579aac", "swapImpactExponentFactor": "0xcc0d3d97121bf02f0c85acadcb5e1374d48fc36af6657caa2fc4147b1cc61ff5", + "withdrawalFeeFactorBalanceWasImproved": "0xe035e18f924a62080c92f7d10521bb5c27620ef5ce838629bb5884cafdbd3f5f", + "withdrawalFeeFactorBalanceWasNotImproved": "0x4e7d280794cff36380365402eb8e0bdad7d373a7d4ac19bab7b537b2e7e5f223", "virtualMarketId": "0xbbfeb7b134fb97b884e7c7e17388257b479d9a8f088e8fe3f7017b811c5d89a6", "virtualLongTokenId": "0xa59040b7efb6b7122a74cb318a192ebc6732849dff5332ee3ba40b90dfa0a04f", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -2976,8 +3029,6 @@ "maxShortPoolAmount": "0x95bf6540bd25ea09b264b8a74b5a8d14a3acd735ca9a764d374a5f6fc4785996", "maxLongPoolUsdForDeposit": "0xa39a4d3bdfef4484a4d399dc47a1a665561c6de3af9dde531e325af5ffa66c0e", "maxShortPoolUsdForDeposit": "0xa39a4d3bdfef4484a4d399dc47a1a665561c6de3af9dde531e325af5ffa66c0e", - "longPoolAmountAdjustment": "0x2b6039e3c06e13bd80fd97921827c6546d796fd7a07a427f64e62f67af7d4291", - "shortPoolAmountAdjustment": "0x2b6039e3c06e13bd80fd97921827c6546d796fd7a07a427f64e62f67af7d4291", "reserveFactorLong": "0x159a946f21c30480a4e0c3c8ec2e371db4f1238b9c7e5824f1170286a8919603", "reserveFactorShort": "0xd33a95b5d4cc0127ed1aa84aba6ddd0b049a2ba37c67c2c9d84c844e469e3aaf", "openInterestReserveFactorLong": "0xb5e138fb0c4cafeb4546b5344e8dcc03c4c691ac43c823cd6b5874f9f4ff25ff", @@ -3015,13 +3066,16 @@ "minCollateralFactorForLiquidation": "0x4d588606a1bcba8846d247f4195a5ef8db551e3172b7588dda7a762c4b02dc5c", "minCollateralFactorForOpenInterestLong": "0xf326ae64850d57c362abbe3e1a2223c94f4a69b17e96139800b5016fe434d4ba", "minCollateralFactorForOpenInterestShort": "0x1140f50b1bdc82bc058279354f46501bfbec07ddf4351360e7fa48c5b974f4f5", - "positionImpactExponentFactor": "0x024d5e4b55579b3102b32e4abfad4d3ea602e20e4ee9e2f3c8b64f3724f0f580", + "positionImpactExponentFactorPositive": "0xf624af2c4a573d77dd346639cc72a3d6e113d2c8bd0c7388a88f721aad8994dc", + "positionImpactExponentFactorNegative": "0xa4c4a34dd531accae3ced30d473d2bcfb67e36b5f0df37fa3c4dbe80efc10f88", "swapFeeFactorForBalanceWasImproved": "0xa18cd10451678dd24a842554853984bdea8ee65419c7424c47fbdacee4ada0d4", "swapFeeFactorForBalanceWasNotImproved": "0xb49a685327e0d1c29eec16feea9c99a0d4d0b5e7ed7de8c46fb83c37ab54cedc", "atomicSwapFeeFactor": "0xfbff4d8c9a7c549991c154234f48ef32736e27536dc2cc91124e03e3f1ee71ec", "swapImpactFactorPositive": "0x04d496484fc2cfc2e5031d2700045b81467c218ed0e70e99c4c5964389cd3fe2", "swapImpactFactorNegative": "0xc7bdfaea94692f0b55dbdaafc9983db489cbc376bf88b3776f57f175713b2ed7", "swapImpactExponentFactor": "0x18b3c48e49fb23c5a671425c0b1af3954268b0036dc606c5226b29e608b09f8d", + "withdrawalFeeFactorBalanceWasImproved": "0x9cae4752af5b32dd0d3a230a29e8a7c1f69324b1176c369dc55efe3afc16a137", + "withdrawalFeeFactorBalanceWasNotImproved": "0x8bbc75354bec0f62083528832fba5da3de19791785a24cd4cdccb620620ea58a", "virtualMarketId": "0x8d9d74b6296b77082205d718116175b560354c67b525e2c42bb79265f422c586", "virtualLongTokenId": "0x383a0fdd5ebac620fe9349688ff6922600f2d5659c01c204e11f3181114b8700", "virtualShortTokenId": "0x383a0fdd5ebac620fe9349688ff6922600f2d5659c01c204e11f3181114b8700" @@ -3032,8 +3086,6 @@ "maxShortPoolAmount": "0x437c6a21419b93b9ab4d0bb866fca1f97edfee7c39f85b84001f3cd87f8e04ed", "maxLongPoolUsdForDeposit": "0x454a5f808bd713d1a3f00464f33f418580b2fa8565b1d7240f0f1328a69c15ac", "maxShortPoolUsdForDeposit": "0x9869c5933cf5a4631929789cb2cbaf75a36eb19475462eb411e57c41c974e33a", - "longPoolAmountAdjustment": "0x823d0bb93d9a17c2ecd0b0a6be1cface5411ddeaec2485c9b489efec894315e5", - "shortPoolAmountAdjustment": "0x0b30f97590d9943d5c5ef6c042b1d038cc4e879ab8b98e69badc36fa3823609d", "reserveFactorLong": "0x162110faff0b19e79c34a9483c9f49b3b80ddff250abca9f3b80a10c8887d3ea", "reserveFactorShort": "0xc57aaa74ff0d1292e432aaca38f62ba000166df3bab75d1c49569a61325c513e", "openInterestReserveFactorLong": "0x64ea0bc85411edb24abcf28cf9af0c38cb2c3f861af70f7b2842cadfca33c1f0", @@ -3071,13 +3123,16 @@ "minCollateralFactorForLiquidation": "0x09f7ab7442e66755f5bfd66d2e3eb08ec1ce60a9fe6f6369b638528f70c6e25f", "minCollateralFactorForOpenInterestLong": "0x7c973b82d160218ec7405501b5ddc34bb772866294bff340a0046a665e2247d3", "minCollateralFactorForOpenInterestShort": "0xd3f8f45c87c1735b5bd16535061d0f4515b1e7f673b9877125011e406f02c6ee", - "positionImpactExponentFactor": "0x2987c92bacb9397e9b34e5f025f773730c282ee0ee4d7af7955d65f401508660", + "positionImpactExponentFactorPositive": "0x56109c552558978d4bf9420a24d831a8803cc5930fa212954aa610a98baf6bb9", + "positionImpactExponentFactorNegative": "0xdbfffcffd9253bf27d141cc68af729c8063daf1daa9bce9d57d51574844f9ffd", "swapFeeFactorForBalanceWasImproved": "0x588f3720f115097a80ad6bce732ba1b277c43fd71d9bd09abb31b5ec5ecc4244", "swapFeeFactorForBalanceWasNotImproved": "0xcac53996c0bcd4b4376d5cca41f5ec9258a4d089c1b0362ece54643a97a16547", "atomicSwapFeeFactor": "0xcf6703dd9a4ed9e9beeb69c09936e37c791dc0114c3fa334fad308359fdcc2d9", "swapImpactFactorPositive": "0x2a5710804a712f5b0eb07536474d337dc633791ed8ab8adf49ade86114305f9d", "swapImpactFactorNegative": "0xbc15a6da3861fdc596e77225e3d77376b10df0f3f60809dee735fa659a3a094f", "swapImpactExponentFactor": "0xe14778e61202b7041ed3f62be736053b6b0bb768dbe225f6b6593f8d04c89c97", + "withdrawalFeeFactorBalanceWasImproved": "0x6f0fda26740be537c451e1b31e8e149f7907bbd30aae6f542807d3f235e3028c", + "withdrawalFeeFactorBalanceWasNotImproved": "0x7f162dee920c9accc527747375d1acb7e5e471327e496e7428fb32f76c719329", "virtualMarketId": "0x3868a2839dc7caede5f8b49e95791d78be3f9a9a1f8511d56f6a8ad687706f34", "virtualLongTokenId": "0xa4c6349b14de45f6b5d19ee99a08ce0f2d4d4862edc6c04a7d302e941045bf8a", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -3088,8 +3143,6 @@ "maxShortPoolAmount": "0xaae9aecbfe227eaa6bf8f5e3a3e42028d4b0a77127c4fc44e37a04a78936ed68", "maxLongPoolUsdForDeposit": "0xd03939629a6f58fee46e02c2a6e793e5b265e65f6a7f44e1d13649853d67f407", "maxShortPoolUsdForDeposit": "0x9fe3767bdceb2357c8a96beb22aa1ffaceb174d38d46151e073009f381c3a4cd", - "longPoolAmountAdjustment": "0xfa14e17cedb847cf0d73436ba1432a79404b6b5acd8bbd71c5698807d84e101a", - "shortPoolAmountAdjustment": "0x0de117e57cf9e40151bff492ec02a077790da10de5e19b9dad9f0902370e48a0", "reserveFactorLong": "0xe6b65e41c0826da8c229fd0e00b315d2c3a5591b6cf66e346ee76a46dd3788f1", "reserveFactorShort": "0x20df0c31fc7a5814e98ac2355cee918cfd34d4737dd704adfe1fa14ae3a9a0ec", "openInterestReserveFactorLong": "0xdb9f593080f96752e7919cb49c6861ce1edf5bfa8aa98af6bf0bb2432d351aa8", @@ -3127,13 +3180,16 @@ "minCollateralFactorForLiquidation": "0x4678d0672e6f710a1b949e87f9d131a666582b002ba33e4611370cb314c4fbbe", "minCollateralFactorForOpenInterestLong": "0xb67d83d1aa168418e39a9e63db05fc226ef950870c88cef6489ba60614555ec3", "minCollateralFactorForOpenInterestShort": "0x3fa9ef62043d4b2c98b738e3e792a2cd7dfa6a906403619d068417f199d3e51d", - "positionImpactExponentFactor": "0xf40ffc6279286522266a0f262193cd2f2e3ab58182dd4ac525ffa47de5d45fac", + "positionImpactExponentFactorPositive": "0x514465a22eee090604fd79874909ffc8d167a4a7fde220fddeee654380f8e1a7", + "positionImpactExponentFactorNegative": "0x2e9ddee91f3d2cddf2fe853161646cdd8c06ba437837db2568b707276ecc7638", "swapFeeFactorForBalanceWasImproved": "0x5e06aa364ca3ec60ae841d9563ab289f341be788b71e1195751a1f5a6608d83f", "swapFeeFactorForBalanceWasNotImproved": "0x379a330b77e5901172434cb0ea61bccadbe9ccddbe4c4b44574312ca7e8f9cf4", "atomicSwapFeeFactor": "0x2caf89716bc0a40f6c0098a2797798ec47de5f269eed4bb0766c6a14e1a80180", "swapImpactFactorPositive": "0x4dfff87fbccb5b88103d2c18923fe113cabf5ea0683519bdf5aaa014901e5485", "swapImpactFactorNegative": "0x948eb486fa79aecc31b6f33201e895a7a280dd196b0d44d58826f51052959432", "swapImpactExponentFactor": "0x473b14d18453e5f6b724e70e5f3d9a89099d805d920a15c6bc678e9d4432d1f0", + "withdrawalFeeFactorBalanceWasImproved": "0x5c2b58aebd0ea2388bafd61af4cb377d6bf594170f0bd105640d5168323c37d0", + "withdrawalFeeFactorBalanceWasNotImproved": "0xb796223f9adc6f2043e03da48c2a716d232438ffd526f86844979da8e4fffc04", "virtualMarketId": "0xab7e118a2f48a981792d85e873cd9c26d455365e8cb4c53f91bd97c59aa5052c", "virtualLongTokenId": "0xa59040b7efb6b7122a74cb318a192ebc6732849dff5332ee3ba40b90dfa0a04f", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -3144,8 +3200,6 @@ "maxShortPoolAmount": "0x40583cd78116d2949dc391c627f8bef5bcac00ae5a4bce293a20414fb2eb3888", "maxLongPoolUsdForDeposit": "0x30e6b13361bf17deaa9833b3130066e682819455a1688d579e3c461ff6ea2d25", "maxShortPoolUsdForDeposit": "0xfc81519c826302ea5d6cfedc0432e2ff4fe5652f35946058be6c2277a564deaf", - "longPoolAmountAdjustment": "0x7d7929559624bedd43ae155e4c99d251b0bdd61edadb983b41ab5587b7785ce9", - "shortPoolAmountAdjustment": "0x47f8e7073cfbe07cd2f6daabfa3618f22e702acbc77e5b2e19139475963dcf4b", "reserveFactorLong": "0xccd416a2129e6d2787321b3e83c4fe1d303272cae9beb26bd8954d5c18b9e609", "reserveFactorShort": "0x278ae4969357672755fb74a4201eaccf61dc43ffe1e2154d28336940c4937422", "openInterestReserveFactorLong": "0x2c0f62467f5a326ff9d98f29d23ce080d4741b7db1fcaf0ef0195dabfec78822", @@ -3183,13 +3237,16 @@ "minCollateralFactorForLiquidation": "0x63f56c8c49720b8c624535a0612b2838aa6c2fd809d28660be826e5593a84ab5", "minCollateralFactorForOpenInterestLong": "0xac1d1a8dd04b4b1ce72264801861bb8c24d7085a54a992bd00af1c678dab9606", "minCollateralFactorForOpenInterestShort": "0xeb291f3c33fe4214bc3c2127cb7b4e5531517e60b055d0cef9f35e20144b85ad", - "positionImpactExponentFactor": "0xe2a98a7ee53e527429ff24a4bc99e39428f49da9eb48d9cce1b3814e1fe30893", + "positionImpactExponentFactorPositive": "0xb1ae7ea61f41b3102fa46ff81fba9751ccf5405c28409844d7dd894bf9f97abd", + "positionImpactExponentFactorNegative": "0xb366f972ae7b48057d4c8351eb3d1bce84e5c063e2b5f6202b5bb1757031aee4", "swapFeeFactorForBalanceWasImproved": "0x7c8c38c435c69d053cda438aec9ba9b3b04cbed369c8ebf00855a4e5fe237e1c", "swapFeeFactorForBalanceWasNotImproved": "0x520be5e89bd1667cf2473019ce4efe8c6c8844418027fbdb89c72725fc7c87f6", "atomicSwapFeeFactor": "0xb649f84aef632b821933f087fdf47095e2959db56fff928b569c0034c646a71e", "swapImpactFactorPositive": "0x5c8a37f30c9ecc13ee46d77b70d4331b6132fc1d387d3d6c8b4874daa9e45ee3", "swapImpactFactorNegative": "0x728f7a1b5e5c7393136e513b4f434934682e69750993b9eda930b21a7aced4f7", "swapImpactExponentFactor": "0x03c6473283fff9db0ddb65c7c99aef8132d1fb0ec5ec7bc0b2438ccf1f74345d", + "withdrawalFeeFactorBalanceWasImproved": "0x64122b188b4cf0879d5c5db89d3d44bbe0f01a6cea87fef3ec73cf4eef4f24ec", + "withdrawalFeeFactorBalanceWasNotImproved": "0x163dd3eebc8c58445e853c51118bbd159fe6035cf95afa36fc38059478ce6057", "virtualMarketId": "0xca19aebefd1d090826ff846903d82e84d0c00f38deadc5b98f70d701742a4a98", "virtualLongTokenId": "0xa59040b7efb6b7122a74cb318a192ebc6732849dff5332ee3ba40b90dfa0a04f", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -3200,8 +3257,6 @@ "maxShortPoolAmount": "0x51c9504dfc6e55d63706996bb13e6100f2ca0ecb735fc8240046545051b7b4ee", "maxLongPoolUsdForDeposit": "0xf4b89e7ef6479e7c30df4e8742828acc3dcd24439c299ee5d7bb7340d73679f1", "maxShortPoolUsdForDeposit": "0x60d207c8fc3a86d9fefb02273f002a05e703c690d86c853524d62f3515bf649d", - "longPoolAmountAdjustment": "0x7e12b9e658b2ad611f022117f06dc364b3fe2d6e3b1a87f5c64d2ad63f3bc10b", - "shortPoolAmountAdjustment": "0x4d5659cd56d7f7e1b5c985dc814e12d18106617f410d720f4b185707edb8e668", "reserveFactorLong": "0x8e74c3dce19bd48799eb59fb1cdc6b1526c7f0bde326ce3b3dac438fe6e5bfd0", "reserveFactorShort": "0x326407fde26890efdf6bb5d96ead450d79ea75610d5d55825c5edc69ab3bc579", "openInterestReserveFactorLong": "0x67cf11ae334480f8dc66780a7ba265163b187ce8789af2911ab0116ea7d2d02d", @@ -3239,13 +3294,16 @@ "minCollateralFactorForLiquidation": "0x7bfa38b3b418ccf0e7148ef4f83761ef84dfac2ede0009121e61a79cca9a8869", "minCollateralFactorForOpenInterestLong": "0x3b95e2164fa00e54a136f46ac7791ab382b33ca305385943a18908b26110b691", "minCollateralFactorForOpenInterestShort": "0x92f543ff91b7e17ebe09b0a5632ba8fe800907683b0400e11b507585b22485dc", - "positionImpactExponentFactor": "0x0fff84ee08b85a7dc2f7064113bb23bba06f731bfb6fcaf0b0924fdb86198310", + "positionImpactExponentFactorPositive": "0xb289e2bfbd3fbde5bee2fec33790ec13cc89c1e893a6dee7fe5ab37bafc3456b", + "positionImpactExponentFactorNegative": "0x1ff1b9844cd00c861781d73197e03bf4d973487e9306c732fe89d46d67f1adc7", "swapFeeFactorForBalanceWasImproved": "0x10a5906caf61db02617a22f487386bcaa73018c7170652ac5f829a8d9fc61204", "swapFeeFactorForBalanceWasNotImproved": "0xd9cfb7f87d3d639a348d35889198ee8deab2cf9d84a50e57dda704d84fd6e960", "atomicSwapFeeFactor": "0x061c448fae50d49a8f50a8d32e134e7649e6a815cc71e5341389655a702cf9a1", "swapImpactFactorPositive": "0x1ca2c01d2280bd5ce2953044135a4ac1612cbc1e51eb4789094d5277695ea547", "swapImpactFactorNegative": "0x12d72f558e812074fe92ca12d0b09ec2fce12f75ad277ade95bb96d90d0d5feb", "swapImpactExponentFactor": "0xffff85ac1f617e96d26113e10310a0d3c45e80b4eddf6522fe7c3ffaa18483a5", + "withdrawalFeeFactorBalanceWasImproved": "0xe80dd4c23fecdfcb41b2b6da87ccafcb3d78d3fc87b9860a845e54af6856e9a8", + "withdrawalFeeFactorBalanceWasNotImproved": "0x9d63f29e8d0907f06903aff1cece18204746f914fe57ae1c9730a025efbfe06b", "virtualMarketId": "0x4e45586413090d60ceb0231799707630a0f3475e3b42847f054746ccbffaa8b8", "virtualLongTokenId": "0xa59040b7efb6b7122a74cb318a192ebc6732849dff5332ee3ba40b90dfa0a04f", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -3256,8 +3314,6 @@ "maxShortPoolAmount": "0xb484be058d259e7ac293be10c09ce5ed59a0b5b37671bd37571f412980acf232", "maxLongPoolUsdForDeposit": "0x0745c29f41e9bca1917cb438fcadee17d80b5e4930e87307084b3f88d16b2903", "maxShortPoolUsdForDeposit": "0xf9dee183d448b8b0bad6a1b4f687c13d467b0f4f900987f4756a6bc67ecb52fb", - "longPoolAmountAdjustment": "0xab2deea690a29c6bcd9a55e8999bfd52ea06f35f9b3ea888d1c210dfd88a923d", - "shortPoolAmountAdjustment": "0x480d24c0c8df4e155ca8c3f9b17a2b406626bf79e447469edf4605c3b4b3c481", "reserveFactorLong": "0x099b738b5d7783c9d7698c25e7ff482a7b9974d0d04e121d671c1a6cabc3ed1a", "reserveFactorShort": "0x633a22f36b8ee0f33a91e020b175f110780a91f50f2c1b534cc101618539c83f", "openInterestReserveFactorLong": "0x242383d341f4a5f8dcf99194840b17ddbf1ca09e4cfa3beaeda08a3b438d6959", @@ -3295,13 +3351,16 @@ "minCollateralFactorForLiquidation": "0xda84c5039b11ba8791d306f10ba8eb5897908ddfb3553dd90ae15b19a34558ea", "minCollateralFactorForOpenInterestLong": "0x7ee7a2ce8cf97ae51b250ef153c4e47b752fe2a51865364cd7e5e0d96213560a", "minCollateralFactorForOpenInterestShort": "0x038f5c86febee95ef8fa08667309942a2242cce1fd1b73e5c9f889fb199e8bc5", - "positionImpactExponentFactor": "0xf20108440f12472008e2502eb559780bec72ab8a376f5f4ce9d978642f37134f", + "positionImpactExponentFactorPositive": "0x8c51e0322110e46cc8c1296617b8935782a99505b7d122f4bcc64a44447daba1", + "positionImpactExponentFactorNegative": "0x771e70f65bcde296b5d99cb895ac9c239ade4ab9f31f6a376a64443f8aac7af9", "swapFeeFactorForBalanceWasImproved": "0xa3be727905b20731888cc2db25d31e4e8a41bbeaedb036c2aeb9570b03eade4a", "swapFeeFactorForBalanceWasNotImproved": "0x73f6253a8128c8d5eb5486d65b6bbef9e92a29d142827a94e16d7c1e0d1c8c78", "atomicSwapFeeFactor": "0x69b16fd7680e79a4444e31dc65f69ef65097908b8c7d378fcae8e1fd420204e7", "swapImpactFactorPositive": "0x21b32f554b31bdc78df56611840c5b22c3f83e6cf98ccfa40a961b576bb8f27a", "swapImpactFactorNegative": "0xc2d2bcf31bf9a8344f5325216298aad7e5db29a9da562598e268aa22650ac8ae", "swapImpactExponentFactor": "0xf370325fe03991f22b1bde52e04e37ce1e1f4889f89a8f7de3bc014392280388", + "withdrawalFeeFactorBalanceWasImproved": "0xd1890aa52085897ec3192a15f052f9bcb41c7eccf5477058e0b82e0abb20e3da", + "withdrawalFeeFactorBalanceWasNotImproved": "0x0b6abdd177639877978945a32c241dc1eaca1af3a15b078a55b0bb1c8f6aaafc", "virtualMarketId": "0x3bab1d667724c9754773158ac51a2b99d91543631412280d57981d4a3b100922", "virtualLongTokenId": "0xa59040b7efb6b7122a74cb318a192ebc6732849dff5332ee3ba40b90dfa0a04f", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -3312,8 +3371,6 @@ "maxShortPoolAmount": "0x6c32af1d98dccbe798233946044d43c7c963d00b16dbaaac5901a6fa99802b4b", "maxLongPoolUsdForDeposit": "0xfbf6ba3a153e6e633ad3eb8fdae1ca409d639ad08d82daf0128dfeb1dd0823aa", "maxShortPoolUsdForDeposit": "0xc339d51223852a8d6f9af901321467f50a2a93d2a83bea1c1e8bfbf54636c3c3", - "longPoolAmountAdjustment": "0xf57e89cf24218a46bc5bdad507a5cc56a424a1544767b5b01b4ebb8fc1eba5fd", - "shortPoolAmountAdjustment": "0x44b1531e7567b8cb08499928450c8742053c0cbf3817852f2e3c019616aa90b3", "reserveFactorLong": "0x9752c5910751e6aa2c522ce6b4a2bf3ae10ab521226729163abab23a4cadadde", "reserveFactorShort": "0x930aee0a504c8e451c59c80ce2e3b4b03db639376b37b272290ddb50d48856cb", "openInterestReserveFactorLong": "0x1c5df85e3ce9ec81ce4b0d5d4c8223e8fe8fbc86be970e0f2b04e7513d433492", @@ -3351,13 +3408,16 @@ "minCollateralFactorForLiquidation": "0x46faae59a599d91c70cf77626c8a6d97ddf7017fec20821a1d6cdbaa485a9178", "minCollateralFactorForOpenInterestLong": "0xdbe85b764eb648e48f9fc7ee2ca91b67515bd3c9e5093fc110b0db61825fc00b", "minCollateralFactorForOpenInterestShort": "0x90d4beb803fbe580d51f0aef508be25221595bad32eead1bbf3c93bd37e876e2", - "positionImpactExponentFactor": "0x1a0c0dc2b23888100da389151b52c1ce3fc7b82e3e5347ff425be72c6fa91b05", + "positionImpactExponentFactorPositive": "0x9ae112aceccc8b612265039e0bea7d6202ff938b195262b41d0ec83567a425e8", + "positionImpactExponentFactorNegative": "0x063fa6b73c34c1e09c187fb978dd875f15e74e38ab4f7b7568f94f9a1033f3b9", "swapFeeFactorForBalanceWasImproved": "0x18e4dfabef67599963a713e17ab75a97ae9a856c7f928a774b55a854d2e8271c", "swapFeeFactorForBalanceWasNotImproved": "0xbcd1f183a9fef531ff9db7158ef135533c7dad2c76a4539fa8ffb261613b5941", "atomicSwapFeeFactor": "0xa80450c5250a5e1c80e3ce7ff5da3a8ad5b40b0206abfcc350e25b68fa9f96a4", "swapImpactFactorPositive": "0x8678662699138feac68d6aaeb7318df4d064532ecb21d27591c5329cd16e1df5", "swapImpactFactorNegative": "0x37fb6cda1dbc827e2bed64832211f7e3b22fd76d68eafc898864d33e3d28f7d7", "swapImpactExponentFactor": "0x3407b3ef7c9e1614bff78ffb8563587f128252bad9a1e0549e50a5f85963b51a", + "withdrawalFeeFactorBalanceWasImproved": "0x7b03424631f9395d68b24da8e63ff1fc0161d4e291231acd5e3f88572cb87f4d", + "withdrawalFeeFactorBalanceWasNotImproved": "0x9d599c8e5ea71d483c5d636d83c7a13233b2e29e4d32b9ff0492c33dcce49fdd", "virtualMarketId": "0xd62d50909f2b9f6559f1e5b6cf9001c973e894952e5e0196ef6922443225eb17", "virtualLongTokenId": "0xa59040b7efb6b7122a74cb318a192ebc6732849dff5332ee3ba40b90dfa0a04f", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -3368,8 +3428,6 @@ "maxShortPoolAmount": "0x00f586b9860e502a2a745ac8534290dc96fbaa0b9f04293f30088181e8e9db8d", "maxLongPoolUsdForDeposit": "0x7e6f75720b266acf29762282bf41802838d5dec989578d81e7036d59fbf400bb", "maxShortPoolUsdForDeposit": "0x00023f85215caf49fdb17a4bad8d1ef7b3fb38e75c079a6edee3365ff4a2a9bc", - "longPoolAmountAdjustment": "0xa066b5ff6c5d0b119840cfe1dd1283039bb47b1d11f8a8da69e12362261ed20e", - "shortPoolAmountAdjustment": "0xb28dfd7bb38d1fb9ecfb5339346eb29bcce57981d7a1e5bd8d1046aae0484f11", "reserveFactorLong": "0x4657e49add2de1d05ce31764c40a6d8acb51dc032923aebf58119f044526c4c3", "reserveFactorShort": "0xf670176e32652e1b064d56892fa84be52db14b8d0d8c8c70b5994a28b7501077", "openInterestReserveFactorLong": "0x9a7aa31a06769a2be330c69eb697a3b28a8ab5c3194f13549b923e41bf9b89c8", @@ -3407,13 +3465,16 @@ "minCollateralFactorForLiquidation": "0xdccb44a6021a756a790c10935251bd0bc376b3969322208dc9af6c87e11f56b8", "minCollateralFactorForOpenInterestLong": "0x74c0a14f2a215ff8ff5908b12fbaa3065d35c06a533007ed5e577223ebf46e4b", "minCollateralFactorForOpenInterestShort": "0x94f50bb5bf06625aa0686259c5aaef25ec277ae0d18952431e8a79c424b16c4c", - "positionImpactExponentFactor": "0x19d95eb25a54270fdff0e791d1ebdbd32acf1ee56f11502fa019a1fad987c154", + "positionImpactExponentFactorPositive": "0x9d2468b88cde3f28bfe56ece28b257d8f076731fe59c7ccee5e73ffcf7324d6e", + "positionImpactExponentFactorNegative": "0x828bd7e9a6b6265f8bfe0cf687c96856b3ddc7bb688d00d8e20f1a60130030c1", "swapFeeFactorForBalanceWasImproved": "0x0b4f9aafd26ffb34fa8ed5f7ac3afcaa2fa8eb3bc6674abf977dcc940b58fef3", "swapFeeFactorForBalanceWasNotImproved": "0xd57dd2fb2b0d6bf254f2c7ce4bc34f29a69d0274fdba121d2678558e6aec1ae0", "atomicSwapFeeFactor": "0x7e9b13adb16b9ae09bd6f2530cfe171baf41e3e8e18c3fbe63b818aa15cf5f1e", "swapImpactFactorPositive": "0xe3b67132e0f4393269e4b1a857cf64173c3f439061273ecf56a280f4c93de89a", "swapImpactFactorNegative": "0xbb17be4a833e071fcd118fd099e5441fa4853dd41297654cc57483bad2c4ad04", "swapImpactExponentFactor": "0x4583b3c42805ca8a4569db7f9c7e4f9c2afc4a1029672b2c9f1947794f2ea2b5", + "withdrawalFeeFactorBalanceWasImproved": "0x84210c545418bacbabc889d74385784d28591ca57d4fdab51fb02da887135e85", + "withdrawalFeeFactorBalanceWasNotImproved": "0xf7f8df595db8a2c6496070b3795afa5d968eb73045e52779fea8c32e722a2a34", "virtualMarketId": "0x0e4b2db9c58348cb77edaaf87970fadbdaf3c78fd3e14bae1302a30741c7a84e", "virtualLongTokenId": "0xaab37f889b9680dda34f58a689de3023cb22f7ae14d32a3c1d45798a973db1f5", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -3424,8 +3485,6 @@ "maxShortPoolAmount": "0x440e6f58742ca9d60fb6af30a08c28b9788ddca006730b04297852680a657853", "maxLongPoolUsdForDeposit": "0x2447021ad5cf2cc23b05dd1aa74ed8c91e28b4bfad2c2084b37425b2f02476f9", "maxShortPoolUsdForDeposit": "0x2447021ad5cf2cc23b05dd1aa74ed8c91e28b4bfad2c2084b37425b2f02476f9", - "longPoolAmountAdjustment": "0x1c1e003b4f63f0e2ae08ac185e4940fa3b0fdf1c8ccd8fd9e0502b807ea8d87f", - "shortPoolAmountAdjustment": "0x1c1e003b4f63f0e2ae08ac185e4940fa3b0fdf1c8ccd8fd9e0502b807ea8d87f", "reserveFactorLong": "0x57caa92d4203e9eae30dd581b37655874fcf15da6cc23a2112c7bddf5d1b2d3b", "reserveFactorShort": "0x5d2dc6864c499bfecf005209f5e191831b307edcd788c4f582893ea7308a3bf7", "openInterestReserveFactorLong": "0x233346bef094718b3ccdff0be7dc808217d616629c2208da3f2c452f5b8f9c4c", @@ -3463,13 +3522,16 @@ "minCollateralFactorForLiquidation": "0xf8251492b7b09de9de757e6c12b0417e0e8afc7471ea341141af2c59de187e55", "minCollateralFactorForOpenInterestLong": "0xa588997b3b52f45c5ae3dd23491184ecdd8c73a4a3ad208d2d9b4b83d653cf2e", "minCollateralFactorForOpenInterestShort": "0x5b71809f9c6cc7c5456b1a517e15e37bb710f1e8f8178edc89be82aa6922432a", - "positionImpactExponentFactor": "0xd6579b433a10d66cea53361ab3fd4b674bc36ae60752875ea1bb45c8bb96460b", + "positionImpactExponentFactorPositive": "0x0bbb62ef772c2670114d9b8067e146d5cc37f7db94d9da544b31190deb90b8ba", + "positionImpactExponentFactorNegative": "0x9c5a2fb759a8d1378151acc22b493c799c4c13f9343fe593483bb35ffabaa8c0", "swapFeeFactorForBalanceWasImproved": "0x02db1c795da4d08231be629c36bdd0b0300c763404833b049786d618d4c5cb3b", "swapFeeFactorForBalanceWasNotImproved": "0xafc8b06e138caf77b195ea98c6b1454b3d1a80d39a3225b2ccb155c31a8562d8", "atomicSwapFeeFactor": "0x7b40bd1154f0c0b63a4a7e8d0b508e5ed5e8b6f36a99fa352b3d24383cce2d18", "swapImpactFactorPositive": "0xd8dccee431a28e96dad6b7fe8268ab59607042762992a7833e78b16764e5239b", "swapImpactFactorNegative": "0xbeadf9c02cf8cffd063af197414f3af86d3691554a06b63f4130db8e86501697", "swapImpactExponentFactor": "0x0d4f19104c2224d407664311bd165f0ca2089868a3cb81583973aba03af74014", + "withdrawalFeeFactorBalanceWasImproved": "0x39fae0441729d6a031da221fc6f7818dedd4a2c48d5e360734df8b2a8fb581c0", + "withdrawalFeeFactorBalanceWasNotImproved": "0x77a670dcfcc7c6e609447abb8fb536f62b218b32c53c1723d23ba43e2414954b", "virtualMarketId": "0x1ee40b7537bdf0fd26a566e83faaa901756983d19f549a403a4deb29725a3a96", "virtualLongTokenId": "0x8f92ebbddf51de9f1607c3d6748a858fab29822d139ddcd3b8f877241ce75e70", "virtualShortTokenId": "0x8f92ebbddf51de9f1607c3d6748a858fab29822d139ddcd3b8f877241ce75e70" @@ -3480,8 +3542,6 @@ "maxShortPoolAmount": "0x9b4ece24931dd25e81b16f9b2700df76f1d282ac1c4beb256ec8a5013fe90299", "maxLongPoolUsdForDeposit": "0x4a4137a960aa4797a57ec8a8a9bffec3800a0419971dd03427373de39457c6a8", "maxShortPoolUsdForDeposit": "0x059a0e6696c968abb14a5cd079590cb93937fb8087ab6bb1a3a101201985b634", - "longPoolAmountAdjustment": "0x5fc05a685199771dc59b47a7afbfa9a3c9e60146e7c25616cb4b2ea58ef97dc3", - "shortPoolAmountAdjustment": "0x90771367196db0c5a4e946fbac64035c1511949a5815e9832749e458b197bf15", "reserveFactorLong": "0xb91882e618a8a3e415adc7a39cdbcfbbe2cc26b1c3888c5dfd5ab68acf5969ed", "reserveFactorShort": "0x7771f3d16b8dcd5a6d8a8c1c56428ae338768650501908b7cb67cd0b6dbd59b0", "openInterestReserveFactorLong": "0xa8300e8f4b6caacbccc392642d709c54a3783d49aa519740b73b85bc7d8df7af", @@ -3519,13 +3579,16 @@ "minCollateralFactorForLiquidation": "0xda36895ddb7fc90ac64dc9ca121874177903db68868ec4aca2e26c9877083fd1", "minCollateralFactorForOpenInterestLong": "0x23d5a4de10d52ac5736f00723cb93b596ccb210a54534daf46984afe304838d6", "minCollateralFactorForOpenInterestShort": "0x1a58e0ba8fc5c636b76d61a8c60ec71c99b9f3745706c79766c8cf0dcafed224", - "positionImpactExponentFactor": "0xb9cae052e8bfcce30a99ba0cc4f0812cb630723820d72a1110b112396114aa81", + "positionImpactExponentFactorPositive": "0xd1073e4ebad6992a26b302d6658e9d2fb503fe82961ff8795a8366d7faadcb99", + "positionImpactExponentFactorNegative": "0xf5210057d0bc2236634c5aafb9b502d231fd3101c7693b8e9fc4b10335674b98", "swapFeeFactorForBalanceWasImproved": "0x49b65dbdf43ce39b69e841c6230ae6627ceacc9334c4d819b206a8b0ef2d8e6f", "swapFeeFactorForBalanceWasNotImproved": "0xf2ba731e689b507ae2035884b13ec6c67d222f165fba0061d615a11954f6e421", "atomicSwapFeeFactor": "0xa31641fa0e5934a15bde4d72e8cef277ea19728e3d27bbff3839f1b2292adfd5", "swapImpactFactorPositive": "0x9978b4eb0dfa425718a72f52aee70a622401b0ea0398043e50e286fade3369df", "swapImpactFactorNegative": "0xe602c87380a47190b95ca4de2c92202818d7e26fa1ca73c8e1005fe7f1d2ce7c", "swapImpactExponentFactor": "0x481f384180edf110580d4f79f24c4799599a39b2213198381bbe972e1d64d8a8", + "withdrawalFeeFactorBalanceWasImproved": "0x9b2489c9eae9743ea4992fa76ddfbbf55bc0acbca570595249c88ce2b5d8ae0c", + "withdrawalFeeFactorBalanceWasNotImproved": "0x645c81b6c71763796dbb2f9c1844836befa081f17ac86715cff00d554d77565f", "virtualMarketId": "0x056468869fcbcf8bbcf7b726adf30aea71c65d61a2dde85829d025ebd638b67f", "virtualLongTokenId": "0xa59040b7efb6b7122a74cb318a192ebc6732849dff5332ee3ba40b90dfa0a04f", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -3536,8 +3599,6 @@ "maxShortPoolAmount": "0x05598ea0252f22e4960a4e49ead7aec4aeca88f2419d24d4c2f1e716feb44486", "maxLongPoolUsdForDeposit": "0xb6caf755277c13afd74a5462065520082790b272ab64597cc64fbc4bf37a655f", "maxShortPoolUsdForDeposit": "0xe7bdc6a2c661f4199305e3406f92307216f45eefb0effeb89ec39c2637af6007", - "longPoolAmountAdjustment": "0xd942467dfa81165590c0580a3a64033941b1dd90c26bbb54c18b42b92fa860d9", - "shortPoolAmountAdjustment": "0x764480ff473502e42b573856ea6cd47b4180560aefa0d06c654033b74a15f20d", "reserveFactorLong": "0x7031f30e0b032d9c2585344dfa69075d500cd77f054df747614786dfb02c9218", "reserveFactorShort": "0x79f2662f5af9a48ed9fc6632789164d0f88553348da1c665bd93fd78e61c327d", "openInterestReserveFactorLong": "0x646efd7060f02bde654b8b3a32cea4d7d77d049f04a1b156c0462e329bbad53d", @@ -3575,13 +3636,16 @@ "minCollateralFactorForLiquidation": "0x4e67474f7d9ec9e7dfccdebd0892b8f96bc85a36a16a90e6c8e1a54e85c4817d", "minCollateralFactorForOpenInterestLong": "0xdc7d2b11c98f133ad856f4e38b92fae525d6a2ae80ceeb3b420e240dfad9849a", "minCollateralFactorForOpenInterestShort": "0x5c5f8d9af53545a1214654f78ad1e9a6ab37aecd5469c2e5c4cbcf8cd2e63551", - "positionImpactExponentFactor": "0xcc823670635973134c5087c8d47979affcca515532603cc92ebc945c51ed08c4", + "positionImpactExponentFactorPositive": "0x57b356770dc9bd2ebf5469e06c82681d0286e9c8efe5528f8ac025c3fac8a4ec", + "positionImpactExponentFactorNegative": "0xb425f558b954bf5d5e6f2264568efd85cef0d65ce83484b9f5cc445045152244", "swapFeeFactorForBalanceWasImproved": "0x014fda6121726da59e193a952cc3a1cfd31b925febc198a559b2cc1e4d27f819", "swapFeeFactorForBalanceWasNotImproved": "0x1a0c447e52ff673b57162b390edd27e8040ee4be5e52ea646e13630bf98457ba", "atomicSwapFeeFactor": "0xe7b3759bff35df68019e544ae31cdc1a6e3cd561db220208b66e655b27d1c681", "swapImpactFactorPositive": "0x2f10e629b89a4e353d8d563afb62870a006f03e0cbd77759101e3e646d7f9631", "swapImpactFactorNegative": "0xe6988279f833b1014b0483425d0eb061c1b244073b18b54d1eebf3a9de1f75cb", "swapImpactExponentFactor": "0xd4eea362f0a2ac992a6ede6c2defb41e3416cef42c033d97ff2ac8b70db7e3b5", + "withdrawalFeeFactorBalanceWasImproved": "0x089524aefa7495f4dfaf2e6682614fdb7e230c0284bf05425a5ea5f5042dab13", + "withdrawalFeeFactorBalanceWasNotImproved": "0xa924397c3d355a44d1aff00ff0108724ffd8cdbb3f0c06880cb4f5a6d4d72c46", "virtualMarketId": "0x773ccb8ee7deeaf0b761a6290f2317392066dc69ccf0e6b019722007598c5a9a", "virtualLongTokenId": "0xa59040b7efb6b7122a74cb318a192ebc6732849dff5332ee3ba40b90dfa0a04f", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -3592,8 +3656,6 @@ "maxShortPoolAmount": "0x60fd8899e9d8c59873eb62351943fa8353d3cb5c01e4e4930ee8f9d2ca9494c3", "maxLongPoolUsdForDeposit": "0xb1829172c867cbafe0e28440454f76d6f8fda2f2081740553bd75e86c75e93aa", "maxShortPoolUsdForDeposit": "0x689d10c40af7eae5e82b72140c22943c59ef5b0ebb9f09d8ae2daf96295233a9", - "longPoolAmountAdjustment": "0x0f082d041e3ae2a85bbb0310fd76ce5a4bb8aed09ca7cb8d7694da35512277b5", - "shortPoolAmountAdjustment": "0xbfdc51f7f2cbc1d9c9e36f96e47a7a06b9ab80daa6514749759fb6dc78c9dc20", "reserveFactorLong": "0x8ef363631a21ed0e5c86e8d2efcbb11571959f31b2b630c13e8803980a2f93d9", "reserveFactorShort": "0xd8da6bc0e6fa20d0641dda4ac9982576e311714f9526df49fa3c050c742d0564", "openInterestReserveFactorLong": "0xf2e0a7c7820ab0405f366b8cb2c9de19e3c3180562dd48bce308d9572b84eb1f", @@ -3631,13 +3693,16 @@ "minCollateralFactorForLiquidation": "0xa4dcc59c9562a3cdb7480e3bbd33b15e0a7272ccf9d3d453df784176ac492b18", "minCollateralFactorForOpenInterestLong": "0x632d6bc9d36199ead3660e1d54803d97147abc31e2cac1b18dd386d250f44a2a", "minCollateralFactorForOpenInterestShort": "0x03289b688ce32f30e096f9f305f6f1e4d654785db89ccc5a81812876233e02ab", - "positionImpactExponentFactor": "0x6af5e63b59afc60c71a45a325ded80a245d81947f6c9a9bff20d5f97e402fbc8", + "positionImpactExponentFactorPositive": "0xc6d9ebc56ac63a3f603f2a8ac0ab37837f0197ec9427849bf8ece90151d632ad", + "positionImpactExponentFactorNegative": "0xda4a61d3ff0163691a253adfc7053eece66898d9b658941b9327d5b199b8e106", "swapFeeFactorForBalanceWasImproved": "0x4f5ebafeb87725474637f4b264962f556c830765f047576f68ff7e5dde5ba384", "swapFeeFactorForBalanceWasNotImproved": "0xec05b3db52f1252fa492f3bfd694cbe7c6b86bfba73abfea88f0a55026e61f3c", "atomicSwapFeeFactor": "0x7d5cd589e9c54faead67eea92b39d394d3dee91b21670112950f08cbc2cee5f5", "swapImpactFactorPositive": "0x40d4a5c09e6e2f7d78e3dccf44cdd2813b205c5f57942264bda60aee2add42db", "swapImpactFactorNegative": "0x60918f5a146bcc03569cbf6e35e786a85e270d98a4db0043a431be58ecb5a3fc", "swapImpactExponentFactor": "0x5c57dc3f5ad0d71a0263608d9d0eb53f3b54328e7d41e272393409353c21bc90", + "withdrawalFeeFactorBalanceWasImproved": "0xe66ed02588c01e3098c19c371b72a18fad295f177c097c0b1beccdc14d1103eb", + "withdrawalFeeFactorBalanceWasNotImproved": "0xa2129d5277fa85ea40059048b855e387dd068d9e89e12b2abbb566e91c17c100", "virtualMarketId": "0x2e1b50cd933617e9a08cda4f3cbe390c1f17523a16453e477dd04fb28c7eb61b", "virtualLongTokenId": "0xa59040b7efb6b7122a74cb318a192ebc6732849dff5332ee3ba40b90dfa0a04f", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -3648,8 +3713,6 @@ "maxShortPoolAmount": "0x7d89a3943e209b3732d83ebc097063729100d5a708deeb56d5028c361aeaeefb", "maxLongPoolUsdForDeposit": "0x896dd418321aabb4c997192f624ffa2deb1f4b09cc72083e355c1858e84ec19a", "maxShortPoolUsdForDeposit": "0x4927dec4b937cd32bb0a8e9ad5e517409b85984dbddba57b2e32d51b039af929", - "longPoolAmountAdjustment": "0x5467477977d60019f4cfd11a4cbda8339c1f0cf9714f99e1385bcc6706cd14a8", - "shortPoolAmountAdjustment": "0xf5ec9ed33c862935af38550fbb934dfea0bcb41c87f4b5ae09b2323f9e5c95a8", "reserveFactorLong": "0xa4ce7688ed1a6a0002839ae78a5d098729f27751a20beaa7de493e47f2e25593", "reserveFactorShort": "0x3a1c03ace65da032ba0b103b4c96a76c9585c7fd0884d51c0bc127bbf3512fd6", "openInterestReserveFactorLong": "0x2ac1acf85d8502d449765acf34d804004066504c07d19e49b3ed0b0943602223", @@ -3687,13 +3750,16 @@ "minCollateralFactorForLiquidation": "0x373062bd389b4f542a94179cebaf0e1979ec7f3d420160cf1004f6599899fca1", "minCollateralFactorForOpenInterestLong": "0x635e26e9daa2510e295f35fa17f561563e7428351b9282c13d5c56878aa57f83", "minCollateralFactorForOpenInterestShort": "0x632cd25d22c65823f350addf0c66e3d333b599100702c61f455fd6404350eebd", - "positionImpactExponentFactor": "0x3d6458a712d40d0d9feba464a4d7cc2541ceaca6a3cd139baf5acedb67490c82", + "positionImpactExponentFactorPositive": "0xfa1b21afda0d4c3617450c447009d9b06349eb7ea72a3a0c3cc1baf6db611def", + "positionImpactExponentFactorNegative": "0x239d5d42e42d2e7c86786d0d7fba296b64ebc56a5136427565bcc8011a9e1a36", "swapFeeFactorForBalanceWasImproved": "0x07679aa91501709e499e12f6f80e0ee1b50c26cf4fe198f1d57b702626c8bc62", "swapFeeFactorForBalanceWasNotImproved": "0xe92bea4730d8e0aeddb90dc9ab5aaaa8c2ca3f9602b8cd47d3e73008fc60315f", "atomicSwapFeeFactor": "0x9ffb7fa432de58e38ffdd8a092e66367438d3c576f448a16519c6ea37a68e4a4", "swapImpactFactorPositive": "0xe7ce551847a9a3c438d4b9e7a4099b50291bf4ab3242383a4b621ac959238f8d", "swapImpactFactorNegative": "0x599c414476937eeb2a4b91d90d9ca824d874a17112d7a5b7a7a7a6f6aad5628a", "swapImpactExponentFactor": "0x83b84faad6af2797827d5c92195c971fd812696ebd930863f80db617fab45f4f", + "withdrawalFeeFactorBalanceWasImproved": "0x22d9abf4deea5a1fb61394eee37b293b1986905dd3b4cf62432e2bf7fbdf0dbe", + "withdrawalFeeFactorBalanceWasNotImproved": "0x38930bc050ce0ce565e085097c0392c2f624f520aba42e9d543638e233f9777e", "virtualMarketId": "0xd54671270c840ff5ed17ab95ed334f51e9ee4ffaef0500a61bc52a9e35e363f7", "virtualLongTokenId": "0xaab37f889b9680dda34f58a689de3023cb22f7ae14d32a3c1d45798a973db1f5", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -3704,8 +3770,6 @@ "maxShortPoolAmount": "0xd5d1a7c745f4d692a822f527e619e90959ad2821eee7d9cd64982d08422b0e78", "maxLongPoolUsdForDeposit": "0x9efe51b0c461330aec22128fba3ba9377798a90cdebc4478df6d65f2a87070a2", "maxShortPoolUsdForDeposit": "0xd16917d939da1f83f49d1c86e1fe7292cc4f155f3f4f37b4fd0d4abb503e812f", - "longPoolAmountAdjustment": "0xe7d14921534785e32c27d0047d068a68549e0ca412e0960b4d102adcd7e4b4ce", - "shortPoolAmountAdjustment": "0x973e6424f122e9294ddaa1f9e481e7b1bbeecdd7197328c8cb5ce7ac3a1a7284", "reserveFactorLong": "0x477d2d6888b0ec9422789f3d32564bc1b86f5c2276baa005d4fde7c7f25bdbba", "reserveFactorShort": "0x7b735e731231a020494a8b826986c141ea32c5fee7ca0bf3bc1f40e695c7a76b", "openInterestReserveFactorLong": "0x022e75996f1bd151d4125e7fe4dbb0302c1a492b3996ffb5735a509c28895297", @@ -3743,13 +3807,16 @@ "minCollateralFactorForLiquidation": "0x008138086200d4db7f493cd1697d2047828dee4c011532ed6d71a47f71aa6ca6", "minCollateralFactorForOpenInterestLong": "0xbc8a5091e0c1ff7f8b613fe045ad5ada27f7f46e2025bd0365840c89e99bbdbc", "minCollateralFactorForOpenInterestShort": "0xf612745ffdf98a5dc5d3c7043463ad56ee7554569609b8329755e5dac407e1cf", - "positionImpactExponentFactor": "0xb9f2ac464580caead32af83210f8ec22c484b3987a0f6a817ed0cb94f08e41fa", + "positionImpactExponentFactorPositive": "0x0867d34b86f8a00fed432d133eb24f59c801fb390fa6207b377ba4ec5ffbd701", + "positionImpactExponentFactorNegative": "0xe60d66586cf7d8adef5a9ed471ce317c9c1601acdf98bad01abdb15769040b66", "swapFeeFactorForBalanceWasImproved": "0x8607c2a1d0ee1c4c21a541044c8adb91d9a89509c6c861cd6b9a197f272bcedb", "swapFeeFactorForBalanceWasNotImproved": "0x67659dc676411b9d0f40e02dcb934b664abc8f22a45fd6934a1dfd6cfcd9deb1", "atomicSwapFeeFactor": "0x064cd155fd94e4059e207e32db7756c0097be19306c57bf61774e0a1024d2d24", "swapImpactFactorPositive": "0xc99541a0a2b9d346b58261c0f9438a8b0406a64d5bcd334a1b4671a81191c4a0", "swapImpactFactorNegative": "0x6d6b01ffa99d507be49eb5b27911ed5c7682570a8105329a96ac502a102003e1", "swapImpactExponentFactor": "0x9bd8fd6fdc873ebcce7344f40df1fe423538ecf2de56154af9d701051d301c29", + "withdrawalFeeFactorBalanceWasImproved": "0xb22227fc5a72865065cdf9948fc7dc0e5e08ccd788b1b564ac6f0feb78bfd539", + "withdrawalFeeFactorBalanceWasNotImproved": "0x8d8a07783a6a88035bb0d77ef57f0602e61ff2127e9aa80b266de72f44279d06", "virtualMarketId": "0x9544673f4807a26db2dfb80dd6845aefcabe4bb94e1ab66f453ea515a8f00cc9", "virtualLongTokenId": "0xaab37f889b9680dda34f58a689de3023cb22f7ae14d32a3c1d45798a973db1f5", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -3760,8 +3827,6 @@ "maxShortPoolAmount": "0x25b5d66509391f4977481197a4eaed6f9659ee5ce490d9c54ac7973e513ecc9c", "maxLongPoolUsdForDeposit": "0x3c60fe1df18a072de21f5a2f64e82b02451cc165f7ab02d176bc391f86e01a2e", "maxShortPoolUsdForDeposit": "0x9e87d4f51e0c5e1c25aae0cc569dd7d96b9455283d70b0d50cd2c623e16e7d69", - "longPoolAmountAdjustment": "0x578c471feff376eaa16354a173fd676724686a5dd699dc88185c270e4b381dc7", - "shortPoolAmountAdjustment": "0x80e7f8c4e4b5dc50ffa5eb908c9e536dfb63ac4532fc7fa31d610feb856324c8", "reserveFactorLong": "0x13ef4fbcd19aff7391aecff05bfed2df79e539ea1dcad877944a3afe67634774", "reserveFactorShort": "0xce5c029134fed3784bfbb439edca29c887b0ccdfb688c1e95b96fef1be6142d1", "openInterestReserveFactorLong": "0x5a14ba46de95f0808d08c3bf813876fdbf48fcf1583e42c57043b0562c2b6330", @@ -3799,13 +3864,16 @@ "minCollateralFactorForLiquidation": "0x41ba01e8c89c5d7646bfb600f8196c7bdba39101507971f06b9b0377054a7023", "minCollateralFactorForOpenInterestLong": "0x12be7656b291987a3022965d8be409d4ed7feb1d382eeec36e6d67225d120789", "minCollateralFactorForOpenInterestShort": "0x5c18aa8765ecd905d817d6f09fc2d40fc0793a5b3e88ef7e071dea5e352eea51", - "positionImpactExponentFactor": "0x1cda6cde74b36b50f765db60993e7a63bf269f5b217d1279cf5f84cefc42ab75", + "positionImpactExponentFactorPositive": "0x3adf9c635889dd095b9f5ba3c16c9809c11499634a4689819bee280ecfba09be", + "positionImpactExponentFactorNegative": "0xfeb9a0fddbdeb6a088d2b832e8e08adbd7efaca0771793c44f740ba16b0de663", "swapFeeFactorForBalanceWasImproved": "0xeb2fab73e9fdff0596c8c72b854279382d79404b4aade537b8b8c1dbf352f45b", "swapFeeFactorForBalanceWasNotImproved": "0xf589ab4da11879eaa7be922fbdb14ad14e6be45d55021a50ed0f509c5a5ac0e5", "atomicSwapFeeFactor": "0xd23b9d2924fefa998a226ea0487fa1d4c1f94ebe2e71bc8b03b027659190d2a1", "swapImpactFactorPositive": "0xb87eba0a263b57b8d2a7dff56d73ab92c164811cd1e56f479690b134e73821ce", "swapImpactFactorNegative": "0x21eb71230a7c89a8134055d6cd127bc1cbd69041800989e1a5ee25ee1186e241", "swapImpactExponentFactor": "0xbd575e96df4fd1e6eab867ee69312ea37c3b7ee3685992ad7b8c05035c439459", + "withdrawalFeeFactorBalanceWasImproved": "0x0ea054fd05e98e1de0f20db239f1b56bc5676cea14c929d991ac44254a346ee5", + "withdrawalFeeFactorBalanceWasNotImproved": "0xf7d15468d5cb4b5405fc07e6f6fbed83bf14fb7db1c1536ccc5d959007b28914", "virtualMarketId": "0xbeec1284ffea7738c9ba03703c385748b5107e01a45de9ab112945f3cb5276be", "virtualLongTokenId": "0xaab37f889b9680dda34f58a689de3023cb22f7ae14d32a3c1d45798a973db1f5", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -3816,8 +3884,6 @@ "maxShortPoolAmount": "0xc1c52f638aa5f71519cdb8412f44651bc5018b4c58409f0fa6ca86e1ad326822", "maxLongPoolUsdForDeposit": "0xe30424e477d263ca3d1dd3b1fd71789bbd3cf9a49d47196dee35bc6d8aa35d11", "maxShortPoolUsdForDeposit": "0x73a8ded6124100fdc99837e921c0b05ee5d44eb12e7645a9e65d2f47870c8c58", - "longPoolAmountAdjustment": "0x9e03d910b8af5d0fbedff8528c8a2eb48f170d9493509e01e113eb510a77b67c", - "shortPoolAmountAdjustment": "0x09ed6ab78c27a42b643ee402c986160ffd6de77281354695ba33d2a52eecdc88", "reserveFactorLong": "0xd50dcd2aae20b7a38b8f0c5a8f1b1b9937013eaed4ab8dfac6eed811bf4475f1", "reserveFactorShort": "0x38f10377348164230341a22a0b758594bdc6f82c715810800c9e6e0b291a6214", "openInterestReserveFactorLong": "0xf4174d318288df4f25a24f2c6c2982a51a7c48fdce4163edcd4ed339c4d27430", @@ -3855,13 +3921,16 @@ "minCollateralFactorForLiquidation": "0x9b94fc585564e4ce1edae95b097a9949730d58e43dbafd70e0a5c10203b6d9a0", "minCollateralFactorForOpenInterestLong": "0x561ab444da9e0a84f33004689eaee0620921f53832690234974beadbb2874c16", "minCollateralFactorForOpenInterestShort": "0x9fa2d3d66e68869a791c2035796e490049a5eef5abb51228c8c92aa66eb2abd2", - "positionImpactExponentFactor": "0x96e4e16197024832d8c5faa031a256a9ce1bc452407a2f713fbfb49a4ea1eb38", + "positionImpactExponentFactorPositive": "0x286aafb03a9fd40df1feae7973fa8ace9c64a5492f4334f8b3e4f1ed07359906", + "positionImpactExponentFactorNegative": "0xc0f2e45bac317e596031be1140b8d5cef88fbb8824cf631b58fe9d96fd38b746", "swapFeeFactorForBalanceWasImproved": "0xa6143605375dc242962140d0c9e0f878d85c68e51a3d8e88fe5a56ca06960270", "swapFeeFactorForBalanceWasNotImproved": "0x412275642d4466535fa1e10c5215a27411e8188aacf2c49e83198b5cdf636ebb", "atomicSwapFeeFactor": "0xd240a56b63cd3c73e77f4732bce5e8f1f988d267f3a144307ac69a9f9a5923ba", "swapImpactFactorPositive": "0x697ece2ce23e93349986cb04edc1fd3fb4307a573d679f243701ae39bb87132a", "swapImpactFactorNegative": "0x19c2660bf05157a6c1248cb90af79be47b7804b52b52bf200a7732aa186c43e0", "swapImpactExponentFactor": "0xea094e8717554b6c479bc2c54a4737c25970e30aec419bfc4eb801ad7ee57268", + "withdrawalFeeFactorBalanceWasImproved": "0x773b7c07c636c4e04abd485f1bcd0eec5c6941232dd62354c866b4ef364ac6f8", + "withdrawalFeeFactorBalanceWasNotImproved": "0xcab66b629b2f8f8b2aed9cd99882045e7b947cdecb8d6efb966e2470c22da666", "virtualMarketId": "0xc5e035ea1642e8e8bb5c391b503ade9bab3fd8596fff695f0a2b81c646dc6f48", "virtualLongTokenId": "0xa59040b7efb6b7122a74cb318a192ebc6732849dff5332ee3ba40b90dfa0a04f", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -3872,8 +3941,6 @@ "maxShortPoolAmount": "0xcce6024decc60f28248ac1e4dee9b701458abfee2defac304fad042920e7a08c", "maxLongPoolUsdForDeposit": "0x711e3fa6b2561089864104fca61ec7b5d9cd52e93347b707666459256716aa1a", "maxShortPoolUsdForDeposit": "0xfcaa4b308590a27c0f027c450db3a5e9aed2be7f6b857a4b29187855420aaace", - "longPoolAmountAdjustment": "0x6fea69394b97f6eaa17dffba7728778af32ca17ea5abdfbd12ac940167683a95", - "shortPoolAmountAdjustment": "0xf27dff609c59c893d95114d78d91a7b40918dbae93d6eae4160304e583da6974", "reserveFactorLong": "0x753227b46bbd78810d1378b6120b9b598cfaf35f39426be240bd7658769542d4", "reserveFactorShort": "0x149b460d5cad420f45f0985b5c77c2ee3c5bcc86b6992517c73eb1553d9e1f1f", "openInterestReserveFactorLong": "0xf3894d46b0b42c69d870c5a8ae144c9e53f57f6947a8e9888e6edf1fe9a3d86d", @@ -3911,13 +3978,16 @@ "minCollateralFactorForLiquidation": "0x3a606eb444659fc6d8703d1f4915560cd0e71813d3c824fbb4634c73002f3d62", "minCollateralFactorForOpenInterestLong": "0xcb36c8d66209bda963fcd3a7029ca669b114218607d825722851aa897eba7ee6", "minCollateralFactorForOpenInterestShort": "0x53c5a6626ef4a008718fb02907498f647eb955e8d2e9db15607b547a0e9e0d66", - "positionImpactExponentFactor": "0x6a63ed472aa0faeb03e4fe460e669a1671d1ca63f2fdb32c39f1c11786c97460", + "positionImpactExponentFactorPositive": "0x63feb555cf563abfc387cdc6ac7905dfc6cf286100bcc8b49bc244c9e4378c2b", + "positionImpactExponentFactorNegative": "0xe2fe21d43438daff569fecd386e4bc7da4838a416c0d5c8c457126b4ca832fe0", "swapFeeFactorForBalanceWasImproved": "0xea517b49e33c27e75463e484f6c8b1fa64d533a6148e33a64a825cce02e3c6ce", "swapFeeFactorForBalanceWasNotImproved": "0xa7d5519d3e5d0ce9c05ec4df62c4b00339295007b40272ed1284c5a9e47bd77a", "atomicSwapFeeFactor": "0xec0dc1c5be5c65cc62c6a41e7da4842a8b97475be0f2830a19705061d5d4c5f6", "swapImpactFactorPositive": "0x42aaaeae3f86b5e671a389d5b004816565f03a19ee4da5165ac22336d040cad2", "swapImpactFactorNegative": "0x33b9b4cb5a208b266e11de020970e508843c67544b51565d15e87b65c6aab0c1", "swapImpactExponentFactor": "0x06a8eebde08a6c76b4923730c450d72f3f7ee3bf564be64d693a846e46d222b7", + "withdrawalFeeFactorBalanceWasImproved": "0x4828c5a686af9107b3d6749fb080b425f11b92e3d9c8fb2ba23b759d18413068", + "withdrawalFeeFactorBalanceWasNotImproved": "0x50ccb6764a1b6f6f3279f299a6c03054072695c54ab775412656d13c26db5ac3", "virtualMarketId": "0x89441a9b576778a926aef80b72afaa689c63a0202d5934c75c4ea696083f09ef", "virtualLongTokenId": "0x6b7da6036245b3feede9511d4da4d25d9e6cbaa9041162aafc3d471509efca83", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -3928,8 +3998,6 @@ "maxShortPoolAmount": "0x41baa48207d91feee2f83ba99d58371ca408f44e3df0d657d9df2ac54ab87f76", "maxLongPoolUsdForDeposit": "0xac57d0b40ac6e18b25a0e9531a6d2850f88bbcb97326dd6dc06f4990d3e2e8c0", "maxShortPoolUsdForDeposit": "0x719c1ca037a0d32a3896f1e0d42929901f2cfd7e6865a5017736cfd8293e108f", - "longPoolAmountAdjustment": "0xb4c24cb68eb0c84e4bc0bc213a2ac6c51daca21fedf799632c3a35167d25c043", - "shortPoolAmountAdjustment": "0xe8122768d1707f3812c50a66c152c2b6d79858af45c4694b4d0b24fd256b4fae", "reserveFactorLong": "0x26d4c109df93834941aecf91476b2c9d2b0ca9824914e914ae63ee047ec6e4b7", "reserveFactorShort": "0x5b4180d1447c018ce62a3637ded3a4a3dbcec311567dc7cc935d8e3d397b0281", "openInterestReserveFactorLong": "0x64e41694d8d14893143612e0712e980d0f9bdfb03fbe2fe5f88d6828358e47b0", @@ -3967,13 +4035,16 @@ "minCollateralFactorForLiquidation": "0x67ae2314c7ad70da1afc2ff6bbc4ce36070db06a532137307b3949db7cdea89d", "minCollateralFactorForOpenInterestLong": "0x9b60006748c20ded25ebeb6cb5b8b4fa1637b243173d9721a4ccfbe3101e7de3", "minCollateralFactorForOpenInterestShort": "0x348e708289c489fd0cf6075ef11f4fbf37d202d578080b4cd5b8ca83b27d8dff", - "positionImpactExponentFactor": "0x5069bbbb356975f0360cd8b8e434e3eef837db18168ba1a35726ab20805420b8", + "positionImpactExponentFactorPositive": "0x73071f10e4ec4622293db3ee8ab7aa400cab9f044e4acda028827b5842ba37a7", + "positionImpactExponentFactorNegative": "0x59c777143125747bab20167a31097f991a92d91b60b97a71e42e335faaac5823", "swapFeeFactorForBalanceWasImproved": "0x2870d390da5ab2fb9809a727bb1edabb063250342120237e7333410a6c0685c7", "swapFeeFactorForBalanceWasNotImproved": "0x066947ada18828b53962d49069334357efc7942ad48f56a49ba67ad05f1492cd", "atomicSwapFeeFactor": "0x412adb54031393da1f49f36232cc914b0d967448a86304b21c03b564fd61ed8e", "swapImpactFactorPositive": "0xbe6bf34b093a711520a573026f4af33708c3df6b22ab11fcb08a211a8f3651e8", "swapImpactFactorNegative": "0xa04e19482a64c2873c80eee75fd5e05a21ea68458c3c31ba6514ceb2e6683954", "swapImpactExponentFactor": "0x4d2d86e81fee52bbcadc9b241d3f95a44696c92d2c6d839ced2571b341ecf432", + "withdrawalFeeFactorBalanceWasImproved": "0x07900d53ffecf3fcac44fb9fb08a6300de4d53d29eb9bde8c5646b11ed2e2c1d", + "withdrawalFeeFactorBalanceWasNotImproved": "0x4995fe26bac9b4cfc39d18f7c35a2f159e1d5f62e634a0a96398ba4c1e3d146a", "virtualMarketId": "0x7244e412b28a762651a838cdc1faf93f6c8b43dbb4a2b2574a0fb29f60c4ea59", "virtualLongTokenId": "0xa59040b7efb6b7122a74cb318a192ebc6732849dff5332ee3ba40b90dfa0a04f", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -3984,8 +4055,6 @@ "maxShortPoolAmount": "0x3a397269d0d05e003a1a6cdc27a9ad5a13b5e39f81563719691dd1f6d5482012", "maxLongPoolUsdForDeposit": "0x854e7f3b09663e3de3a1dd79716b6e9eac8009390192f992f208b65ca6322827", "maxShortPoolUsdForDeposit": "0x3dedd822b609da233d8d6f91274c723784ffbc43ce9d6fff2708625d5a69fda2", - "longPoolAmountAdjustment": "0xaf37261e50fa6cf7ebeee3d299cca99beb49ea7495e79ba0fd0f4caa9cf24dea", - "shortPoolAmountAdjustment": "0x8a3816a9536bc9fd99799a86e6ad050ab3615f07f9d5e8eead6d2b9b7fc13518", "reserveFactorLong": "0xb7a54ae72992282bdb12e0f0e7e6bfed87feacda9710e6eb335dfe69db3a5aaf", "reserveFactorShort": "0x240b7f3e894933052d3f4cabcbe633d530e45b4e6cba6e83eec40fbec642af7f", "openInterestReserveFactorLong": "0x534d9c08e4ea67a3cf35f840e06ac64bd86801d9692d3887d463721c7a7a31fd", @@ -4023,13 +4092,16 @@ "minCollateralFactorForLiquidation": "0xafc489671c1d4873473ecfcb310025d579c1c8ee4205d613c879338f160e3cd8", "minCollateralFactorForOpenInterestLong": "0x84677935537cfc967f4cc379eda203039e555599457a5abe92b8d3be4ff80edf", "minCollateralFactorForOpenInterestShort": "0x2d128850ff4630e5e64b78a9cc6f155791e11e268c1ee76a65a21a989aaeac95", - "positionImpactExponentFactor": "0xa5c274264328d204dbd59ba0c0c702d8968334ba38a54e107124afaacad4e265", + "positionImpactExponentFactorPositive": "0xa27fa966c9c662b5c76c6f71ad4588347e87f0a2877b4758a38fff124aaacc7a", + "positionImpactExponentFactorNegative": "0xa3396edcc328ba1a6652713776687e674a57ca9e0b20a2d71000219c2bdd5d13", "swapFeeFactorForBalanceWasImproved": "0x308a352f40b9c052ce7816de933a0a33bf97cc8e380329add568c24e7266721c", "swapFeeFactorForBalanceWasNotImproved": "0x9f6e5823120af6d9685bdd76e8b3305529cf50e322b43f7741bd5e944250a6fb", "atomicSwapFeeFactor": "0xb9c16ab0a352cd7cbdef66c7ec66d6f8c14b0d34563c4e7460065eecffb8422d", "swapImpactFactorPositive": "0x6e393cae4a648e5c019243aba3839b664048e7fe1cde4d352859420fd07959b4", "swapImpactFactorNegative": "0xc80a493f181476d72d586be4a7737108ccc7e4814d2219f4eff178a556f26fde", "swapImpactExponentFactor": "0xf6ae011706747949bc1e24692131acc79ed1463181bfde4014a52621ff41d7b7", + "withdrawalFeeFactorBalanceWasImproved": "0x1b5969948686f2e3fc32e8fa991c3239ca97db0848cb70658de4eab2783a20d2", + "withdrawalFeeFactorBalanceWasNotImproved": "0xe5533e2993cc206bda4a10051d2a035249102bab0e39e73f0381e1cf39b67952", "virtualMarketId": "0x339bfb15a41f866de28c4889a9d44418a6d8805a1510cda7247c81429938f692", "virtualLongTokenId": "0xaab37f889b9680dda34f58a689de3023cb22f7ae14d32a3c1d45798a973db1f5", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -4040,8 +4112,6 @@ "maxShortPoolAmount": "0x0d8e8348bbb7a151c21b401593372aeacdfdbb0a2ff0c6ac4545289ab3fc822c", "maxLongPoolUsdForDeposit": "0x39b702d82a7d4db0a908523e42e88ce80de37afc78349411541ec111e13d6ce4", "maxShortPoolUsdForDeposit": "0x298d58f72106eb55a9175d1cd95cb1662b709c390a732d7d1b68a2b282f08459", - "longPoolAmountAdjustment": "0x311639bb3b1ec814202ef36466e39a895b5d15db046536aaa536bb6ec1a7d9b9", - "shortPoolAmountAdjustment": "0x8be076acdf59e313036c9a98dee918c004155841c1250c66b3ce4d8abd43a093", "reserveFactorLong": "0xc4ddf46a291b679bd1f9524d7a402cc8c0e696f577868afbe1fa359ac09c5cca", "reserveFactorShort": "0x93b306059aa8aab2a8c0a909c53d0bad97216e7e65bd2c0cfea3e9b73959d7a8", "openInterestReserveFactorLong": "0xd65fda38be5b1523b6035cc75263efcf1a178d61719b2c0238921ab4d0e15f06", @@ -4079,13 +4149,16 @@ "minCollateralFactorForLiquidation": "0xb44f4b78ba17e0d1eff6125cbed7f5c6818e596f01fcd6aab2e739addb731706", "minCollateralFactorForOpenInterestLong": "0x6e86a14a179aecf4b9c5d905c249fb4e36fcdaa1976cbaf81acccc340311036d", "minCollateralFactorForOpenInterestShort": "0xe4d366912356c807f7849ae1df3147f1e7d208e9fc57e01fa4c2013876d14b79", - "positionImpactExponentFactor": "0xa3bd98ef7c63272fec0aae30edea3e455dd7d50b81934602367f7325466365d5", + "positionImpactExponentFactorPositive": "0x16f814fa1ce579e071030ed6d7d713b9d2374b98b9d727e64b83fce374520387", + "positionImpactExponentFactorNegative": "0xde546aae2f4a5b00dfb36e202790fbf353fdf4572b41bf96faaeeb18047e8c91", "swapFeeFactorForBalanceWasImproved": "0x13b14819e4af67beb4e9eebd58f4f859b45e51fd720169f4875c52069eaa93eb", "swapFeeFactorForBalanceWasNotImproved": "0x041dd49ae33ca7961f20bb8147d5da1eb80300c220f91b5bf5acc56d5ae6aba8", "atomicSwapFeeFactor": "0x86de7a3b9168b9558a4e968927972ae16bca2c45c79f3c6582d82ac1bd287cd0", "swapImpactFactorPositive": "0x3d6d4c367caf6195e2e17ccc844e61bfa11362e807edb31ed40c950aa0778457", "swapImpactFactorNegative": "0x630de465fa6597dfddf3012c25720bad36ddc1f3887a52037a864fb66dc66366", "swapImpactExponentFactor": "0x00622b30979575d1f66479e09f2f571d422345b18b2408762ad6506cf007dc77", + "withdrawalFeeFactorBalanceWasImproved": "0x4ccc2ccc9601f061a30fd29af1d9086221566d7fec84bd06e6bf1525918d605d", + "withdrawalFeeFactorBalanceWasNotImproved": "0x2eaacdcfda4b3e1038e775abb8143235c45c113594e59ca2ccdd20a040c8747c", "virtualMarketId": "0x63bc24412daebd15cd8f7892a4b8759778fcd669c83c2d1ccf5c2f70b87bbe77", "virtualLongTokenId": "0xaab37f889b9680dda34f58a689de3023cb22f7ae14d32a3c1d45798a973db1f5", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -4096,8 +4169,6 @@ "maxShortPoolAmount": "0xcf70bdd4fbee8bbd4654c2ae4af5f4fd7e251c9f5a862f9a2481959955b0b6d4", "maxLongPoolUsdForDeposit": "0xb5d88c08b31c00ec5cc87b19db5a1852eebd7c4b01fe9efa7cc3476b48f138b0", "maxShortPoolUsdForDeposit": "0x9a57eef25f7a0a3ce2890da326bc8b81c1101c0d981bef4d18f4a9fcad957321", - "longPoolAmountAdjustment": "0x6ea4d7c5fdaa905e444e63987d874fa0fb5cb9f4c019f1f3589b8d106e4d9a01", - "shortPoolAmountAdjustment": "0x8d8a6fd38d13f89ce794e01f95aeb6ff12d99f4d7c16dfae2e75b2c3902438ea", "reserveFactorLong": "0x37b873e996c7845490907e4cf943bd6a392730996e7fcc21334c4d8ea874d9d2", "reserveFactorShort": "0xef4935f61b86c4ddf5b716993cb89eb5ef9ea61a084d9c939bac218db6d3dac8", "openInterestReserveFactorLong": "0xb568716da5fd1eabd2357f07c5189d96ff8297ceef13e80410541f4adf8dd139", @@ -4135,13 +4206,16 @@ "minCollateralFactorForLiquidation": "0xca1ade249503a15c4b948131034294456c5786080676a30a2316606becce1605", "minCollateralFactorForOpenInterestLong": "0xc28f780855330cd16102ba6fdb7ab47699efa33c0df3fcef42a44026ab9cceac", "minCollateralFactorForOpenInterestShort": "0x563eda60ad895862bb3e4b14cfeb79a20588ff0aa5e3d5bdfb2ac34f5e66d398", - "positionImpactExponentFactor": "0x3db4ca02007d0bcac3d2f0cfd17c0750e24ba25b8c5eed37cf4cc5eca26ad574", + "positionImpactExponentFactorPositive": "0x55d421fd341e61835658fb121b56f62b9af763d3560d38435de8826a4b324fa4", + "positionImpactExponentFactorNegative": "0x7141bbf5fba1769cc6af6c03bd6e64a2b3267c8b1ee6db833006cf7e4d520d25", "swapFeeFactorForBalanceWasImproved": "0x1f03c21ebeb7b5ec284e3daaecc7cee0e823b4de3dc555fb313bc64f6e1b85fc", "swapFeeFactorForBalanceWasNotImproved": "0x79d8564cf98ebc7211cbbb5b36fa9ec46a18bf9b41c3b3ecedfd3adacbd145dd", "atomicSwapFeeFactor": "0x9ef96e052a9f2aaab829e2a1ef21cc3e919165b44193e112a554f2a07991f25c", "swapImpactFactorPositive": "0x64e9abf3ebedf7ff2796a8a5fa366a70364fcd4f119fb9d15666e657f73eb729", "swapImpactFactorNegative": "0x2e08c5b1453619c4951c31850c9f89a154d538c544a90b73e73ba2ef063c9f17", "swapImpactExponentFactor": "0x3e9cda3aa0b96b0b39289b63ac5d0926a101a403958094fd676b4716658b7a77", + "withdrawalFeeFactorBalanceWasImproved": "0xc40b22b4cc59ee816f793af1e47bf32046d1f261e75c3ec8d6c34b0e2a196746", + "withdrawalFeeFactorBalanceWasNotImproved": "0x1f13e0ba0a18d7b7297cc2ca35485b0c85d321f14beca563faa0d34e3ee41f39", "virtualMarketId": "0x5682928750f0e11d168db1a63e768c09aac514d4f41b13e933e0054b65df218b", "virtualLongTokenId": "0xa59040b7efb6b7122a74cb318a192ebc6732849dff5332ee3ba40b90dfa0a04f", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -4152,8 +4226,6 @@ "maxShortPoolAmount": "0xfbabb5f8725416281447fb92203a8fe5cd27017bc7b84dc4f03189509be92d4a", "maxLongPoolUsdForDeposit": "0xe6546e01b3314c96965a50df900699f70796b2765f5b966640a86a2b6a5f6967", "maxShortPoolUsdForDeposit": "0xdd9bbc7bf11c8e85b97fda762de57fc9c09bf330dec48f93aa50fa07604e4566", - "longPoolAmountAdjustment": "0x4eb9e76937cd4726baa493720dce4e74ba410a1888225593f06758267121d7df", - "shortPoolAmountAdjustment": "0x6413b581d4bc16b927ca842f927440360bc5d12104122dbb7c90bd165928ed76", "reserveFactorLong": "0x053a5d0338c5ca5d0e3eeb229e67d63720a3e31cd605745119a2daf5dffd9a5a", "reserveFactorShort": "0xec6f4cf53cea546a718be9f288679c80445a2b61d16e5bc33912a3bd771e6e0a", "openInterestReserveFactorLong": "0xa36d469b744fe0fd27e751e61ea6f8f16b54e13e339e90a9018beaa77042ecf1", @@ -4191,13 +4263,16 @@ "minCollateralFactorForLiquidation": "0xe5ff50ac9a0dfb0d5599b53e9c969ee858db161395ec92307f20922bc708557f", "minCollateralFactorForOpenInterestLong": "0x979afa01e39a53a0ee59cb19c28a83db1f5ecddcf336a44541738671ea529f07", "minCollateralFactorForOpenInterestShort": "0x6bd77d36ae31370d9b5b25f1b1a1301f9af23bfb9b7afbe1a76a2575570499ad", - "positionImpactExponentFactor": "0x94c1d7ae56d6ee75a8fd07d00a806ad9f19aca4164c883661e618f7bc589c887", + "positionImpactExponentFactorPositive": "0x3303e1247ab8a3def03075402ffc00117e05dc2cfdc988364088c122fb739b99", + "positionImpactExponentFactorNegative": "0x72081b2cb027a4d50b98b7e82f077df26893d98c04627077442036095526c7c6", "swapFeeFactorForBalanceWasImproved": "0xfda93cb94b8c430cc2c6a1e727953c276b7f78004466a98723415dc018dfca6d", "swapFeeFactorForBalanceWasNotImproved": "0xaac48c0c555c2263a72df8ed6ebb170df9a43485c970f655c433dd9bca37c935", "atomicSwapFeeFactor": "0x8628ddab301e77531e29770e6c0b85c34631783ca617e9ee2e618c086f3005bc", "swapImpactFactorPositive": "0x380f0aa935578c5e2efc586f4286a0954ecb8de9f0841a9369d5577638949f0b", "swapImpactFactorNegative": "0x24a92c575b4320d859d42a38cd8c94af9b78339d66e79ecb7423c253d8bc732e", "swapImpactExponentFactor": "0x16e0ff5fd356504437065f1903596bcc576bf46181ec5763a9f90411eec60b28", + "withdrawalFeeFactorBalanceWasImproved": "0x1777f662afc016a8541ba34fc58d627c63cd6470bde087060017e7214cd00a95", + "withdrawalFeeFactorBalanceWasNotImproved": "0x26ad757ffea5ef42952586c5574ae6343d44d46155bcc83bc67471f51dcc13bd", "virtualMarketId": "0xa4f6bfa2fc8974342c9acf364a7787fc9b5fb8904c3e545e9f70d97564846b38", "virtualLongTokenId": "0xa59040b7efb6b7122a74cb318a192ebc6732849dff5332ee3ba40b90dfa0a04f", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -4208,8 +4283,6 @@ "maxShortPoolAmount": "0xa2dc51365abf28bddcaff13d103e4e8e68bffc8b5c050aa88618847b659a15fd", "maxLongPoolUsdForDeposit": "0xb4c743cc8f6aa489645f46fe23cc4baad77ec26fcc593897da083203475f975b", "maxShortPoolUsdForDeposit": "0xb79d4d297dc6d4ffa7650b975726bcda43908baf1ad1d80a88b3e77d7f8cf30e", - "longPoolAmountAdjustment": "0x2283a4250a9826709d4f792efd00b3dd793f68263eca522f5c328582d7d747ce", - "shortPoolAmountAdjustment": "0x58be249e0fe9c0863e91946be75293f0f0682b3d47156bf9bf90d9d11420a8bb", "reserveFactorLong": "0xd012ce8a6ea32dcb8b1e351a2da5a9bd5020bf8166bfff6ef778c69b3dbd82b7", "reserveFactorShort": "0x5a09a6f2dc43572d27be233f1612989d14f8b3c96280fdf2d5f386566b6c7b0b", "openInterestReserveFactorLong": "0xa33ce36254a1f12520bcd6e570bfca00074b25d64cb50a847e6be0f513686b55", @@ -4247,13 +4320,16 @@ "minCollateralFactorForLiquidation": "0xa65f72041f4bc42656406438eabaeb3a83e9f4f38aae62c9ff8235d0e81a7910", "minCollateralFactorForOpenInterestLong": "0xc425f5ca4051c07b0ef0a474ce087918aff548677159081ce684e1832a0dbfe0", "minCollateralFactorForOpenInterestShort": "0x6bbbbf6814e4de22856022d7020a208a63c369ae1fea354d25df0ff0deb385c6", - "positionImpactExponentFactor": "0x528ceff820b2cc4de63f384e46d279050c14c12bbe069780248ca35209c7aa98", + "positionImpactExponentFactorPositive": "0xbfb5f24e30a9520eba87cf0a7d3ecb5ee51937cd47ab702aaa4c843e7032e410", + "positionImpactExponentFactorNegative": "0xa97feaba2621d096736bf9aebf93e0cad360eb3c3116c05a5b46d812946f3974", "swapFeeFactorForBalanceWasImproved": "0xce4933def7de695772ebb91c5f48e74ddb76b3948fad48b878dd02ba9caec3f5", "swapFeeFactorForBalanceWasNotImproved": "0x98ead5e154c29c07125c1e4e8cf110f5a0419cc47ddd938b394d97e787fa587c", "atomicSwapFeeFactor": "0x07eb2d60889510925c10701aa6384befe1dd08bb022b06557431c4910710f550", "swapImpactFactorPositive": "0xde03a55a07d901e98210970ac22f0cdf4cb6bfa89ac97a87aeb924e7382d4d8c", "swapImpactFactorNegative": "0x295a64c0d9cccfd469c2db10ea4fa9661c3c1630db9f753eb6d33eb59a7c34d4", "swapImpactExponentFactor": "0x27f090637cc766665ce9a0290f9ab38703f834afcee2cb6ff944556b43b9c60c", + "withdrawalFeeFactorBalanceWasImproved": "0xb709518876232ce178fb9ac3c6b365185900c350f80fd114075e8ca21bffcd0a", + "withdrawalFeeFactorBalanceWasNotImproved": "0x81a15b284baa0dd77fa0dd7aa05c70bcf2bca7209d9a64f4be9e275e9a79b556", "virtualMarketId": "0xedf48a26848c0291644a13152b4543d18967392cc784b3a61e6c2e99a7594133", "virtualLongTokenId": "0xaab37f889b9680dda34f58a689de3023cb22f7ae14d32a3c1d45798a973db1f5", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -4264,8 +4340,6 @@ "maxShortPoolAmount": "0xd7c329a347bb5bfdde958df486b777ea2fd01b1dab01c74215347dbafd56ffbc", "maxLongPoolUsdForDeposit": "0x88eca08c39a9759a46bf868ab4f648800052ffa6737a247e79b1a95022ee789b", "maxShortPoolUsdForDeposit": "0xe7935e20020cee0ab309c8c2556dfabdfd22dbb76e98bd44ef62b1275de65e78", - "longPoolAmountAdjustment": "0x172b75916fd19d14a2b77d29a5ad1211ef4fe275a7188e6b9c8dcbcbd1821d82", - "shortPoolAmountAdjustment": "0xfc7b344a79f0d4fb667b7e28ce0a9e7fbcc85073c82c6007a31570cb0732321f", "reserveFactorLong": "0x4f0fd8c73b2a1ed98fa99b1fd7508e2dae67c7015e72f94395a5a8bd5994e972", "reserveFactorShort": "0xcc7ce90de8f94adbacdadc3c6a245ee6e0c41e7f57afe19f3335c9e7f2e6a10d", "openInterestReserveFactorLong": "0xcce242c87b41ffeb295abf352d70ad2238bd5b92e0f3c7f1d87c66c484c46a70", @@ -4303,13 +4377,16 @@ "minCollateralFactorForLiquidation": "0xca9593cfa0c874962f22b8bb702032807b9427579010b042670806b64ab2df34", "minCollateralFactorForOpenInterestLong": "0x50d84922790ede06558e4ca6f2e96902c570c45e4f427cc6fcccdd32dddfecad", "minCollateralFactorForOpenInterestShort": "0xef11b410c5d53d8e576c956acea505ed667e5d34bb227625e99d6514bc07de92", - "positionImpactExponentFactor": "0xbbea29388c648439a26a387b35619908b6b708893ec6e3555a1f26de057e27ea", + "positionImpactExponentFactorPositive": "0x20b3818d40d686994f9b59651ffcacc5ad65e265ad1a78155bf8c8cc833d3d41", + "positionImpactExponentFactorNegative": "0x93b52e8c802a1d964ddaf1770470db37bbc530159ef84912b5563418b2d2dc9a", "swapFeeFactorForBalanceWasImproved": "0x8ef96c28cee73d45619581b8a28340afbb3e3f7d496d55e1ca67286de61e5f95", "swapFeeFactorForBalanceWasNotImproved": "0xdf8618a78eede905a9aaa8a5ae18211a6a6bdb3737d54f794c8a999f091c0729", "atomicSwapFeeFactor": "0x3989f95dc50e51405be5cd609ce63faeb462947821d280425454f5fff74809e4", "swapImpactFactorPositive": "0x77668158274b0da81643c91786fdaa3d98c20ae3ed3bef765d11798b06b5f5d8", "swapImpactFactorNegative": "0xb4e19689f59f1f7a32a01249c2fce76b3af38202f0259d90af683019f13690a3", "swapImpactExponentFactor": "0x0a8ea7ff9e9e32e140583e2600c881c51c70a415f40a8d918b040cfe77219fb2", + "withdrawalFeeFactorBalanceWasImproved": "0xcac357345c8f4be052f5732a74678cc915ea76758702900ebce54be1e5ae0b94", + "withdrawalFeeFactorBalanceWasNotImproved": "0xc805c144a5eb0df924c8d186cabbeba405c3f1e35a030301efbd9a3431297e4c", "virtualMarketId": "0xdd2ee378705b487a897a21ed7ec30f62e045230a427ef6ef9b7d0fa31aba68ff", "virtualLongTokenId": "0xaab37f889b9680dda34f58a689de3023cb22f7ae14d32a3c1d45798a973db1f5", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -4320,8 +4397,6 @@ "maxShortPoolAmount": "0x76176d228a5f526f628c587b826fc3d409c7473a2d7627aadaeb570918fb5f4b", "maxLongPoolUsdForDeposit": "0x766745711a9ef89a684e014f9b87c12ccd2a286004a3c611d43098574f45c04c", "maxShortPoolUsdForDeposit": "0xbf3bc1a56a2c0531be27bbbc6425a9ae98b577c2894f2aeb7257e06ab6cc896d", - "longPoolAmountAdjustment": "0xde955879d330579017ac8c9716d0adb9d111694d1e6ca51de3d494662239c1d5", - "shortPoolAmountAdjustment": "0xcab5fb532e3dde4133a26cbbd7aae6c93a65ebc1c3ee181d25826f1c71e55d33", "reserveFactorLong": "0x51549fb28586d2ac4b51476913dab8c54ed97ae0845a441670ccae23f25ef10d", "reserveFactorShort": "0xfb5378663ac7d1be37cb63de3ca0a46b8fdc6de1495a8c9e104a9ac1c16586e3", "openInterestReserveFactorLong": "0xf211dc25b2cfecf8c8948028c14157eae856a68f94247a9b530d826d31287440", @@ -4359,13 +4434,16 @@ "minCollateralFactorForLiquidation": "0xd2e092583c07aa062aed1369c062d31719a80ff6e75d84ddc76b5e6bc7826054", "minCollateralFactorForOpenInterestLong": "0x6d7fcd1f8264f3f59c707af933ec7782df25287b0b6b5f420a319b58b4886f7c", "minCollateralFactorForOpenInterestShort": "0xb605b4ef503f9544c442f94b2ac131cf5ee8da1d4e1316784bb9d7cce6d79138", - "positionImpactExponentFactor": "0x5d9ed32420efc0bcbf1596941636a999f62042da229abce2fdd8c931da675f9f", + "positionImpactExponentFactorPositive": "0x15248e6aeb24a628903266f05c1edaf255961b1c7e36f4e44ac7254318c39a6e", + "positionImpactExponentFactorNegative": "0xc4d8b450ee5d3d648b1fb215cab3c2c2764bd0175ee832d102b194beae114920", "swapFeeFactorForBalanceWasImproved": "0x062c0c2d730d24aa33c37d80bb065f727dbd4301b42a39c8d2459487d066749c", "swapFeeFactorForBalanceWasNotImproved": "0x00a2196092d604bf9fc2ea751e06405e37f231e0fff627ce7be4cabc40bf6ca9", "atomicSwapFeeFactor": "0xaa8b5f5925e8ddcab441df093f783c1d1c83bfac7ca60f14b8bc3b84c012f08d", "swapImpactFactorPositive": "0xe317742a7019bf37820ea41ad199bdf4a6252562c7fe43a71abfce8e85ab80da", "swapImpactFactorNegative": "0xa8e910e7748bd5c02441c6d1c9a77e48c61af20a8e089b02a61a90f7b6678acc", "swapImpactExponentFactor": "0xb6ef980b459b0fe90605c30cdb2084285dd6c2b7ef578e2d4bbdfe1ca5cf4fdb", + "withdrawalFeeFactorBalanceWasImproved": "0x1fc26dac9a716761df22e8dc96680111162630cfdcda54212a40582c173e9f56", + "withdrawalFeeFactorBalanceWasNotImproved": "0xffc1ec60d0798a420f7a26dc0348c499e823773bf55ebd6f57f718eb2863621d", "virtualMarketId": "0xc67db77cf7a84bb62e7714b446b692f84e692abcedecac64f168f18ee95ba178", "virtualLongTokenId": "0xaab37f889b9680dda34f58a689de3023cb22f7ae14d32a3c1d45798a973db1f5", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -4376,8 +4454,6 @@ "maxShortPoolAmount": "0xb6b9b0f700803cf50aa6f3166899fb1918c715e7fa1a79519643e60aaa242285", "maxLongPoolUsdForDeposit": "0x38b6cc3d1fd13c0c0228aa674329cdf313962c46aad99509de9c4f13531579e2", "maxShortPoolUsdForDeposit": "0xbb3613942913787bdaae0e6ed18f48ea73fd1e9fc7dcb618d10f46132e411116", - "longPoolAmountAdjustment": "0xd17f4a098114eca68358b4178373804e9a436a267eae107fea945d43cef6e697", - "shortPoolAmountAdjustment": "0xe931b2d08a415ad900c942077b10ef77c869247f74f5a434fa6c1d386d16f259", "reserveFactorLong": "0x6bbeca02090b626c246d62fbfd3c04c1e4f5c8bfe5c38ff3381b721ea60a462a", "reserveFactorShort": "0x5611cd4221dedf115921bd249cb788499f3447d929355c5ca386d03230b791bc", "openInterestReserveFactorLong": "0x111e11e591db9036dd6fb599ef8eb4d9f36ace2a197e182340215b75a783a3f3", @@ -4415,13 +4491,16 @@ "minCollateralFactorForLiquidation": "0xabcb9f7c66df854a36c97a3cb49e635446fb7a3c56f8ab8b55b39f68d12aafd1", "minCollateralFactorForOpenInterestLong": "0x94a978d635ef737465b195eec16b7f19c6f1bff0017c978ca61a17e5fe8b7808", "minCollateralFactorForOpenInterestShort": "0x2688ed464f128f747c02828d429a6aa3dccb40e2071454408f3296fbd87a16ec", - "positionImpactExponentFactor": "0xae78eeb8d250d69bc9255def1e262c819c19b3aac6ed2626248730ada04b108a", + "positionImpactExponentFactorPositive": "0x22a87926a1cc961cbe67dbcee102c7b7a8632471ce2664dd0b09602cd6386272", + "positionImpactExponentFactorNegative": "0x1ba55dcade2208dd609b345e2df590f69df64afb1e173fd2c0585429e2d10109", "swapFeeFactorForBalanceWasImproved": "0x50bf015e1af753131c148a7f0b5a8de5e482f08b30460d48e358105925cff626", "swapFeeFactorForBalanceWasNotImproved": "0xe248339af6d57cabcbf56a435449881c63af9318e4a9248d8d230f1596d112cb", "atomicSwapFeeFactor": "0xa3fa7dc8862b484cb29feed8cfe4dbf7538e686228f907b5d4d7024ea5aa1c3d", "swapImpactFactorPositive": "0x1404bcb3b37fd6c73c429f0b67f0326ab072e3ed1c832a41cb8b3ed7eaf9047d", "swapImpactFactorNegative": "0x5b5cb62ae90c344158744facbd2041a7a9fe2104d068c90945d76de7c5d7fc7b", "swapImpactExponentFactor": "0x6cad51d8abbdc78def03b61c8b995d2f4f8ffbfbdd71285b0bd2218f4fd2a036", + "withdrawalFeeFactorBalanceWasImproved": "0x24f008e1740a62d4f9819366659c260b7fe094b07f7ed6624000bf62439b4919", + "withdrawalFeeFactorBalanceWasNotImproved": "0xf4f336c5654531249a75d6244efee35b3c0c68fc238778296376a8f93aa49597", "virtualMarketId": "0xd31374b133f13e3512248d1d43dbbd7c418cdfca1de9cef16428625e0a1aa2c6", "virtualLongTokenId": "0xa59040b7efb6b7122a74cb318a192ebc6732849dff5332ee3ba40b90dfa0a04f", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -4432,8 +4511,6 @@ "maxShortPoolAmount": "0xa429e9cb87058f1fcffd10d718424732361722ca87e775091f6c548a8ae91bfb", "maxLongPoolUsdForDeposit": "0x33f8dc6bec4e1a26d78efa033acf9860d7aa89ff023b6b2e0f95d87676f11be3", "maxShortPoolUsdForDeposit": "0x2caeebc8cfe7811254efa312179c14b811a2ef4a1af24e46d7e7a4159df53ee8", - "longPoolAmountAdjustment": "0x80119f246ee87582f1853d7fbe2233c99802cb982f71df42bb0d18391b417f1e", - "shortPoolAmountAdjustment": "0x3089f95b2287218a48cce98e10e20e31840bf7b85e00ac0590e88cd020c765cd", "reserveFactorLong": "0x2dcbab083a185a84f79cf5b808498385a22101a657043e8d83cadb1d89b06071", "reserveFactorShort": "0x21dd94b5036f2104b97785fa1b889bbedb0bf993d2bb377f0df485f89d5dcd30", "openInterestReserveFactorLong": "0x91c71d24aa72fe5ac3e67205d8b0e3542531d9b0cfe71d196001be625e674fc6", @@ -4471,13 +4548,16 @@ "minCollateralFactorForLiquidation": "0xce9ba90c380212578833d426e036da7abf6c564caa45e126e5c9f3af3f39727a", "minCollateralFactorForOpenInterestLong": "0x4434267baa673353b931f72b997d623a8dbb24ad019fb1012b523e3445a9b522", "minCollateralFactorForOpenInterestShort": "0x6b1db050ad4883d52b32633aa49159bddd02262af4439b457a32cdcc5988fd43", - "positionImpactExponentFactor": "0x79bfdbb2346f830a4c8d80f29a006b0baa9367418902e8b3c93a1213c9eed125", + "positionImpactExponentFactorPositive": "0x1f4d0aa9ab2957082d793a2fbc6c8897d0eecb29141b6d350b2d9186130794e6", + "positionImpactExponentFactorNegative": "0xf4b7004829bdd9701e33a20627c6d201472881399e341c8dc8c33249f7cbdac1", "swapFeeFactorForBalanceWasImproved": "0x0faa1337b525b28e6422cd472df6548c0da443bc9077ed0fe6fa694f8ee772c7", "swapFeeFactorForBalanceWasNotImproved": "0xf9975025f98c1742bafc5964493e42785f56e6673592097971feb7aba4729a0b", "atomicSwapFeeFactor": "0x12fc02d199272ac56852e8a778bf732653628467efe2892262314456f4dbea18", "swapImpactFactorPositive": "0x107517ca8068a2882de0bab37ab86b35e91cfd63473089cacda01bc81f1c7daa", "swapImpactFactorNegative": "0x1e7d0f85278824210a3ce74721f888e34dee24c518278d80952dc9f1024b7f65", "swapImpactExponentFactor": "0x5c85d1cc64d3b9efcfab44480ef94a71a4456764663fdea9d64b006f2c0d809b", + "withdrawalFeeFactorBalanceWasImproved": "0x08313756f19e4ae86bc6b7825bb2f81011e46d42b2f15d3147e8496ff12462c8", + "withdrawalFeeFactorBalanceWasNotImproved": "0xd087f40f0354ea46c88eb6003b72bea45443a9546a06988accb60ed95693cc49", "virtualMarketId": "0x0655fedc3f9cdc09685dc2e0128e0d9d4b005fac6bdf26b24115db2a3c3b12c3", "virtualLongTokenId": "0xa59040b7efb6b7122a74cb318a192ebc6732849dff5332ee3ba40b90dfa0a04f", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -4488,8 +4568,6 @@ "maxShortPoolAmount": "0x16222256639b4d6ccf3a6b03597b59ad3bf62a506082fb69bea3637885ee4c97", "maxLongPoolUsdForDeposit": "0xd0307de55836dbdb6a47d81b8d65071b0f9f55c25f20dca79d3e5c6c083ae95f", "maxShortPoolUsdForDeposit": "0x47cf4be50b21bdb7871785368fc3cd780d0201bb04e60d361dbd5796e2f3ce4c", - "longPoolAmountAdjustment": "0xdce35ff080d31a35866b938d768a8a7ef0b577564dd53135dec25593201a8a17", - "shortPoolAmountAdjustment": "0xf214506793f28beed4ab9d0b561eb19319de31dd9dfe92749762540270d1c031", "reserveFactorLong": "0x0fb39179f678550ec8cd78628be345911f0dad3de6c044cb2e1d1e3af7cb70ae", "reserveFactorShort": "0x70a5633c8f3a5557e05c067668313f542cd62db233c68535380cd6e6ee53b0dc", "openInterestReserveFactorLong": "0x3819a2a46b58995b468d90fd858a9ae720c8eb54b374a63c6c7b1139ea222763", @@ -4527,13 +4605,16 @@ "minCollateralFactorForLiquidation": "0x54898fae937ffecc11f45b346e2c2d31190475b9cc7829e2801c3bd2aedf7953", "minCollateralFactorForOpenInterestLong": "0x24d067bde87a33817afba6f9159b1f879be5f907de489107e0e32433665c7c1d", "minCollateralFactorForOpenInterestShort": "0x970902c830d69c75cf173a1493daf4144604122b2f7b75fe359cbe15ea3dcd4d", - "positionImpactExponentFactor": "0x099e85a8f05448a4731818fa874d8796b78a9a46cc87197eef4bb972b10e456a", + "positionImpactExponentFactorPositive": "0x44daf9a134239d70ffccf96e03aed73eb4148355f311d128e6e461cffd751ac4", + "positionImpactExponentFactorNegative": "0x8968680d8707754f1610c8045604438a93cdb444550fd29eb981a651f08887e1", "swapFeeFactorForBalanceWasImproved": "0x440a965a2877911c4c99d8a22338d137721fc202a2d1e7ca75cdc9f094ba65b0", "swapFeeFactorForBalanceWasNotImproved": "0xc926687ddd09ffe9ac71036d2dc7f560dc5b6ec92d888c1cf3e6195288dd6e80", "atomicSwapFeeFactor": "0x7a0ebfae0537a6ec5958b1455006293dfae06de26368232249a3abdb986ab98f", "swapImpactFactorPositive": "0xa49e8eda8b34c14886ad044ddd88d3fa227afc72878a3c40e5d79a9528d0828a", "swapImpactFactorNegative": "0x5faab11fcfbefb319520e36256399baa608cde5c8dd19f2ca05aedf022d92b60", "swapImpactExponentFactor": "0xa6d25fa3b92b5de1e23bb759c281b102c8128053e311848ea83974e5c99e5567", + "withdrawalFeeFactorBalanceWasImproved": "0x979a77b625c29ec9457a43f370fc303f4b7980399db0c4a1d3854dc6b2e57da7", + "withdrawalFeeFactorBalanceWasNotImproved": "0xc5137c963c2e2c7cd853cd651b0ec45239b2bf757e9a9751c6c1c042891d8a9b", "virtualMarketId": "0x0a8df72f4de9281998f57d90942851f4a2600c041c072d7b058d217325b3d610", "virtualLongTokenId": "0xa59040b7efb6b7122a74cb318a192ebc6732849dff5332ee3ba40b90dfa0a04f", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -4544,8 +4625,6 @@ "maxShortPoolAmount": "0x8a414c56d4b3d487e18be6cf6ef7e942080e1b822d601511fa87a0e2325dbb88", "maxLongPoolUsdForDeposit": "0x295a953c777d120febbcbc87af83072d6504b091de3ab4ebdd8cfdae4489f4c9", "maxShortPoolUsdForDeposit": "0x308371b6da9be4802b977d1b404741fb1da2b96f72eb8651e291c686a0476869", - "longPoolAmountAdjustment": "0xdd19916d28bfe8203811341677c01212cb6d1d154d6d4a69fc6962da3e94c3d8", - "shortPoolAmountAdjustment": "0x2a55e5ad31e305a7e94028efaba44a970dcb0ccbaad2a8b9f9fab51f984ba162", "reserveFactorLong": "0x500250b31c8be66f652ed4fc1eda3c0bdfe08c6bf69cbee8a8a00e51d1f3eb6c", "reserveFactorShort": "0xf99bde5fc23f7c5d7106bc811944645305d4106b98b780030dfece42b8d12d7b", "openInterestReserveFactorLong": "0x85ebe3489e41e91ba4a992c33653b2a1464cbb3e8b03bed5bc2e4cd8abf69aee", @@ -4583,13 +4662,16 @@ "minCollateralFactorForLiquidation": "0x8fd4ed805960eda98fc4829e08f9615cd22bfcb89ca38d1947083ff245785e55", "minCollateralFactorForOpenInterestLong": "0xf2505508b048b3a9f6cd5d4f0f28decb75a374a948a988d270c8da823ffd628d", "minCollateralFactorForOpenInterestShort": "0xc3922e36cb2027c649f679b0f13d927854201b6e8c96cf50c664679c9ff837c1", - "positionImpactExponentFactor": "0x8d9148077d210c110220baff03e054b10b421a3f985a98fd1db1545c7318a3fa", + "positionImpactExponentFactorPositive": "0x63f94586912d3650660f295d929686a333ceb183a1c75343f0f6436059fafbd4", + "positionImpactExponentFactorNegative": "0x0af1d6a4c5be26b9dfc40176807cf11f039bbe3ce7fc39617fb034b1fbeddecb", "swapFeeFactorForBalanceWasImproved": "0xef5f72f2eb9555a8148a2e1401958032aacc197c1da4022f0ec23590e253b6fa", "swapFeeFactorForBalanceWasNotImproved": "0x95126626376b73774a4e8e523fb0db25be1726d1a0c5b08723b2efb6276b3561", "atomicSwapFeeFactor": "0xbe395a7e6a556993f306449f4d11f63501a384176881647c46a37cc23d327072", "swapImpactFactorPositive": "0xc131b1e245ee5a6f5be3d03064d8b0b6510fe566b50f6c0c7e65a42270eb68d0", "swapImpactFactorNegative": "0x20f8d97e59061e27885e0d392886682d392172249b499132c6b686874c2353ed", "swapImpactExponentFactor": "0xa8ce35d21abd4702c2a6e0dc32684d552eab6ec32667e545a36a4da5b5c3643a", + "withdrawalFeeFactorBalanceWasImproved": "0xd93b8e45c0ce708b2469f6230d4962ae45baef9bdc32a488934d089a0c27bbf2", + "withdrawalFeeFactorBalanceWasNotImproved": "0xd8e28ef987417fad51cefda70827b77c28e45d7f3c170c4b4b35132bb72e8df5", "virtualMarketId": "0x12d94e68f87fe646b48f6039c97a5869a30a9b85e2999f20b92a2d143cbeaa3b", "virtualLongTokenId": "0xa59040b7efb6b7122a74cb318a192ebc6732849dff5332ee3ba40b90dfa0a04f", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -4600,8 +4682,6 @@ "maxShortPoolAmount": "0xfb7c89a81c5a16dd534dfba4fdcfb0dfd505bfba1cd93017f43b118ae832add9", "maxLongPoolUsdForDeposit": "0x36a5da3a9ff7c0e36420581b664a695908c2ea24c33e533274356f1790c94dd4", "maxShortPoolUsdForDeposit": "0x39a0dd1b3a62bbaeaa409d231b2fc7acfd2a3b7d468f604eedb11d51b08318e9", - "longPoolAmountAdjustment": "0xceb97f365a708e666492827462b5d1992cfb8ed8fc38b4902225587ed64d482b", - "shortPoolAmountAdjustment": "0xc201bf04e1cfb3c28a23ad5ced1e59432920e4856ff5d11bf95c03eccb408ac4", "reserveFactorLong": "0x9076bc8f3b3cd2e13f2ebac765f53a5dd696e4d30e92fd48e83873bc3159c2e3", "reserveFactorShort": "0x9b73c8c0b6006722e300246d44f0bf1db66d83d0b67048a71ec8f3952315a7b7", "openInterestReserveFactorLong": "0x4967e41d1a742d367ef9de80f9c0aca1f4b2dc16cad71cd566031cbeb6531fc8", @@ -4639,13 +4719,16 @@ "minCollateralFactorForLiquidation": "0x41bc7acbf6580c7822c4f8242416ec35d9c8b2e50be1d5379221c039a8d1119a", "minCollateralFactorForOpenInterestLong": "0x4634662dada17c503986cce2faed9f7fc072f1051ebdd20db92b238c9f9ca03b", "minCollateralFactorForOpenInterestShort": "0x55718911d60d30d9b398b5790a01cfd8f83b42419d8e02cfaea4d5187c3f4b5b", - "positionImpactExponentFactor": "0xa44af56cb9b277271d9b9a56b3650c87c94903e5f5405288258716550afa72f6", + "positionImpactExponentFactorPositive": "0x834c3e1eca62b2605eb548c0cc4fedcb1ea545b49423d2b01d340019fc2d8aea", + "positionImpactExponentFactorNegative": "0xccf385354cc6a0022de64a93768e6425095de4dd81fbc8bab0031ce56d07ce2e", "swapFeeFactorForBalanceWasImproved": "0xc4ba621aee7406ad5aee070791330082eca4849f02c5b02b28c722866a81e489", "swapFeeFactorForBalanceWasNotImproved": "0x3a9540bbf96991551bb54d2f395b5549386da9efb15ea31bd2b2324ffeb59f1c", "atomicSwapFeeFactor": "0xa1424279e592282be92a583ce5c44f2eab6258665b0793dc39c5345a33a23464", "swapImpactFactorPositive": "0xa8ef70684dcb1134f6786ae9427f62a50b92c4aef310158cd0f006bd34075508", "swapImpactFactorNegative": "0xbf74a7204ca3863044e31f33237488f15c51f51ce170161904e97f6076dc6f6c", "swapImpactExponentFactor": "0x56e72f39cd45b35e0f8ccbe4c6b62a5952afde048a9fa2656d1e9ca3a67da094", + "withdrawalFeeFactorBalanceWasImproved": "0x6c6768f1b5b027969b61ff26432607f75d31c7b8d4f2d476f2f00aa4bbaf1d37", + "withdrawalFeeFactorBalanceWasNotImproved": "0x99f15d6d570e5a86975c561add2f920da384dc7e66ecc01b20269a5574cd0e41", "virtualMarketId": "0xd28c03f1a6932a52a0bf127b7dbcf62a023ff7dca52d44151f419f6657a4bf07", "virtualLongTokenId": "0xaab37f889b9680dda34f58a689de3023cb22f7ae14d32a3c1d45798a973db1f5", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -4656,8 +4739,6 @@ "maxShortPoolAmount": "0x7945ae548f6c69cd8dc4eb8c10ce0e7ef5ce686ab5e57f3c30f83f6b5e477786", "maxLongPoolUsdForDeposit": "0x1e89398e87f44d32fddfca1eb96979781452ea2a29bc786be0d13e8321a1314a", "maxShortPoolUsdForDeposit": "0x149070ed3a374d05f811d12010ebfd3db295dc975cd0c1c1616025a4926590ec", - "longPoolAmountAdjustment": "0x707911daff2effcc542d098a4f54fd1921922bdadf196613e845883fa11ebcbb", - "shortPoolAmountAdjustment": "0xe5d08867ee39ec8c5cdf6b486d524333534d638fa7b6de1db6c1a92de6a76cf5", "reserveFactorLong": "0x4e5b293f4ce2c2d27af2dfe4db6745525128dc458155f7451cf44a8a942109eb", "reserveFactorShort": "0x7c42cca6a3574a8d43a219da9a4b3b7d699cdf80cc2e74f825b21eed97137687", "openInterestReserveFactorLong": "0x6aa1c1d808a95d15f588c1458265a4e2e2dd6ec7043d902591ea1e54fdb484c3", @@ -4695,13 +4776,16 @@ "minCollateralFactorForLiquidation": "0x6ee2269ef5eaa11d456e4c5c24fcf4472789e05761bbccde7d124720734daca0", "minCollateralFactorForOpenInterestLong": "0xb2a7bec849de6c6b7a38d4d561e876a210dbebde36c0a50dc37aad9083f73647", "minCollateralFactorForOpenInterestShort": "0x08927937fa841003e009e8b483a7c0c26168f27b686c4bd9d2d6df5e5a0ceca5", - "positionImpactExponentFactor": "0xcfcb8341caceb9af4665161bc4a5585b88134830d36019917b0cc166b439155a", + "positionImpactExponentFactorPositive": "0x00bf1fd4d261aa68a267310d4918daac0c49aed1a4f9cf32d3ad722028d279cd", + "positionImpactExponentFactorNegative": "0xa05d6b3ca1921ed7d5860220ea21bbdf4fad0ebfeb23098e1bd6333c107cbe9c", "swapFeeFactorForBalanceWasImproved": "0xd18573dc8f2a53bf9106216a900f943172999abf8f4b78c32a02ffb16fc9bb1e", "swapFeeFactorForBalanceWasNotImproved": "0x6c9413f2853edd95a6752ced7c2bc05d4a59510e00f373d505f141630abbc5e8", "atomicSwapFeeFactor": "0x8523c99151414acbe1151e349da6bdad037043215e785e5ddaa7ac7536e34e11", "swapImpactFactorPositive": "0x0466561a2291ccd4142344bd5609995bd96af67dda47cc7c6477b160d5fa60a4", "swapImpactFactorNegative": "0x463b2d08a99a0fbee14d053a2dbb048bf69fea6fa054f72852401d083cff1e33", "swapImpactExponentFactor": "0xca5db13289c957c3b79f07e49d87b20546ef63217ec61a192141de7e9e0663f5", + "withdrawalFeeFactorBalanceWasImproved": "0x4b2948ecdbca358521359634267d410d38fadf54b7c25c39e0ffba212f27260d", + "withdrawalFeeFactorBalanceWasNotImproved": "0x9632c29fffa5c05787a827711a35c18d1d23f0c598d0bed2af376d25af7c87aa", "virtualMarketId": "0x9bfab2b19467f690a2c7d7a2ff79f023153dbf5544a93501c14c5936fcd75632", "virtualLongTokenId": "0xa59040b7efb6b7122a74cb318a192ebc6732849dff5332ee3ba40b90dfa0a04f", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -4712,8 +4796,6 @@ "maxShortPoolAmount": "0x3a62c3ecc3bd77bc6ac9cd711f02b737a57957fd92f4ff4991e344a3cc2d9e90", "maxLongPoolUsdForDeposit": "0x5b8f631e61e2c150cbc7216f1294708b77f7ffb5ac0ddc77e49e39d90973cd04", "maxShortPoolUsdForDeposit": "0xcec2e1dfcff690b41a286cb908f8ec7e8d477eb0c5a4137df3ffa03d6b8bc1d0", - "longPoolAmountAdjustment": "0x4828e328562b81a0de9c9c1643b8d78dc00b3f1aeebf9bc2ac063913b360869b", - "shortPoolAmountAdjustment": "0xc59ca141127bbc1e0c05ca53f0a693b7753f2eb40e82e4a46091f5c6822ceabb", "reserveFactorLong": "0x04b4bf4124bc2c435a8322257b69201f3faca69b4b41528b66c3ece775ec7599", "reserveFactorShort": "0x3a6c9a54cb408352534a7cc18c5d7609255660fc230a8986f083a4aefd03e685", "openInterestReserveFactorLong": "0x1b0e072734b61aafae0aa4477d30d3142dff83557526128e52921aa980795fc7", @@ -4751,13 +4833,16 @@ "minCollateralFactorForLiquidation": "0x8ed79f4e6d3d38bfdfea170a01f66193eb1ad238a766ceddb168e3621d7eada4", "minCollateralFactorForOpenInterestLong": "0x8c69704d7ad8d47b8fc79dd9f203c622ac43de9aaa60e25de14b70468e2d9b25", "minCollateralFactorForOpenInterestShort": "0xfb46f190074aa0025c421e05d226229b80b32da2a638dc566c0ee9b31a62b25e", - "positionImpactExponentFactor": "0xfa76ae24b59f8ccb8233c444e1d247e8e7dd78cdb2a7e1ba29dfbb782c4d00da", + "positionImpactExponentFactorPositive": "0x81aab054881c17d723a26c486d3f317f5a2d263edb392d3e69ffbae400391af8", + "positionImpactExponentFactorNegative": "0x7c4ca6be97da8b9d62efe02e9301c75a0e33c637ac6a557b25cfb9f0b24dc548", "swapFeeFactorForBalanceWasImproved": "0x9108de9102344a53cfaba2ef2d276e027bb6b4051c3e818d7ecbddfc291f9e1f", "swapFeeFactorForBalanceWasNotImproved": "0xac6ef53ecc38b138b10d39e00eeabffd9e05f54cc9903fe59702b86960bef8c5", "atomicSwapFeeFactor": "0xfb5cf4b45d7ee1149347aeb46aef578efd22e69901f21d1f4092a2a870c59a33", "swapImpactFactorPositive": "0xd6c74362814ea6fd65d9379cfd8fe06f850ac287b75940fd77e0bdc45264edcf", "swapImpactFactorNegative": "0x1db488bdc1bc0726b938a5242b366c388f4ee2152ebfa088e8e35bec3646688d", "swapImpactExponentFactor": "0xcc4807baa2417c31f1cb6b99b84cfa7be11077af4704aa12415f80c2ee7c50b8", + "withdrawalFeeFactorBalanceWasImproved": "0x946d867ee0f48f9de758af51cdc5f3e8dcb8633dcedc731a071ba8d927454197", + "withdrawalFeeFactorBalanceWasNotImproved": "0x58c40adc4bc951a2634ad3f35485825457c5ad865d0fe5d49635c2d51922d720", "virtualMarketId": "0x646b9cbcf92ff6e208db3b2e7267e1a70f08248b5233dca10c246d857ca6be9f", "virtualLongTokenId": "0xaab37f889b9680dda34f58a689de3023cb22f7ae14d32a3c1d45798a973db1f5", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -4768,8 +4853,6 @@ "maxShortPoolAmount": "0xaec9a45bc874244034c2ad2857b2a3259e4dc3d552e09965b25f7e84da58f32b", "maxLongPoolUsdForDeposit": "0xeb5ac490d65718b3a24c76fb1965ee15280d06647768fae12dccdad0119fbf42", "maxShortPoolUsdForDeposit": "0xc1cf5052c31e50b5a66421b14d44a4e31d178c402a09b54bc6171746e2529a4a", - "longPoolAmountAdjustment": "0xca88d303fbee247afaac509fc3d02a8ede2a4b390cf945179c533d9e17bf61d9", - "shortPoolAmountAdjustment": "0x9d46fa266c44ce0a39150b67fc950ddd69255adaa00990372c35d11e8a5beba5", "reserveFactorLong": "0x4f47da17a37d7837b3dd2621065be3fb526b5cd6ea6039f5bb22ef6e164fc77c", "reserveFactorShort": "0xf992c464eadff45eb6c9103dcb095407e1b4be63eeedd2714e581d6c5cb91ab3", "openInterestReserveFactorLong": "0xc111b6a58504211e22ab86879f175bda0ef2079b56ac91917f468a9309214ef7", @@ -4807,13 +4890,16 @@ "minCollateralFactorForLiquidation": "0x426ce46062a702d0d68326ca347a1fa5d705087d2b43789dd0310835cfdaa74a", "minCollateralFactorForOpenInterestLong": "0xdbaf0c15b855b2a4e1a68a581469b8c5d15f803cdeeb711edb1640fd38715903", "minCollateralFactorForOpenInterestShort": "0x9500d9c8dd829f81ebe5f3ce2e2346a105d682ef0a0d35b37aeac9aa198cdf04", - "positionImpactExponentFactor": "0xe0b1128fdc394a8c3371e2492ddebebe5899f40de9d868c640a7b65d7bdf7626", + "positionImpactExponentFactorPositive": "0x2fbcc040afa49bf2b9871da4f489176362feac22dfeeba1410687c6877664222", + "positionImpactExponentFactorNegative": "0x50cfc6f5e8b6df7845a40b19c8abe9fb4c20e34bc34d9284dec1cf0eb5643544", "swapFeeFactorForBalanceWasImproved": "0xf7babb8373684c29ab67c7c832c6c4b2c9b94b8a48076a67d20626bb86628c7d", "swapFeeFactorForBalanceWasNotImproved": "0x4f1228c156db69f770af6b10bd34a80b2fef41dd296f68fb8ae17e9f3dfe963a", "atomicSwapFeeFactor": "0x31d209dbe461712a524e488388590e9540ae49400a417ef88110f2a7a977d43a", "swapImpactFactorPositive": "0xb0b789da107bc523fb4849e8957a7d3df09235a6b2850f32e32fa6c800fd2d13", "swapImpactFactorNegative": "0x3bdfc565c4eef3a98276ee71419fdc582ba1352266adce60e15cae7b1ab6a3a0", "swapImpactExponentFactor": "0x2150168ec28af7f2a71556e78768f46722025ad4af9a7ea8963b9476a4057d90", + "withdrawalFeeFactorBalanceWasImproved": "0x9d63a648fc4fed805a0de516d3c0315e8d24e51580dfd088a35d064aa652044d", + "withdrawalFeeFactorBalanceWasNotImproved": "0x473700e0d73edc7f0609f1e115faba713f71e447e3e4d5f13b0bb3f8bd986b07", "virtualMarketId": "0xc3cb64939a0fe2585e655310db6325240adf5db6d3f8a1e14e40ea4d8c97b680", "virtualLongTokenId": "0xaab37f889b9680dda34f58a689de3023cb22f7ae14d32a3c1d45798a973db1f5", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -4824,8 +4910,6 @@ "maxShortPoolAmount": "0xc9577666dafcd72418eb60bd26a2de1fd9474e7cf6d33a00450fc9352f6fac71", "maxLongPoolUsdForDeposit": "0x7bbe4dca750ce372f626f319110737665f10e1b4acfcf57d399557830796e233", "maxShortPoolUsdForDeposit": "0x042311f216cbc8d64c84b970d4e0a3b80df8b5196612f1f73fb34102f80d3378", - "longPoolAmountAdjustment": "0x1a9bfacebabd4cb9b5da041b000aba3f5ccba2e95b664be2cd3da904e8e729dd", - "shortPoolAmountAdjustment": "0xf00763aac312f4f805d5ed15698c4c7c43d4de960942a7a0c71ef620d71dc53d", "reserveFactorLong": "0x5a4bfd5d74dfb1505b78c9b78c3cc98e80e3163dafba129990c97afe6493b65b", "reserveFactorShort": "0x7d0d95a75ee466f326a296cd3f41a25acdee9899f77edebffd698572d066fa06", "openInterestReserveFactorLong": "0x1be139bf5400292c13c9bb69aeefec3a71607b28001bb9d0b189ac6d4210d440", @@ -4863,13 +4947,16 @@ "minCollateralFactorForLiquidation": "0x79931b37d86fd4e1c24760f0d9c923458a505993af2db87ae125d2fc1d3b69df", "minCollateralFactorForOpenInterestLong": "0x2a6d115de938ad85af12ca1d26a0f6644a2fe0599b2ab86f8acf87cb5624ae5d", "minCollateralFactorForOpenInterestShort": "0x1ebd2256b3e588b811528c35ae535b13a6318727480afd98deddbc5642ccbc3b", - "positionImpactExponentFactor": "0xb245771c3ae81dfd3366eedd6e85e62cb81ded22f089f674bea08570fc61eb0f", + "positionImpactExponentFactorPositive": "0x1b08b1a8352916017a31e19b1f472a5bbe5026c23cee5c2a9a6ad2f9626ddce4", + "positionImpactExponentFactorNegative": "0xd8f3d22544060d73ae41f764f22e458d6c66f83bc2d4ce04754e318cc8ddfe29", "swapFeeFactorForBalanceWasImproved": "0x80dd606da911d750d12feac8732c5a270c3c995c4ca3d3e54079dbac2379b81e", "swapFeeFactorForBalanceWasNotImproved": "0x383121b58b83900c41c948bd2c559ea94adb05b4056fd61bbad4c59e84769e7c", "atomicSwapFeeFactor": "0x4f9d4884fbe826892eb18a9bdc05b6e6dc722527913d699264560a50c0939931", "swapImpactFactorPositive": "0x4bba0afab3bdd086e0cd858248bfc9a06b6a3b70331b7d26f8a7bfa935a4359f", "swapImpactFactorNegative": "0xb354aac74baaf2cae90e78e7317392d514e57f555419d292ed80602fc3024b5b", "swapImpactExponentFactor": "0x3b626f7eeb3d00ff95435218d2281154df74f515871c5010bb41b615d661ead6", + "withdrawalFeeFactorBalanceWasImproved": "0x31efb36e1ccabf836d4c05b259ab03ecb3f8ba0e43a2dad5fd500d5a8133e9af", + "withdrawalFeeFactorBalanceWasNotImproved": "0xd23bff588701095504b664589b3fc92221c12a7a1ad3a4111e22c1c28b4eae79", "virtualMarketId": "0xe490a941923b41502cc755ca86b51323d6f8d70df4cb7fde8dd2fd414120c7b4", "virtualLongTokenId": "0xaab37f889b9680dda34f58a689de3023cb22f7ae14d32a3c1d45798a973db1f5", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -4880,8 +4967,6 @@ "maxShortPoolAmount": "0x46f1ddcf1db79f7de7f47db9e446c9bebe37bc832ffc22b86b2d486cc923d083", "maxLongPoolUsdForDeposit": "0x55bf3fba6701e6bc184b9a8be55c013094cbab20a0f80fbbfad87742dc88a348", "maxShortPoolUsdForDeposit": "0xbe48025d93d804b71e7d0e6eb833b93bb859ca72d9628c9bec9e8f8f2442f190", - "longPoolAmountAdjustment": "0xed2dc69741dce989df6498bbc1d9833e94efdd594d69fae8243e92a0e8c03a20", - "shortPoolAmountAdjustment": "0xc2ea08307318387a3056a25b95ff9ad3464b41a0146ea919f606ef104516d557", "reserveFactorLong": "0x6e1e1ee781d28806c8e9fdbda5a0549f83816c35730a96de6ffa648e57a41167", "reserveFactorShort": "0x2a4c0746c4eea79b07c901c5bf9159b54a55fc79a884c1ef8ab840a79379456a", "openInterestReserveFactorLong": "0xc1e49088f6b665aab620380747216a5eb6f9e364f5a8b25119c869b18cb3c395", @@ -4919,13 +5004,16 @@ "minCollateralFactorForLiquidation": "0x53242e803c0bb6381c1b5c42a8fcd00b54fbbe85995488a7a5dec6f225a5e5fc", "minCollateralFactorForOpenInterestLong": "0x52afa3711c1e690c0bf7e156928aa8384c28f540b26fc9b607b05ca73c18bfd8", "minCollateralFactorForOpenInterestShort": "0xbad6087b3466806fabbea91fd5fc6f95036dd696fda16dc077d0b562c1ea1889", - "positionImpactExponentFactor": "0x0b1c98df3775838da85a0fdc248a1cf9af5f8bd89a1a352595f658ee771f879a", + "positionImpactExponentFactorPositive": "0x4137e3f2e86b521880eca9a9f6dc1e0eabe144d700bfda2597784fb91c737ff6", + "positionImpactExponentFactorNegative": "0xea0ebd3b85d0facc363185db216e9a2f4d3a537b35cbcf835d15defe6afd2ba6", "swapFeeFactorForBalanceWasImproved": "0x0742e3f8db96ac05a07e004082428d900b556728a65c070a50e583aadb586cde", "swapFeeFactorForBalanceWasNotImproved": "0xb0bc201c5b3d7ab2b6ae7430be01c9c0e53c7c22156ba22a14e00d5c4a0e44ef", "atomicSwapFeeFactor": "0x5ac6e757ce8023173330912b9cf86157c369be3398b55ba4a7c490064fa6a5cb", "swapImpactFactorPositive": "0x05b1fb95bc342c7618a883a763fbbd253740020c12568b3c5841032ee9a91fb8", "swapImpactFactorNegative": "0x282f8a9226a14b7842f6da9a0232abcd867444a585257987dd9f5335a699b1be", "swapImpactExponentFactor": "0xf12e162b0a4966f0b9769f68c3f3ed70f23caa0dcac8179962db95bccbbf1d09", + "withdrawalFeeFactorBalanceWasImproved": "0xd5d06ff85490800efe6add493c903b7ad1e9d4e8ea40b8e9cd264f7d711f53dc", + "withdrawalFeeFactorBalanceWasNotImproved": "0x02804ca893df035921ca5285c8f6900702382002c23397fd14d17116147e73eb", "virtualMarketId": "0x6cc33f61b23e39024011f4ef3b29a1ac5040cc0b0b1e7e879f90f5a536142ad3", "virtualLongTokenId": "0xa59040b7efb6b7122a74cb318a192ebc6732849dff5332ee3ba40b90dfa0a04f", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -4936,8 +5024,6 @@ "maxShortPoolAmount": "0x8cb5d7533c40dec81cb83952142852aaf60dd4de259cbef5d84bca9d8e7e05b4", "maxLongPoolUsdForDeposit": "0x6f956443409da8be34877d16bae0e28ba398ec7faaa289b17187104c68ba1227", "maxShortPoolUsdForDeposit": "0x901e985de7a8be80fb492112e6ff8e73e8643399d56dc558af3f0fa71ff3757b", - "longPoolAmountAdjustment": "0x06486548446d487486ca44833c29c8996a9c48ae030e25ce6a9bcaa6c9ef61e2", - "shortPoolAmountAdjustment": "0x6168b4e4efe6ca8a7926560b97cfc6062cf561139f4bcb80a07c45f17e34ddd0", "reserveFactorLong": "0x2b2a2e18ef35c21b1d585f64d191d58e6ae6f78aaa746441c698ef902bc609ce", "reserveFactorShort": "0x67e6d0a23faaced9d1c3405af40573f79767f021ac02ab5438d3f865fdeceb0c", "openInterestReserveFactorLong": "0xe9e582f5b857962164478a78ecf838737e0cd83a146a5d74ca8c7c9dd4c51fed", @@ -4975,13 +5061,16 @@ "minCollateralFactorForLiquidation": "0xad6053c2d0c04fd2f4bf6806e2dc774d14481617371e602cbc76a83e6bb47d6f", "minCollateralFactorForOpenInterestLong": "0xa7fc29d21ee4ffceb464f9889c70a3c5f92c8c48dbd5ffc824f088dda4b7515e", "minCollateralFactorForOpenInterestShort": "0xc50491facbf7c3258a02e4353a0a8ffe64cc09fb4e9b86c8128e56b23b86d861", - "positionImpactExponentFactor": "0xa4552e9093aea5811829cf3a7fd9fdf23f2e84611cb07ff5aa35358e0b63be97", + "positionImpactExponentFactorPositive": "0x94753733cce08e82e51fc15f65b018bcef24387c14030247a320248fa8e221aa", + "positionImpactExponentFactorNegative": "0xb5a58142221569c3d9ba5409b4ef2215855ee1fdd52f805dc61ae6c82f0159a6", "swapFeeFactorForBalanceWasImproved": "0x193d6f23c11a79d96b193a6e7cf4b05bbb7992031f956951ce396da8ff34812b", "swapFeeFactorForBalanceWasNotImproved": "0xc6c49c25a6e5ba44da9722086f13b338b228602a55b3f441cf9e3088ae7bf488", "atomicSwapFeeFactor": "0x2d9e442b1a976ff0bfc39bce6bc7316886f81ca7027007be437ef906d687f99f", "swapImpactFactorPositive": "0xb410710dbae13f219397473794d9620624cfe337962ea6caa4a702e0ee64f15c", "swapImpactFactorNegative": "0x789b271f70ed1b702855f3068f9d21c8443b15374529527d1a2c45c1cb7664fa", "swapImpactExponentFactor": "0xfaa7cc800a5f080908196db817b1c00d6453eecca60a3854e890979ba0ccc5a7", + "withdrawalFeeFactorBalanceWasImproved": "0x4f80766c38057e4337471c816d37970ef03031e9db8b204d9951a7bc70931c35", + "withdrawalFeeFactorBalanceWasNotImproved": "0x402c327516598b79b8c15235099661a8607b6604d63152d7ce611fc1a0d15f8d", "virtualMarketId": "0x19b776cf74673f319867c1568f4c4ebc7e1281d5d2ed2086ae981688eb1d2a54", "virtualLongTokenId": "0xa59040b7efb6b7122a74cb318a192ebc6732849dff5332ee3ba40b90dfa0a04f", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -4992,8 +5081,6 @@ "maxShortPoolAmount": "0x975de1e00f08ccd6e7d1f36d81d8fe6412f4aa3153ff54a8d6bac526a4919492", "maxLongPoolUsdForDeposit": "0x00b050a9c31535f12754bd4964dbce29c8eae93118ed7cdab517d87bf31fe215", "maxShortPoolUsdForDeposit": "0xb02bd9cf66731499f398b81cfb7e350a38c4d959bc2e19c830491b058d600d56", - "longPoolAmountAdjustment": "0x3c2cb687c4c347b6e8ac0b5fe07c11b17f9c7434de5bfd71aecebc6c4221e6ee", - "shortPoolAmountAdjustment": "0x438912ccc28776202be53e38ab74aaebf25b1c1a588e5c98e8ab628093a29e79", "reserveFactorLong": "0xa327b81440e2867aa7c0b7735adb5c5bc15a8b99bf7212620ba346ae8e554adc", "reserveFactorShort": "0xd9615b2c8bc192a185e08f75443987f9d372812b50583602604fcd4f76a32a6d", "openInterestReserveFactorLong": "0x25d41fd475fca423f259f9f045ccaaa1c8e095dd1aa3dc1d5a4ae00a0fffa689", @@ -5031,13 +5118,16 @@ "minCollateralFactorForLiquidation": "0x7571230a5a26f9280aa55776430b802d4ce0c4b1f31edc7d7323e1fb55654fe6", "minCollateralFactorForOpenInterestLong": "0xb31a483d7cacd648d5b1cead2934dce80ffb22bbb0b1b5eacf4f680e7a7f51ef", "minCollateralFactorForOpenInterestShort": "0x9ef84ecd0f238d5e66bd19a337209e1da9e3e0c64cd87235d596cafe0b151459", - "positionImpactExponentFactor": "0xd39d36b5e26e0afd6b2bf7741114b6c4bcf6a7622e6234600ac9eafdbeae8fcc", + "positionImpactExponentFactorPositive": "0x5bfedad42d77675d1b4d7ade830a98452de266ae943fa26adf6fc238d24945a4", + "positionImpactExponentFactorNegative": "0x195cc1f6424431be88f216aa2711e5c80014f8c03d20d764a672921e534d5fb0", "swapFeeFactorForBalanceWasImproved": "0x418a49be80d3245ccf3c39d463131554ab2a57384eea5a6c25b22516862b90b1", "swapFeeFactorForBalanceWasNotImproved": "0x83e5cb7cd6c5e665bf17311da7f373e698f0da5dd2a33a7cfcf0e383d4b71d20", "atomicSwapFeeFactor": "0x3f94f7663c8911ea518a485ce2d6502e19cd61a00dd5da82b412a37a16ab296d", "swapImpactFactorPositive": "0xb1a8a4e762d68aa90bc460f82724feadceb7c265b17e612e1c139b531db2d0e2", "swapImpactFactorNegative": "0x281cb6561593d80eabe053a76d638d6ef11760761af38ca3b1157d4549682d91", "swapImpactExponentFactor": "0x12ee03428639bfe3a2ee1e5e61f67385f449a679b84b4e70c550b81852611a4d", + "withdrawalFeeFactorBalanceWasImproved": "0xa329a69f1e038dc61f4f362bc64828c436e3b9726401865d61f1f21f8a9a4d96", + "withdrawalFeeFactorBalanceWasNotImproved": "0x8d5f1c17d35db5a24a140824af722fc17eb27d1b8d7eb9269a722aea29d5ac1e", "virtualMarketId": "0x4d20cfc9516de2a8e7c84f7eda56eda0c266f196478fb425a0bef534bc05a279", "virtualLongTokenId": "0xa59040b7efb6b7122a74cb318a192ebc6732849dff5332ee3ba40b90dfa0a04f", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -5048,8 +5138,6 @@ "maxShortPoolAmount": "0x131b3ff2353105c286a95e93e26c245640f9b3417997836689a91df3d1af5942", "maxLongPoolUsdForDeposit": "0xc85a1e47e93ab6eab8b2566df237eb739fe01b3d296e8c5f89f43fdeb2dc4e6f", "maxShortPoolUsdForDeposit": "0xeffe072a8c71be2a22e6d1093c1c90e81bfd6b21cb32dbeab7b75acb19c36a55", - "longPoolAmountAdjustment": "0x26480c8b98de8e179b05d08b43465b52e8fab475827ba6987c8f30e3be60d23e", - "shortPoolAmountAdjustment": "0x6ee420c8738e03a48c1964bf0989c895f70ca8d35ab07c103d6b5069addf15ed", "reserveFactorLong": "0x5ccd01b6246b5e77bb154ca1e49591d1d4fe051f9b6cd041a9c1ea1e14c6f07b", "reserveFactorShort": "0x5c49479ab2c5dfd3ee3e5262b03a5e996a06347a30a2419f2265d74181354871", "openInterestReserveFactorLong": "0xde87ebb3eeaf4a62a7c71dd6acd14922613632b824b1987f58b7ef621b58bdbf", @@ -5087,13 +5175,16 @@ "minCollateralFactorForLiquidation": "0xdd3da19ef77fae0831f70db252ee293b55b7beefe26610364d751d7a2f1ddf13", "minCollateralFactorForOpenInterestLong": "0xb053e44f2c73e33aca860160ad83dbae4c866151a88752a096ccbfc939ee4f34", "minCollateralFactorForOpenInterestShort": "0x9fb05f1825674751848bb279e1cf48b08f1f14a3b67e0a3ee96d3b205d19317c", - "positionImpactExponentFactor": "0x69ae7b3841a987747052ea2f11ea3220e78baeabd7a874e37bbbedae08219fff", + "positionImpactExponentFactorPositive": "0xf143d960d65689bc686038d22d45955e32cbb9a6c196f10db7ee32d86d97fc87", + "positionImpactExponentFactorNegative": "0x034e00182e3152ab1242f60e55dd6db43698b6512ff46c90ae6866d1b2ddc330", "swapFeeFactorForBalanceWasImproved": "0xcac43dbcf0982c139a541622f069cffb4bbf7ea35038dd0e0e1774e68d651ac4", "swapFeeFactorForBalanceWasNotImproved": "0x44e45b505ea06e2dbd3b023457dbcf31fa94e16db1c9163282a8ab43da206bbc", "atomicSwapFeeFactor": "0x257fb617aa6332d157ba1a605067b1e5c4c977a630ffce70b44a35e07bcaf599", "swapImpactFactorPositive": "0x783b2e4266df71eb217aae14be4eb9048958ede5620cb605a584fe56ffd31d5f", "swapImpactFactorNegative": "0x90d6976cdb86e2983cf7c8bef8d922c7484275d6a7ad3511a5c6083dd00363b2", "swapImpactExponentFactor": "0x017ceefc4d7ac3c3767827541c967ca7649960bdca7b3fd74d66398a585d3140", + "withdrawalFeeFactorBalanceWasImproved": "0xc3c53d60dd70f93ec84f9c35751ae5e3f94f95d9a7978ad075bcf136b4d79ae4", + "withdrawalFeeFactorBalanceWasNotImproved": "0xb841824c663eac4a3d860eea36d7e5b18ae58a0bc590c8e7535a641f638b5afd", "virtualMarketId": "0xfb87b127d4425b91d7ce98276f4f83c0fbc729931ac9970b70bcfdf75e9c92b0", "virtualLongTokenId": "0xa59040b7efb6b7122a74cb318a192ebc6732849dff5332ee3ba40b90dfa0a04f", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -5104,8 +5195,6 @@ "maxShortPoolAmount": "0xdb67ce505f21a763fea9ca65b8ab5e787af17ef79e369ec7663a839689141c5b", "maxLongPoolUsdForDeposit": "0x08ebac6c3787d4c87b3109ea4c45f2542557df9e05133adb606ad458399efc1a", "maxShortPoolUsdForDeposit": "0x1b4cd999d90e9ca89f6378d301ab1be2af539bac67e5bb6154974b7ee62f209c", - "longPoolAmountAdjustment": "0x95acbfd3661c1535125f3ff855cf4c7319190cb778b97b4cab302fc308d3eca9", - "shortPoolAmountAdjustment": "0x9e89d74c6906a7a2f5bba5e977c8c19b1b1b09f7a89477bd3cfa4735a3bb2aba", "reserveFactorLong": "0xeda57004d0cc33fe02c44078c8a6a81aebd43ae454d4b8ed321af954fcd8b63d", "reserveFactorShort": "0xea340548e0a1e5d5b2090671a8772ffafa38196ee56687c30f34234f1887ec74", "openInterestReserveFactorLong": "0xabb71a094a3e2a2c4235e30e06c4839431540b8b0b15c0f7a109e36ffb7ef7bb", @@ -5143,13 +5232,16 @@ "minCollateralFactorForLiquidation": "0xa3d3e18739ebfbaca88f4aad3aef6b2545f949bae4d37af025a2f9ca18b7e555", "minCollateralFactorForOpenInterestLong": "0x3ef566215c8b99506a5a252199891cb0268e97e592bf0ac06cf6f4227258e4ff", "minCollateralFactorForOpenInterestShort": "0xab8d10d4912c00f6ee77fe9a2647645f124c1a076ba799a9d32382c16fac6183", - "positionImpactExponentFactor": "0x88a12fc0b4f12aa16021c7d1cbf24aa3cb512997c16b75286a220b8c2acec260", + "positionImpactExponentFactorPositive": "0x02908df715df73e135892835629e5865a2de278450a0c10f3d10e66119c86816", + "positionImpactExponentFactorNegative": "0x7649c99449f606be48563af7472ecd900ef538c4dc449daec339064912dc3d24", "swapFeeFactorForBalanceWasImproved": "0x538b28d4395db6f7986920bebabc342259c741dd275250064091172e3a1ba3d9", "swapFeeFactorForBalanceWasNotImproved": "0xe33673a8bbeb4f161224750f72466fc71c54b98eedcfb0cf4564d00af44802a9", "atomicSwapFeeFactor": "0xac103d5917eb45342dd0844a5f1a394410222832fa4bd37010dec98599bf0419", "swapImpactFactorPositive": "0x82d479352029c855a3a6f904eff05a6539b3e0551b966ecc6e94ca3961b93df6", "swapImpactFactorNegative": "0xfba5946dca51e3c75530429ce15e40f13589f63992913fdcc7398620eb0ac04f", "swapImpactExponentFactor": "0x4dad2505786bab6abb6c04b01c892dde2bd8ec44ddc7fab696e67c3a02f63f99", + "withdrawalFeeFactorBalanceWasImproved": "0xcf0518f9591aa58732c63dfab460fa46f8f8614017ab92083d9a6c6cfdbcfcce", + "withdrawalFeeFactorBalanceWasNotImproved": "0x9c781f9c0b6846d85e33c3997ed75dbee2fa604ab2db8a42f5d53c82a56d3f05", "virtualMarketId": "0xbbbd270dd91a5b63926aec58111ae86f2d81bd9f6904f6be6fd081c667536fb2", "virtualLongTokenId": "0xaab37f889b9680dda34f58a689de3023cb22f7ae14d32a3c1d45798a973db1f5", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -5160,8 +5252,6 @@ "maxShortPoolAmount": "0x88c95a79a9ce658479fbabbd3d195bbd712c6b8500cfc2f50b5d682f1f976513", "maxLongPoolUsdForDeposit": "0x7bb2e926e4040d59e076c4e7886cb59428feb980f3f70a4cfdb9662cb8dbc094", "maxShortPoolUsdForDeposit": "0xb9dd74d5b412d999ae018760d24d67c81820201cae6373273399b43dcb3028b9", - "longPoolAmountAdjustment": "0xe629e1398a0e0989d5d850eec94b29af7417440c76387729c0a100902daf32c0", - "shortPoolAmountAdjustment": "0x54a05ce81a2d1ef861827e4692e600b5d1875b273c1ffee73cd0555c98ff7e71", "reserveFactorLong": "0x5882b99348210551eeee11328bd6dab495432650cc2eb5712298e8f00634e2d8", "reserveFactorShort": "0x0191a2dc68f2c7f796c7207c34a876c869a8342df196841808cc79ecf1e1773a", "openInterestReserveFactorLong": "0x39f731e8c0400b06cc09b2c96f7bde91c0663181491af17c03683cf5519da15d", @@ -5199,13 +5289,16 @@ "minCollateralFactorForLiquidation": "0x65f68a9afdb78cf330f681dd96e9cea7d39629c5298b7a0f26259e82af911a15", "minCollateralFactorForOpenInterestLong": "0x4ec50614ebee32276c869866bc29cda2f0cd3b6a0fc081f99f69ee62d243e577", "minCollateralFactorForOpenInterestShort": "0xa50de0ea17ca06f721f8aee0270ba6d29ff8987b3fe48e2bc8202575ae5da998", - "positionImpactExponentFactor": "0x35a3fc88d59ee55f461e3670e8bd83296076ef3453ec9ff6d2ec2250672413e9", + "positionImpactExponentFactorPositive": "0x0ae6b8f9358bb39dbfb1877eead8dc3982618d82009f6b4a83b35d564846cc02", + "positionImpactExponentFactorNegative": "0x240ad764a1f527127e8316e3cbde2d954b3819914c04ad7011919ce7d5d80df4", "swapFeeFactorForBalanceWasImproved": "0x2f63ac0203354e448324c4c48b6247b2ca26189fb244c7be4493adb4a519fa74", "swapFeeFactorForBalanceWasNotImproved": "0x94f5bfca9defc2b97fa9c4af15ff2291ae956179af9176bfaeace643d1b9014e", "atomicSwapFeeFactor": "0x7145c82f6478f400a52394760ae7578902572c92402adfb4907050d831b263d7", "swapImpactFactorPositive": "0xb39cb4a6fec85abc09554145dddca153c0bdb62ea84c78a101cf865bb41600af", "swapImpactFactorNegative": "0x4f54d9254ed13421d3335dff4dc71be5e038becb36096c26cbe5ed106ddd29a1", "swapImpactExponentFactor": "0x8afe4a6b3d24928755222879f5c9617155461607fc17eb8151e97c77e68543db", + "withdrawalFeeFactorBalanceWasImproved": "0x6abc4900f3b23ea026940ccb456239d2639854642dd74af336a4d1dd17277d1d", + "withdrawalFeeFactorBalanceWasNotImproved": "0x6133736aefc0dcd7252b6e618c3e2efeb3a3963ed7a3deae763bc9f44e618c1d", "virtualMarketId": "0x841d6a5e65217b9f4c5d5930926b8c7799181bb476c2262cc74e391cfc3dc0da", "virtualLongTokenId": "0xaab37f889b9680dda34f58a689de3023cb22f7ae14d32a3c1d45798a973db1f5", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -5216,8 +5309,6 @@ "maxShortPoolAmount": "0xcd11796bd6d8efb902d2d680cb6aaa185762e4a3363ef3203b4a64d5b8705a37", "maxLongPoolUsdForDeposit": "0x41bbf7e9fa92bc1fa0adbd708fad2733703cd54292bc8918d7a92ba1b38bb015", "maxShortPoolUsdForDeposit": "0x41bbf7e9fa92bc1fa0adbd708fad2733703cd54292bc8918d7a92ba1b38bb015", - "longPoolAmountAdjustment": "0xcc6503e59bc1fd405e1fbbba231bded1c8302678c53b9ecce57d867259eac21b", - "shortPoolAmountAdjustment": "0xcc6503e59bc1fd405e1fbbba231bded1c8302678c53b9ecce57d867259eac21b", "reserveFactorLong": "0x00ca128c81161b52e421d1a2874cceb4784ed57c30921a8bd2e14da0087cc590", "reserveFactorShort": "0x31a5f37fff18491c052c8efc056d5399c5face6ac5b87058773f64f96474f593", "openInterestReserveFactorLong": "0x84ebaecbdbb2725d046ade1d02ebbce86822ade1b43cadec02f888961d78ea28", @@ -5255,13 +5346,16 @@ "minCollateralFactorForLiquidation": "0xc1d54cd6c502588af1cf73aa199beff47eaef8600505908f837db32a8c3d7c65", "minCollateralFactorForOpenInterestLong": "0x0d6d3a35635ecae509baf03a4bb1d7cad458d3bfd2980159e523bea0d6ea36c4", "minCollateralFactorForOpenInterestShort": "0xf090c034ca785ab99c12d5ae9fbdc732314f990a1821df63431eda6c9df58a8d", - "positionImpactExponentFactor": "0x6a7b0300adeb1279e72e90b8afd18a03b01d904a230a6116d1a3dce3bdda711c", + "positionImpactExponentFactorPositive": "0x08c54b0f14e3bbd424aae5f21a7f48edf82bce1ed8c04c47e85ffdaeb8ad1bfa", + "positionImpactExponentFactorNegative": "0x2eefe91e7762d257a361e704013de0923c3beb31b72a1f31eae678a5af0c1686", "swapFeeFactorForBalanceWasImproved": "0xb90a30595a23271996d72f1b7bc8f2b216242596bd1f66ee8e23c7a899460ff6", "swapFeeFactorForBalanceWasNotImproved": "0xa7968fd876b4080577b846dbe984e4127995ca0e8bae0fd202ed896c64c7302f", "atomicSwapFeeFactor": "0x3684560ccb2c25d736f4092efa5f8dcd091fa6305a45791a05db22943ad479b0", "swapImpactFactorPositive": "0x92c1d29cd0ab89f325ad3b7e195fe5eaaa8f81e3f77e4e828a740710755ed9b4", "swapImpactFactorNegative": "0xda142786efd0995a5c792b7ab292fbe984014b7ff1b0c01b57c8702fbf092c70", "swapImpactExponentFactor": "0x609a7ba5e4455d511a629ef21e614f2ce5d45e87a21d2b58dc542ca9acf25dd5", + "withdrawalFeeFactorBalanceWasImproved": "0xcc8250b8a24b83611c46d9618f50f1b9c117b39774cc8b76e24f4caa5bc28a45", + "withdrawalFeeFactorBalanceWasNotImproved": "0xb585d5b9c9f99ce4132c604248466589b5e5c3c9fe94c21f5f50bb50fc234888", "virtualMarketId": "0xcc54dd35697602e276f35d33885783e1b5046e3a2a18cfaac0859856e3f93098", "virtualLongTokenId": "0xd75a55ed2ecea1a03f2ca36bf769ceee55b3fcaa9c02f4cf863518485ed4918c", "virtualShortTokenId": "0xd75a55ed2ecea1a03f2ca36bf769ceee55b3fcaa9c02f4cf863518485ed4918c" @@ -5272,8 +5366,6 @@ "maxShortPoolAmount": "0x3b46d8649c1a98d1693492c569f0a7f1029bfb293aec9b3fd4beb13c22828e4b", "maxLongPoolUsdForDeposit": "0xf36e787e6a204238649d3ed5a43fd11730464602f2ff0568250f3a7412a1e243", "maxShortPoolUsdForDeposit": "0x79242f1dd9cf9f73a82a9054c075ba5f2297920597e26872dfd1cf908ebbaaec", - "longPoolAmountAdjustment": "0x4c158e0ed74165f0ff97898bc12a5713bbcfecf2d7e160cb308875fae60c21e2", - "shortPoolAmountAdjustment": "0xb9560b341a395847d5c9a565d90795dc516681aadc51b1e279277a1a58fb3754", "reserveFactorLong": "0xc5028c778bfefde7f31cf0032a6ef5b9fede4e6d9f6b17994ddb2c0de6527187", "reserveFactorShort": "0x878ed1d4d771acb626e746293d2d8764b7c3005a89183bed56fcde51a1f02116", "openInterestReserveFactorLong": "0xe82e6310b843548e0bf095d1b45bc2066cc4527aa9209e3c0a6de3b34f00b2e5", @@ -5311,13 +5403,16 @@ "minCollateralFactorForLiquidation": "0xb8ddca48aa09da174c6b9d743ad7800272dd601298b1cf8a20fcc7f02f3dc28f", "minCollateralFactorForOpenInterestLong": "0x16564792d825aa02be225fdbae443d22a6398e40a3239c1309b49af701177170", "minCollateralFactorForOpenInterestShort": "0x33becca3d21c448200bec2782b5d80c6058dda35e03d3605be114b02fad807c0", - "positionImpactExponentFactor": "0xbd40da207468bcd57272e99e2ac4d6a751faedf9eb11202be9e8e674f25b9e6f", + "positionImpactExponentFactorPositive": "0x86cad2054bd8232ad6951cf68c1b2947eb60fd5ebcfd6cef7f4fe2245c8ab155", + "positionImpactExponentFactorNegative": "0xf502180c7ed90c57e0d1630b7f4bfa3f29ec5abed7e7e65d5bed35d23e72d7fc", "swapFeeFactorForBalanceWasImproved": "0xcc1dd20f7c01880a4c7c95ba6cf9de2d25011356abaa57f789a5100a60abbfd1", "swapFeeFactorForBalanceWasNotImproved": "0x760a6cd2b15f3d09fe03ee5e0cc39c2b87ccac457a477faaf1b8c10000c21ad9", "atomicSwapFeeFactor": "0x7672749e148b6d7dea467b114e16c3b129fecad7cb77b516a132aab20c9942da", "swapImpactFactorPositive": "0x4e1859b022ac41a8c0bb4876ac60e5667736a43a39775b67e8c5899e394f23a1", "swapImpactFactorNegative": "0x5446dbb4b522361bc79d2469cfa8f1a99d2491ef4398814a4226a28f9d006d5a", "swapImpactExponentFactor": "0x6830c79dd3c864da62a7266a17c9832c28b1c38252c1be73a0855c961c1a0fa6", + "withdrawalFeeFactorBalanceWasImproved": "0xda431f036fd6f3bfd801560ed8baea6d2755e0d6d218bc143a3d9b1f672022a0", + "withdrawalFeeFactorBalanceWasNotImproved": "0x8e314759eb2e3f38e41a6d796905c89911a1a7854fcf367c71d36e63cdb13c8e", "virtualMarketId": "0x05801b4b27d6ea25eb7dd9c7fd912969e42f12067f6e018dad07d0ba0656e85c", "virtualLongTokenId": "0xa59040b7efb6b7122a74cb318a192ebc6732849dff5332ee3ba40b90dfa0a04f", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -5328,8 +5423,6 @@ "maxShortPoolAmount": "0x14bd587a94193edf3c6bb135bca981ce136a8dc54cb51c1be792b6596937920f", "maxLongPoolUsdForDeposit": "0x363d1fa2d587e9b42e08f12efb10bf940d18c776457b71bce250de90d7ab4df5", "maxShortPoolUsdForDeposit": "0x4982bee1eaf425e6956c3eb3e11f53f46ddb833936b8b7a1eb6fdf2b382fe123", - "longPoolAmountAdjustment": "0x22c8dee2944dd7bdeadb3ab965f1448bab2c1a066efbf6acdc565bba6c3674ab", - "shortPoolAmountAdjustment": "0xc265405f9d1ad84400f0840c835cb34e8bd3279bbec7e7bfc91ec103329c477a", "reserveFactorLong": "0x78aa8bd4220ded416aab6bdeee7bd0cef8752b7c155806b3bc66d5cf4fb6b0dd", "reserveFactorShort": "0xf24f52c01c3e421999edf45d9609869d8ad75e79d92c8983fb09134040186788", "openInterestReserveFactorLong": "0x5b3c5457fb5953d082687eef265e6aa9a28239caf14e2dcc9e836c5cc6be24f8", @@ -5367,13 +5460,16 @@ "minCollateralFactorForLiquidation": "0xf91cb8d735678f9b6455105a627fed7029da41c0ee1db64713ad218cc3fb4b73", "minCollateralFactorForOpenInterestLong": "0x76df1c8a6b2192aee31ce7da93f1801aa488f2cc6fafe8348bc7603d11b2bd54", "minCollateralFactorForOpenInterestShort": "0xbb137e83f8e614721bed724ef82250aad6525ff6fa83d9421c69e81a4572b75d", - "positionImpactExponentFactor": "0x93ed1ff765c6467493cd699f6aa9c0ac23402e80c5b045be5fefbba77ec8c4fc", + "positionImpactExponentFactorPositive": "0xbde3a0715f245c908fda8708540ba66ed600775a8e21bb3c2a87096dc60810d4", + "positionImpactExponentFactorNegative": "0x45ed40be55618286ad7407185e0c7468376f923742fa382abca74679357977df", "swapFeeFactorForBalanceWasImproved": "0x18a2d2a2a65816643f3f28661a0e8f9973f4bd6d0c80df41f4c683e75331aa9e", "swapFeeFactorForBalanceWasNotImproved": "0xcf2315f65481f521af66a64d93e8dfc653d2616448c5fdda9dd6a1878caa6374", "atomicSwapFeeFactor": "0x83da1e3a9fb8be7e763b6f0c4a6cdeaad58b598ac5065b44b0a2c9b2244908a5", "swapImpactFactorPositive": "0x6524171a312035ff45f09f5ce5e8e72b493a0151fab50a7e3f7952fe870f855a", "swapImpactFactorNegative": "0xe35e936f9c891f0d8a39f444f436acd668d642d2fe6649bd198fa3152d081f59", "swapImpactExponentFactor": "0x8b0cd58c026f5262d60d2f2eeaced4d3d8b030080d868b89b0ea66c953ef77da", + "withdrawalFeeFactorBalanceWasImproved": "0x04d3a880260aceb2e5b8b68f993334c3b89f6b2b0ed32b6da550d423009f6423", + "withdrawalFeeFactorBalanceWasNotImproved": "0xe199e5092016ed767a519ca5122cbaa74e0eb238f619cec850151eb68fdb91b3", "virtualMarketId": "0x44fd5d876bc0cfe385cc4c305802dea4650a721d786255315a061e2e0ceea484", "virtualLongTokenId": "0xa59040b7efb6b7122a74cb318a192ebc6732849dff5332ee3ba40b90dfa0a04f", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -5384,8 +5480,6 @@ "maxShortPoolAmount": "0x60ad847395472c8a01aa77ca89317287919f7f1cf9278b3050f670143708e4b6", "maxLongPoolUsdForDeposit": "0xca7cbd9052412a0d39ea279b8a1e0a67c43bb19b126c4c304d52f2db6578de63", "maxShortPoolUsdForDeposit": "0xe018ef03b2ebac5c75197af7eab742a1a3f8c1e8674048c80796b1e13dd6d6fd", - "longPoolAmountAdjustment": "0x2daa355bbf2951a22bf99148e6ca7f8a6b4761bc83f9b53fec0bf724719da16f", - "shortPoolAmountAdjustment": "0x2ee975dcd05a106a0a7a703440ffa4ef5b444e7867776e9dd2c8ffe9cc8242aa", "reserveFactorLong": "0x88147275181254f61f1f643d82465f108c78aab97747f50089669dad394b79f1", "reserveFactorShort": "0x883bee62fe5698d76af2bdb91bc0bbd3f55c1f711470e6205bc205f5da15b0e7", "openInterestReserveFactorLong": "0x3b8e41c9af33e2c268ccf0e299d5819a56f6841c290063a7ba2c7129b7a17c16", @@ -5423,13 +5517,16 @@ "minCollateralFactorForLiquidation": "0xd901a64e17c3b8de6009bb0664596c577794080f85649ff18e1c52c6496b1171", "minCollateralFactorForOpenInterestLong": "0xb20b211dbc8ddafec3527b5303e70d11d78510e03ad73616837e18b58dbcbe54", "minCollateralFactorForOpenInterestShort": "0x0d8002a33d3e210a6bb7edc11265d891b4054384165307478bb6692adfa413a7", - "positionImpactExponentFactor": "0xdc269f2a393ac393db33d43b78286c52298d019d82450953e2597ad86d2cfeea", + "positionImpactExponentFactorPositive": "0xfe4af8f3e0d7a0a580b0a9d40bdee027edc0dda417bb59f76d10fdfc8e4fb199", + "positionImpactExponentFactorNegative": "0xfcf17fa851b3d9063faada1e99eb6e9cbc81d336119e2f954315072cf853cd6a", "swapFeeFactorForBalanceWasImproved": "0xa5bf8672cdc8d80a7f7d173aed9e45cb655f8a7553d8748d54f7676d43b4e300", "swapFeeFactorForBalanceWasNotImproved": "0x145d7a7b634ae4afa918af32435fdccf07cbc51975c337dd4a65153591172321", "atomicSwapFeeFactor": "0xf257b603234c802c7fc31101bc28f671a4d859c4c0c0f412d5c8efa81958b28e", "swapImpactFactorPositive": "0x04c5699d604ec5a80450d9d5d087144970d05fcead05c845b2d6559c131306fe", "swapImpactFactorNegative": "0x53260868c297fecd4de6a79d9bb2f0b4963724d73a2575a30a915b8e3de06aaf", "swapImpactExponentFactor": "0x1989cc7ae40577256f526573d129a999f1473ca248e65136dd848170078ce4c8", + "withdrawalFeeFactorBalanceWasImproved": "0x24111b1554385d44d0fa5bdc6bb014c3d4be4d784bea8b1575b074029ee68167", + "withdrawalFeeFactorBalanceWasNotImproved": "0xed5e5a24415e5f036dedc18da5d48905086f1055c223a709855b645146ce01ec", "virtualMarketId": "0xa19df05e222c2dc267a2a76aa9025cb90fcfe1f3ecc7125e9870f90653676486", "virtualLongTokenId": "0xa59040b7efb6b7122a74cb318a192ebc6732849dff5332ee3ba40b90dfa0a04f", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -5440,8 +5537,6 @@ "maxShortPoolAmount": "0x6cc2090a1ff91cf42e40d466e6ee09893515412a77223804333b363ee5054cc3", "maxLongPoolUsdForDeposit": "0x3af86c80e3b834afb8848c4ac60a4d4f1cecdb1e1539893399a9777717b4aa52", "maxShortPoolUsdForDeposit": "0x2e1df93dee003c6a81f58000630c2e596c89411898bb86126236b18b4ef4cec2", - "longPoolAmountAdjustment": "0x48b29d94d6f0c2490c089245d77ba541dc357f7ebcf71cd43dcc0282a8cf8fb5", - "shortPoolAmountAdjustment": "0x7b5f7250a945414ba5a5f73616c6f59d3f5127a5bb1b3be992aff83b94e28e67", "reserveFactorLong": "0x2acb007c79461b9fd9bcea792789057f18a0082076b0d0fdf011a8195a1a9070", "reserveFactorShort": "0x59bcd4fd8bb0d98fb7c47da68d82775f78489930798b800961d4a8f16aff61d8", "openInterestReserveFactorLong": "0xb311b793192cea3d5b292df6392317c8ad33aa62eb3023fe16b5d666f084e23b", @@ -5479,13 +5574,16 @@ "minCollateralFactorForLiquidation": "0x2a970205b1409ecd739d0efd67713aea8bfc8f7dfc531f8a378f31adc6d5d0fe", "minCollateralFactorForOpenInterestLong": "0x0ebd847abf1588de8f7a20e53835417c8f55b25f632784b243b921e83aa1db4c", "minCollateralFactorForOpenInterestShort": "0x2cf97b6e306aedd4f13e959cba0194e4d0551eb6b2aeabe2b44a77fc5544fed7", - "positionImpactExponentFactor": "0x21e18b6ada76a9758f2c252f5f66feb66f15d029f30cfb06d6794080b05d1dcd", + "positionImpactExponentFactorPositive": "0xf64ba23941c9713fe63ad87fb2e04bc88c862893d6c5241d4baaba56652e23bc", + "positionImpactExponentFactorNegative": "0x287bc7edbb529b972525ac3d5c16348ae313deb15d5029c222b1ac602fc77589", "swapFeeFactorForBalanceWasImproved": "0xbc1df01093272c457bdf9d8b83e5f99c06ced2bf7c36bf56bb391a5854e7c7ee", "swapFeeFactorForBalanceWasNotImproved": "0xe19b3f0fd99a2b31826d3d750a2c993975a9218c4605876820de37d1bf766dac", "atomicSwapFeeFactor": "0x6203d9af25c2f24724df74e18c6ff6084a5c14c68ed74dafaa89438e2287f6a6", "swapImpactFactorPositive": "0x856ad0ae542957677f61ef46a1f09c648c517e14d5aac391401a6fd84d512de1", "swapImpactFactorNegative": "0x958ab36c0743cc8b24487034dd1b67aeaf095178896263abdeb003ded0edebaa", "swapImpactExponentFactor": "0xe1366fd641d735cca1151ff2f0405fbe2e6a0da4435393e8e00d16f41fb43417", + "withdrawalFeeFactorBalanceWasImproved": "0x5d034beb116f431e22337b4eb48510f579ed33cc3a891fd7fbd3aa901393f249", + "withdrawalFeeFactorBalanceWasNotImproved": "0x9f6afb41ba46c1cb44bf4782a015167fc43775dfaf3bd857333d8d85c6fafb6a", "virtualMarketId": "0x9f9e2235905456d5bcb30fa7629322ddc71f65c078ae9a8e908c9ce2b1c8a53f", "virtualLongTokenId": "0xaab37f889b9680dda34f58a689de3023cb22f7ae14d32a3c1d45798a973db1f5", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -5496,8 +5594,6 @@ "maxShortPoolAmount": "0x083357ff7ac9c725dc85c16ee451c0b358e3460f62a10088c02fd501d4f6b030", "maxLongPoolUsdForDeposit": "0xd4089b78c7070b2856432855dd4d1b8aa17f39b86f1b207d05ca81e9bd9222b7", "maxShortPoolUsdForDeposit": "0xede9702c836160dc49cc02158af1760d82c3c2f0000a3bd7bbcfa1ff218faa0e", - "longPoolAmountAdjustment": "0x0c04fa2a39de544b6feea6b0484b5e44a47433c3c0eb0c885facbf9dfb3ad754", - "shortPoolAmountAdjustment": "0x477357d10e4e30c473a3d588f2f1eedd315c1ea357c625a81c4a235f32831cd7", "reserveFactorLong": "0x84deb30bd50d9c57704445f963f68434122863304c8b938b1f1f43ae1885b3cb", "reserveFactorShort": "0x55aefb86ef4daff81b7f3a6b3ed5f7dab1652678d83ccea87d688b867f885b6e", "openInterestReserveFactorLong": "0x55db6a88d1e64350dfcf69f6957ac84218b7ea410f3b99a10a8ccc1121a2e155", @@ -5535,13 +5631,16 @@ "minCollateralFactorForLiquidation": "0xa6483f30e7f86a80add0ec0803bd63edc2a3cd4c80b696924e18b43428fafc54", "minCollateralFactorForOpenInterestLong": "0x098ac53af972242c2bf90966b71274b0503daa3d7415109382e89aec3f0d5fcc", "minCollateralFactorForOpenInterestShort": "0x272f94b4401da17e4b6780e7b3503e62844e308c94d18b08a79ef4400786e98d", - "positionImpactExponentFactor": "0xfbf1fc3654cd4402abd21435b47f6f64defcd9c2a261d0ad6d5f73df6f861362", + "positionImpactExponentFactorPositive": "0x5271497ac5fdd904900be23c34fda975eb8e55c52e8f4fc16921e49f0af2dd1b", + "positionImpactExponentFactorNegative": "0x64070835c2b6b3c2ef40ed28d55d176fe73326757fce85fd7492301951109c8f", "swapFeeFactorForBalanceWasImproved": "0x15386dbc11dd0bcb2e4b184a1139129f2e348a083c59042fb520d811bc6b67b7", "swapFeeFactorForBalanceWasNotImproved": "0x69d548651306f8b9d0d7ded4c22928fe35c2075e9e71c54032a9063f0b71a6d2", "atomicSwapFeeFactor": "0x1149ab7ad33a4bc7e61ac7ad65652409c54e67736fb94a97a61fdaaea746373d", "swapImpactFactorPositive": "0xf539169edc1b866f4a532d157e90d5c31ddc3671eb3bb994ab4d7df62cf8cecb", "swapImpactFactorNegative": "0xc67c8191ecee9d9ab2d8eed8f244939cef958b6a8429ca9924390e951785a5ac", "swapImpactExponentFactor": "0x8b8d5ea5eefc0a4b3af099277ff396f1ce6552062f92e9ec4dd424e88ea4427d", + "withdrawalFeeFactorBalanceWasImproved": "0x170858c9354a4b209154eac598ad22e90e82aadc05f75b6a7df8d423344f67e2", + "withdrawalFeeFactorBalanceWasNotImproved": "0x47b34f2d278845bbccf8aab3b5bdd83cf84ad05ae0cdfad7cc037324dc89199d", "virtualMarketId": "0xf4c691455c153cf85af9843f77b4d810ec347424e34a0dd4f0571a6e458b9192", "virtualLongTokenId": "0xa59040b7efb6b7122a74cb318a192ebc6732849dff5332ee3ba40b90dfa0a04f", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -5552,8 +5651,6 @@ "maxShortPoolAmount": "0xafa0343c723b0a37802852fc6102a57795c5621626711e25dd5f02b890e1d4ba", "maxLongPoolUsdForDeposit": "0x5e252a3f38c695ad9388822e16aba217cdd47dc8a436f98423ff193a7b312720", "maxShortPoolUsdForDeposit": "0x6b5ea9165b2433278a94771fc1894f84242ce13089dcbf8cf6c3344148a95697", - "longPoolAmountAdjustment": "0x139224da0850fcacfd36d75590e48a7d32da696447a7dcfb583f543384d53cd7", - "shortPoolAmountAdjustment": "0x167a086e40c34ffe03c765d1480c6cd71b8cbae0eff7c72a8a630014763cf8a9", "reserveFactorLong": "0xf513608c8d9f4831b242b0d87a227ac745b9eb4f1af55fd61bfa63533c8531d2", "reserveFactorShort": "0x326f3bca22805c41fe21a6ae00c6944f24b01deae993892a6f09e69ffa067b3c", "openInterestReserveFactorLong": "0x4657f72c166707c29d3845cc4363aced6508e941510abc9dd9617c64388f5bda", @@ -5591,13 +5688,16 @@ "minCollateralFactorForLiquidation": "0x1944c38597cfa42fe45895448cd9c319a40de1226cfe211e755c95638673d78b", "minCollateralFactorForOpenInterestLong": "0x8849255dcc39c605b9264107f43f7f5249f9bfcf284097be0dfd8cdef4f1ad52", "minCollateralFactorForOpenInterestShort": "0xa1076d5f2603039a1ae1dbf4b47a94d472f445a9d6f273137e289338838c3333", - "positionImpactExponentFactor": "0xf78baa451beb79ae8d00ad4d35e475d8e488198a940b291c8960820f62841473", + "positionImpactExponentFactorPositive": "0x289e33e5f8c089a1660d059a39fcc9ed9756ce6eb044b85ad7e6cf5434cd900a", + "positionImpactExponentFactorNegative": "0x002a6a848717cfeb0eabb500d345f8ed97e22368e215c61441d25554770efc4b", "swapFeeFactorForBalanceWasImproved": "0x920ada93ca7baf660918360668d5c77367a6adc35234bfac6f6f30eca47b1892", "swapFeeFactorForBalanceWasNotImproved": "0xfb4196fe9108ed2af77777408949219b02d15307c2e59b8deff3d8899f7e753e", "atomicSwapFeeFactor": "0x2611d915678c3ba3835d10a745d3b62133daf635b52273675675f0dd32ef5105", "swapImpactFactorPositive": "0xf50e95ce46085e5f5abc37698e61eb49a9cebdda3a633e376c7b3668c71f5066", "swapImpactFactorNegative": "0x75e480a70248780f710fbd00017aa698ae7ca38f06b5d16f213df891c2becd68", "swapImpactExponentFactor": "0x68f979c59d1a3c5bb3bc555f3d3e222c39329a0d249993f146e1017ecbeab2ee", + "withdrawalFeeFactorBalanceWasImproved": "0x57e3e19a8b9c58044c21c1c97defad56b8bad443b02751e4820c46781e0d0081", + "withdrawalFeeFactorBalanceWasNotImproved": "0x87654e8c9617b05f2f4e5c7482083b4c92931b65f2309e34f37d375cfc3aa6a8", "virtualMarketId": "0x79757c66756773ac1fb65c3ca12d0142f2155e78b8f1afad4bc9f89172adfc5e", "virtualLongTokenId": "0xaab37f889b9680dda34f58a689de3023cb22f7ae14d32a3c1d45798a973db1f5", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -5608,8 +5708,6 @@ "maxShortPoolAmount": "0xc6270a5da4497f588f12f66d04b46884b8a69fadc3a64f9855baf63eccb9f279", "maxLongPoolUsdForDeposit": "0x71ef28b43215807304f179b6e253f01dfe74bcae190f5a797d729ee2a7efeef7", "maxShortPoolUsdForDeposit": "0x2e5d87af3297a6e55a0a530e1e28e1d1f6b52aa848ba67e5f72f99772899b35a", - "longPoolAmountAdjustment": "0x679030dd1200e6a89881c1d08a9e7fc3481a325d6793f2cd723c43a61207d7ca", - "shortPoolAmountAdjustment": "0x005c5ca041df44fe245d3b9b5ef53babd7f532ef53b1aba13c5700499ad5a90a", "reserveFactorLong": "0xfd289648b74d4ea78a934f9dc6f57802e00b3fded0f6a5ac4bfd9ff59c1931fb", "reserveFactorShort": "0x2dfd1e831c73d06634754d7685ff4c597cfab1fe44b32d44bc628705a116c6bf", "openInterestReserveFactorLong": "0xe5fd7cca739458b00548948afbfa9ae28f08f44f8a75c66a9b8cbffdf3c01709", @@ -5647,13 +5745,16 @@ "minCollateralFactorForLiquidation": "0x22792d6b6a7d400242edceedf07505e6d1b55ed62e2ea73558d2eb3975aa07b6", "minCollateralFactorForOpenInterestLong": "0x7a21b1bad18f2929d4abd3fae6e5292ba91b468230661c4a9153381bf4bde9f5", "minCollateralFactorForOpenInterestShort": "0xfaa2dfea02a378d3f445302ad4d018ebf25d2efc81a8f78f8b5c999126284f2a", - "positionImpactExponentFactor": "0x45485db332baa33654279b12e959c160e8c490c950a66707ce6b0070d4a9beec", + "positionImpactExponentFactorPositive": "0xfb5eb949e6e6ddd4d160b06305a72b0a47e62ec6109dd2086f3a204e8f789d50", + "positionImpactExponentFactorNegative": "0x8d4abce4cdf9f0fdd30f933be6679c58a7781c033421032fc86248e8de832263", "swapFeeFactorForBalanceWasImproved": "0x3ef7d02bc5b049e46654695f4d4cdcb0da8174292c1ccb2ae66bc547d084a35a", "swapFeeFactorForBalanceWasNotImproved": "0x9f3aec9f5417900c61bc567fd4ab582ee286a16ea86b041e4e12eb810a70b1dd", "atomicSwapFeeFactor": "0x980aafe9db4d75676c435b7a079a84808ba90ace4c733e396244dad89b4f8fe1", "swapImpactFactorPositive": "0x989a958fe693c45261754194c1c09e37a7d131e3caa329427de1e0635aa6ae06", "swapImpactFactorNegative": "0x729ebfba77820dc9ec925f21523d7ba5c66a36b235d071d93e2ff61f815e79b6", "swapImpactExponentFactor": "0x6baf070ae5a6f5402ff0c66767b10fe7995876536f6f6a7483216922b99ae65d", + "withdrawalFeeFactorBalanceWasImproved": "0x74aadf2a2f6b0ca6335a45770bdeb43fc966b5c3521443d893df307ce780f2d4", + "withdrawalFeeFactorBalanceWasNotImproved": "0x131419b17ef0866912c2dddff033744e3a0548cf057c348419fb881142be0cf3", "virtualMarketId": "0x52aed1451e9996f5863bc4425bbdc6a2f17f242f93a995c0721073e7f435149d", "virtualLongTokenId": "0xa59040b7efb6b7122a74cb318a192ebc6732849dff5332ee3ba40b90dfa0a04f", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -5664,8 +5765,6 @@ "maxShortPoolAmount": "0xffa1e3077efa19a6b9695a89a685bca911c223844272c8a3c618f96b9c65e215", "maxLongPoolUsdForDeposit": "0x5187be964156fe62402dfa21b7101d4e0e230c2e7cfdbd59a796cdcd5bd7c698", "maxShortPoolUsdForDeposit": "0x6362e8852f74596d70512d3a0dde8290966254596ce052479481bff70e9856b3", - "longPoolAmountAdjustment": "0x8f27406c90ab4102f4512d38a2c7e871241a8954614248a5baefb63ea9f9eaeb", - "shortPoolAmountAdjustment": "0xc96a9ea4ff8bef5feeb06bd5cabca5f870bf3d24433d1d5d481d2357d0d29404", "reserveFactorLong": "0x0a1e97a6a1bff94cf42f5114be21099fae6c718c43e3c966f48960d1dceaefa3", "reserveFactorShort": "0xb219f5bafa4db7658d26799e64d237e0b33664fca3b0e99f7b540ccb09dc9d12", "openInterestReserveFactorLong": "0x9b352924abfdc3fa8a3a7064805ee5d79116cd1ecfaefddea1bd964fa5e8a5b5", @@ -5703,13 +5802,16 @@ "minCollateralFactorForLiquidation": "0x300d7b83c28097683856f9e2686505916f1b5bfbc62a6fccd6ce5aabb8cf48b6", "minCollateralFactorForOpenInterestLong": "0x1d820cde050256acefd96c32ccb6be28d4d6109cb72dd08e2bfb56e7b6e9a73d", "minCollateralFactorForOpenInterestShort": "0xc553733dc3acb295f0e3b96bc2619537a3f2c1f932fa5d541a7168fbcd639fc3", - "positionImpactExponentFactor": "0x3b96f8ee57d055df827e1af2670a7580089991fc0d51b7711af29b2252bbb4d3", + "positionImpactExponentFactorPositive": "0x53017c6db65c5eb962e1fa90fee5b4adddb0d5139517af78be03485cf7df17db", + "positionImpactExponentFactorNegative": "0x39a34cd27ae6cc24a8d14d5a10179c93c8f665c0e140606a532a29a35a7732d8", "swapFeeFactorForBalanceWasImproved": "0xce14b2aa2425696565c2d15d18113436079f9af6aa2ca16d7fd47af67077c876", "swapFeeFactorForBalanceWasNotImproved": "0x24d93a752c4a3c3003fad0e2b9e57b7d23f02e9d6f5bf0d47f3cf0f339f2495a", "atomicSwapFeeFactor": "0x24f9d72f4f6789a454120a032ead4225d5b3b67363249abb09e9a17d361d6bc5", "swapImpactFactorPositive": "0x1ea2bab7e1f81014c954b3dce99e3748c6871441b6af46ec3b1b6c53f372360f", "swapImpactFactorNegative": "0x845e8b715731e873f696c86e30d4d66195e14cba387d692b8789e1ff74ca9ee8", "swapImpactExponentFactor": "0x98189c02bace01b82785c38cb52ed6eccff9e007b48f8d8f57d7fb9c94723f2f", + "withdrawalFeeFactorBalanceWasImproved": "0x0c22e0c6f77e9176f33321b8e831cd92cf4daeb1450b738b80eb6c888f4dcb79", + "withdrawalFeeFactorBalanceWasNotImproved": "0x2785df71e4d1c70e18ed5b9b583ee652aaa46bf7b75dfe6cc3e6cfbe3d1c3ad3", "virtualMarketId": "0x58681037ae37cd322ef8d34c5a12042f757e15f14b187dd728e8917d5738b6d8", "virtualLongTokenId": "0xaab37f889b9680dda34f58a689de3023cb22f7ae14d32a3c1d45798a973db1f5", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -5720,8 +5822,6 @@ "maxShortPoolAmount": "0x528740efd684fc16407530a9f946f433f0f385eec64b688e8cb7733d4fe4539a", "maxLongPoolUsdForDeposit": "0xd15549e5b3985aa56c3263b75a0b5c363ce2ccdeedb147a7bf252824c072c92b", "maxShortPoolUsdForDeposit": "0x89d452b22c2c52737491a8359e965a77d0dd3ce65a837a469717e5f8c9845883", - "longPoolAmountAdjustment": "0x627253fec533ae8e731162bc662292afbf1ee36b8f3e3ba11678368515c0c0d6", - "shortPoolAmountAdjustment": "0x39c254c43ef19972fa68ec7b510c2d3e8017f8e9cf989caadbc56ee5cac67154", "reserveFactorLong": "0x89e984722d28697a86a29e661f4f025e0b87616f17fd8de0bbf0658074b99c6e", "reserveFactorShort": "0xa00db71b2123b9b1450ed5370873d6783dac01b0526126784d0abf1f07a11443", "openInterestReserveFactorLong": "0xd71b2c5f423a70f34fe4730b259c159ee02f81c0fb2051170ff13610a7e93dbf", @@ -5759,13 +5859,16 @@ "minCollateralFactorForLiquidation": "0x9996a4847c6306981151e04717d3c51afec65f0392af29c7bd8abf9cd379d377", "minCollateralFactorForOpenInterestLong": "0x1b19830a06a6cc77730f7f0dab868f056fe82652f8ad897ca9e125880b1227d3", "minCollateralFactorForOpenInterestShort": "0x9dd9ae7475e697c7bfa823582595098c48def087170f650d11f98adbd2ed824e", - "positionImpactExponentFactor": "0x69faa6d06a4fc137d20da6cac127b8d616687c86644538aba19f0e8c6f246455", + "positionImpactExponentFactorPositive": "0xcb89a801359addfd584dd00ead34bce92ec516540ac05fc3491316fd89f85d28", + "positionImpactExponentFactorNegative": "0xb4799b1c38163d7c53e32b6c69f8a0b656373876bcff8ae25cad74a9e26c2a3d", "swapFeeFactorForBalanceWasImproved": "0x2e1e66a02f233eb61899c3377e30c61a4d5a1337702823f1de9c26c12db1ca02", "swapFeeFactorForBalanceWasNotImproved": "0xd0f878623266b2e9c002db7234bcb1e8f6b49aa7c70b5b1af084b41a9fad7cb5", "atomicSwapFeeFactor": "0xd9b869dff4dd1ad79061c7c1c40d4a1970ce47d8fef11de2e7f853d0c9b501b2", "swapImpactFactorPositive": "0xe21a52a0e2c6facc1b425c0f0a85e8054edc5c5555cc1d4ff25ca1bd6c6d4a84", "swapImpactFactorNegative": "0x773df7e7484d0513f3cbe4e22752c34474e5f9af372329af481ed87527c0a2be", "swapImpactExponentFactor": "0x7cecb982a58f90bd054d18b102bdeaf59098603166898c149be3ee5c58b06ef6", + "withdrawalFeeFactorBalanceWasImproved": "0x37e9f9b7be7bdfe511b62201628d95c7578a81a5c1cc0ac22b5aa6fd588d6973", + "withdrawalFeeFactorBalanceWasNotImproved": "0x87a1ee15bac91f3bcee86847bc4d41846b98a6166d32dc651b5c7adcf4c86d7a", "virtualMarketId": "0xc32b6a02bc74d9775fa58d5515cdf69bf46b3b603e7ec5a0857da2eaf0cdcc42", "virtualLongTokenId": "0xaab37f889b9680dda34f58a689de3023cb22f7ae14d32a3c1d45798a973db1f5", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -5776,8 +5879,6 @@ "maxShortPoolAmount": "0x70a0f55ec4aa84e936d72562c1a5c558bb05a99a0b8626741f6406a5272f9aea", "maxLongPoolUsdForDeposit": "0x015121df87225cd6cb24d24a0317d4a09e5fcd08829a3e4dbfce7f0219c49217", "maxShortPoolUsdForDeposit": "0x2fb300f6a3c1650e8e56c03c05ba011a8de93c34ad3f2b586f6a27ed417ead56", - "longPoolAmountAdjustment": "0x65a4e6396efa612fbe342abd96a8c79cd208ea04d317459c50df7345985576c8", - "shortPoolAmountAdjustment": "0x7336c6d18260026d2e4b1fb6288a58cda8bf0bbabb2b17a0db44b3c0d2219ec0", "reserveFactorLong": "0x905c8475e0f87b03c0a3c17f53b89d4062af157c023117ddf2e7517b703ffa5f", "reserveFactorShort": "0xf11f3236d446dfd133048eca0c658b1b86198b8907bd16b391ee697a238d4ade", "openInterestReserveFactorLong": "0x663c2495a658c238b0398b369dd6f583eae60af2f4dabb535d008728d967a740", @@ -5815,13 +5916,16 @@ "minCollateralFactorForLiquidation": "0x9aca1909c44992d26e5ccb538c5334d5b8dca7393aa6339213a19986d34d924e", "minCollateralFactorForOpenInterestLong": "0x5330c0a9bbd31e8f54f43572e56f11950eecac70d417300fa75b977fab069b8d", "minCollateralFactorForOpenInterestShort": "0xa5251493e4e0adc408ca88a197dfea776e4b157b68d8bbb6c062d49cb4f5637a", - "positionImpactExponentFactor": "0x40e0896e7b104487f587c227a5cefd6db59e1af67cbef2659e4c57abe16c03ab", + "positionImpactExponentFactorPositive": "0xf71cfa5bb16b68abd113d5cf11cb4cf52669ee30602d52f56d7ac2310022963d", + "positionImpactExponentFactorNegative": "0xad56c9d069c48eb63bfc86e67399ec8efbb23c5435d274486f99c3c1fbd35756", "swapFeeFactorForBalanceWasImproved": "0x4b9d6db0a1455c0849b4796f9b3ec170bb2200fe90d597599febd9f8f938449d", "swapFeeFactorForBalanceWasNotImproved": "0x15987449691f95d965a6ef584446dbe580b93a7e11732d1896f8d1049ada56c8", "atomicSwapFeeFactor": "0x17c26cf56070ae4c21c7f4c607b0f7a2d17fc3d0f1817e4524c77abc3f1c4460", "swapImpactFactorPositive": "0xe729062ec881d996d457de015f30cd07d967548eb7b8cb74770f8a252d17682c", "swapImpactFactorNegative": "0x1f1c511295fdf3c8d8e60f068aeb25a1d1b6910358dfeeacb5b9f592492f507c", "swapImpactExponentFactor": "0x28853728bd8217673a1158098306e6b709acec86515f8d793e55be9687101df7", + "withdrawalFeeFactorBalanceWasImproved": "0x0d41949a5c1e51a5543deab167d060c9ce7290a66599edf6baf9b03e797569dc", + "withdrawalFeeFactorBalanceWasNotImproved": "0x827db2f3b67692230b3163a4aabc31d7bf8c19ca2df0f6db0b8c5af0c14ff9ac", "virtualMarketId": "0x332ad90837b091df9f9dc2461a62ef5b30c67bde2df9d1e20d96df6a1f1201a4", "virtualLongTokenId": "0xaab37f889b9680dda34f58a689de3023cb22f7ae14d32a3c1d45798a973db1f5", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -5832,8 +5936,6 @@ "maxShortPoolAmount": "0x20eef9e89df81b67d478aa94e112d5a1c876f588d15adf3ef9dcab688c1304bd", "maxLongPoolUsdForDeposit": "0x83f7dab460616279f22db598689a9e6230ea36376d99679c8a3e13a18e309e7b", "maxShortPoolUsdForDeposit": "0xc58b34a295ba26e42dc2fb99213ee3b128a6fdad1c86ad1125bdf86b7a2100a6", - "longPoolAmountAdjustment": "0x49bb24df6b1959fc0be188bf64ff47b81ed37c7929faa53753b38bbe7a6bc874", - "shortPoolAmountAdjustment": "0x8a897fb1c49283dad079e2c6618c5d7cf0572320bb3105ed0ab962a421243c6f", "reserveFactorLong": "0x05832fb67536f350af426ffbf08b90bca1f348955e56679fe51b8cb255b8675a", "reserveFactorShort": "0xd00c5a4ba3fc82a581df78df64bf914e1b4121fb3f641768338f150e668d69bf", "openInterestReserveFactorLong": "0x3b805711b9a1448fe1ddcac8be5df72fd536f11ff9e4f9711e867bfff2749157", @@ -5871,13 +5973,16 @@ "minCollateralFactorForLiquidation": "0xf5d9fef257ff2a16e455117446d0fa9d6596c3a599a75e8e39124a037c2e0c73", "minCollateralFactorForOpenInterestLong": "0xa5e55cb18c125a5e6979763f25151ebd5c063f127d63598f08ee4dd15b2dcf3c", "minCollateralFactorForOpenInterestShort": "0x0f730d7a734ceb03073aa1b6d86d32de32c78ad41a21b96ae2b28d44c233145f", - "positionImpactExponentFactor": "0xf6facf2eb0f2bba488d40a0bbf99b7a29e81118a4461f441d527a3f461a27b80", + "positionImpactExponentFactorPositive": "0xaf97f408539ad81627433d94569848f45105ea696374af50ecc3952a994a5f37", + "positionImpactExponentFactorNegative": "0x72a8c9d39b4c06cbbda864cb1d521c40cbaa00735ecc5c26442d021dd41fe522", "swapFeeFactorForBalanceWasImproved": "0xa5db4123efcabcef77b152df9fa9532d15321801dc959adb0f04c0591f77ef59", "swapFeeFactorForBalanceWasNotImproved": "0xd6f3436b9782f7a1e4327b8e3cc4150c4842bc74ed1268cb37210715ecfe7d2c", "atomicSwapFeeFactor": "0xfe7b999cd2a06bcd05bc9613ed6f521275850d24838991c9acb8de1507f41150", "swapImpactFactorPositive": "0x653cf34669836ec174cd5b8043f2e218f07dfabb4edc99b4a2c31ebfeccb198b", "swapImpactFactorNegative": "0x8eb1e5c63ccbb972b196f0789a1b3792f81f1a2c2f8bc58cb0d0c1dbaf9023bf", "swapImpactExponentFactor": "0x15c1a9cc873d265a983d5ab766fa16286756c665459e214901597bec6eb279c8", + "withdrawalFeeFactorBalanceWasImproved": "0x5df5c0aeef54c2847e328361168ac179e59c09cabfba4c9200abe66c595d600f", + "withdrawalFeeFactorBalanceWasNotImproved": "0x412cb443b69aef73ef491ed0d860601971e4509511759d14ca40ebd3241e3656", "virtualMarketId": "0x456d5c46fbf05d61813bd78ea3326a97ba417a7305e7bf6f94d9afc4e50aaede", "virtualLongTokenId": "0xaab37f889b9680dda34f58a689de3023cb22f7ae14d32a3c1d45798a973db1f5", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -5888,8 +5993,6 @@ "maxShortPoolAmount": "0x2cc8b3e9e728fdae43714f4c4a3481a916ec277947cf0de1b2e3081b3947dd20", "maxLongPoolUsdForDeposit": "0xb3b21e9c1c3558cf268b6fb4c826830878809e6a945179c58bf2ace4134d3741", "maxShortPoolUsdForDeposit": "0xe3aabb2e838ab30d483f8801227062a7078e3c44ae743fe969f2400051464497", - "longPoolAmountAdjustment": "0x152390d71d4062cdf1c5c0cc6ee0b66f827e45da82eafeee847bbdd05cd13022", - "shortPoolAmountAdjustment": "0x61a312c3a694a103be5d491bca57811e2659a1cd8fff3b82f2e660225a90b070", "reserveFactorLong": "0x8e0cdeb7a856f7bf0fe8f517d2c16a5e509c95c68688d4fdaab9e798d8617b32", "reserveFactorShort": "0xbc0aa30dac91126611bfe80dd66129431823c1ce7a3b1d903b8e710bdb836f9f", "openInterestReserveFactorLong": "0xb610cbffc4c0b139e757615ae2107e2bf7c480ffabc1bd6c3c7feb4ab7b58f5a", @@ -5927,13 +6030,16 @@ "minCollateralFactorForLiquidation": "0x38ebb6b137f1b49e3fbbef70877993eff5126bf284cb09081f73fcdf149462cc", "minCollateralFactorForOpenInterestLong": "0x6c5e4de30fb36932670cfcb1b5485610f7249d2ec8a28899ee2eb8b3499971fe", "minCollateralFactorForOpenInterestShort": "0x6157a4d4a9fbfe4520880fbc858bad07c8565e3617761cdc45f4bead14361229", - "positionImpactExponentFactor": "0x327bce005fb728fe14354f37a710dfb97b70b6cd606b13e7cf3f0a20c165fb72", + "positionImpactExponentFactorPositive": "0xf31ae57a9ab463d8f80ceb0ea4c0b141a8196319bc2c767ab5f63e8ddcdd41ec", + "positionImpactExponentFactorNegative": "0xa20d2939c69e212a7dbdf1683d52fffddbdbe794677eea5d3f4ee59bc9cbca14", "swapFeeFactorForBalanceWasImproved": "0x1dfdbb97d3ae8fc434e1065ecccd47ec8e9493d8f9405a62a276dce104d15e27", "swapFeeFactorForBalanceWasNotImproved": "0xba095123633cac258be40340b1c0e07229eddcdf851515fc904f576ce2614857", "atomicSwapFeeFactor": "0xfcfe605a647b5a3ac152e8737dd85d9ba4b4885737e57831531540d03c099919", "swapImpactFactorPositive": "0x733308f470dddafb1e071f00410ee631d739ff8ebf477329984ff3f876aac9a6", "swapImpactFactorNegative": "0x944600f556adeb6eace463d9a38c8951dd8a43222219c3d03d74f16dc0b376e4", "swapImpactExponentFactor": "0x5302f3771f5d65408e3ba3d4b13100485b8b6e113cc89c979e961fb8ba25c0c6", + "withdrawalFeeFactorBalanceWasImproved": "0xb0e175ae48f6644f38c21f0be7430583dd4a7b6f0c212b1a487a93043f2bd705", + "withdrawalFeeFactorBalanceWasNotImproved": "0xe509a8f9dc2852c56f07410a45895c9d07b95a1c4072e435dd4b6b579ac4a04b", "virtualMarketId": "0xdd0293f26f6cb56777b6b1960ff5a2252741a2a28999f22f283e176189fec3e1", "virtualLongTokenId": "0xaab37f889b9680dda34f58a689de3023cb22f7ae14d32a3c1d45798a973db1f5", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -5944,8 +6050,6 @@ "maxShortPoolAmount": "0x20b766ec22cc78a5d8c50f07e8c3850587edcede8c3f2f99cf713ab430edbc02", "maxLongPoolUsdForDeposit": "0x54b505a7f38c70de7071eee50a08624d32fca17f787eb0f603219e82a9f5108b", "maxShortPoolUsdForDeposit": "0xd689983a2f74dd1b577521357f3d6db37193af119375d4ee54c9976fbd422c59", - "longPoolAmountAdjustment": "0xaa08d85d9024d461bb5f67ef5d0712fc08236ce006bd780b26b8145df1ca35e3", - "shortPoolAmountAdjustment": "0x42de80af3822b98b16b3750edf369573ca9916f72350bfff0fef1f03f1208d2c", "reserveFactorLong": "0x33d1e2531eeb5d4c75ea1cc998a455d1dbaf95895b3e659b386b97d1465e053f", "reserveFactorShort": "0x1dd95b81562d89f51d47caa3b25a9fe7282bf93136018f324ce8be0d0255a321", "openInterestReserveFactorLong": "0xb353b343038684c1c8341308124745da76b82ab2cd2722cb922cde12c8a3f060", @@ -5983,13 +6087,16 @@ "minCollateralFactorForLiquidation": "0x9b70b196f29143806bfa15ba08aebb2e612957ffde9d25e1c6de00d1ac8a8e6e", "minCollateralFactorForOpenInterestLong": "0xa463bb0bf65c138eb97c740465a234c791aa8ef3ab676e5f7293b3a3195a8f1c", "minCollateralFactorForOpenInterestShort": "0x976b7368d3aeeabd8d5c6b51a6718392b2d2d617c10a3e2bc7bbcce192e8ed72", - "positionImpactExponentFactor": "0xb0f5a9ad757a67304a4f78a36043f2cfbf20cb368f9aaa3a28eca3957c5db38c", + "positionImpactExponentFactorPositive": "0xac1b921c419d53c7105e8822f183ef893c9475eaa5db9639e923914054ebd636", + "positionImpactExponentFactorNegative": "0x5470957daaa9ec26e77296f0eaf0e4a09b30dff740b7e0a14648a97a0ef657cf", "swapFeeFactorForBalanceWasImproved": "0xe9a251bde0c47e85618045ae9ec3334d22ad42bc7b57142e9935e36118ca9175", "swapFeeFactorForBalanceWasNotImproved": "0xd2a7b2e5d86f8973eedf837f8bd6eca83ce6f603220fd1dacd42435fa74c2008", "atomicSwapFeeFactor": "0xfa1e62406674f01917fe055d8728e664b84210dd46b2bbd7dec01dde23db9722", "swapImpactFactorPositive": "0xfd600d715e5d2039bf5109147188931b05a2456cffe359b1a16c6adac07f380a", "swapImpactFactorNegative": "0xf8a517e7cde0dcc764d8ccab0f00be54d170d6b3b4c77842e0de29ea9606262e", "swapImpactExponentFactor": "0x7a7392ce55574d97eeb9c161fc00357c52b7f718f943065109bc542d8f518319", + "withdrawalFeeFactorBalanceWasImproved": "0x98b8c5236da562d6633aeace91a57b575b26d3197d47662807bb1f9365a60aad", + "withdrawalFeeFactorBalanceWasNotImproved": "0x37a2cfa0b38f189da94db58c926b4d2acbd99afa8eefb1b5e6c9df2cd893e891", "virtualMarketId": "0xdfc85149750ae318b04c1535e4375433c2d4a57562bd6eed5f71811f3ad8be96", "virtualLongTokenId": "0xaab37f889b9680dda34f58a689de3023cb22f7ae14d32a3c1d45798a973db1f5", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" @@ -6000,8 +6107,6 @@ "maxShortPoolAmount": "0x99b74904ccb9912e64dc6361a4a07c23a9ee793c75fd75c094af5ae47dbce73c", "maxLongPoolUsdForDeposit": "0xe0a4dd800dbb1c513f298021b4297a08a6f46d95f582face2cc389cfaeb25e63", "maxShortPoolUsdForDeposit": "0xa67b2ce25b0e40da8ff6b276a995a576bbe156898a660f71fdf984e940acb294", - "longPoolAmountAdjustment": "0xe3b01e43fe7a9d1a953f0f7c172d0c44f0f33867bd223d56cdb57b7d30c76163", - "shortPoolAmountAdjustment": "0xcb58379c455682437cca901fff6b7ba21abfaa834da3365233bcd87ca593c7c1", "reserveFactorLong": "0x1b067adc08ba60a01304538920219166705db995ea105fd145de933765773ca3", "reserveFactorShort": "0xa2fe0c2209166b21bd82949521140ca6bb13ed553da6edcbce4f92aa5b2232ca", "openInterestReserveFactorLong": "0x309cbaa767f0ef9de8d77a508b0f5599a725d40e41bf749e82c965d565d2753b", @@ -6039,16 +6144,532 @@ "minCollateralFactorForLiquidation": "0xf3cd626f31924cebe44eb53b4d3f93e8baa5a6dec5fa61d368b3b5dc211cfea6", "minCollateralFactorForOpenInterestLong": "0x0a49cd6cf89940daa7273277296663930e02a97a33e384501320df18d89553d9", "minCollateralFactorForOpenInterestShort": "0x3ddbac86d1050ffbe51179dfd33fc8b68d6bdd6677e2ef03c596774fd7763ed3", - "positionImpactExponentFactor": "0x6c376766a0728ffddfde792193f8c4bf3fe375e201c135dfbb43e6c3d1af46af", + "positionImpactExponentFactorPositive": "0xa79e4282f394fb64db4745b721bd8ddf7378bbf3b1272aa8d5742af15723146a", + "positionImpactExponentFactorNegative": "0x9d7eedb84eb23a962ce0f305f4218b2aa9a2209426c1c3fa34d5de14af748d1d", "swapFeeFactorForBalanceWasImproved": "0xeed1d4eb8d21f124d78e73f4322a880920fb0c4e067c366abc31f3f59cb67a26", "swapFeeFactorForBalanceWasNotImproved": "0x346e2a9e5b9ed2a45bd4b1f59aaa1a4a92f7e2885df0dc216cb9f2780504b6e9", "atomicSwapFeeFactor": "0x04049424025e808cd6dd2231f58e313e442d777d3af3807df8b2db8660e86943", "swapImpactFactorPositive": "0x7975df19a8b17790ed01606614f98f56f39ca6f9f6829b8da95810d661554640", "swapImpactFactorNegative": "0xd89e695ff64a92e7a0d74651df1a623b880ab1006f4cf6f78d111f54b32baae2", "swapImpactExponentFactor": "0xcfe098aa5b07e41390a50bfc18156f58d374efa92124e5a38242695bb7f8ca33", + "withdrawalFeeFactorBalanceWasImproved": "0x84371f21a9fb2791b2f79640a5cee92d68b293fc9fdd2a987ac467e26d5d4ed5", + "withdrawalFeeFactorBalanceWasNotImproved": "0xefbd73969a8be8e3840083d4d78099b7993941cfe37ac2388e031fbc4594ecfc", "virtualMarketId": "0x9da5cfec805186e676d65a6042bfce7d05b7a19416289e075f8a6b683242e22d", "virtualLongTokenId": "0xaab37f889b9680dda34f58a689de3023cb22f7ae14d32a3c1d45798a973db1f5", "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" + }, + "0x970b730b5dD18de53A230eE8F4af088dBC3a6F8d": { + "isDisabled": "0x587a38ef808ef91dba19f879b7ccb75d424d8377b20bb1f0988bf741a83f5d26", + "maxLongPoolAmount": "0x5f7e6c52140f10c98167cbaa406c4462a9250b7546fffe7508353210817d289a", + "maxShortPoolAmount": "0x7120fef4f9a684605d334b38d10b2d97c29fb7ce890d68e50d23c6bcd93a39c4", + "maxLongPoolUsdForDeposit": "0x54d288b2fcc43e604f09ed52ddcac85cf428d09d41d8024f037b452206e0ea99", + "maxShortPoolUsdForDeposit": "0x004536435b2b33e0799dc15019a42c546f72857436bc32c3279111ad920ff6f3", + "reserveFactorLong": "0x73583c2668f44fb6fa06beb9e55e1506e1955b85b195b477a9df3c75420a29df", + "reserveFactorShort": "0x00f53cccb641812ce181e3a7e31c5e2ea5d6013d4b58e4eec450607115136560", + "openInterestReserveFactorLong": "0x29ce811f1b9c18be73c1686f5b42c7743fb58d57a5b84acbe2775ae9b29dbea6", + "openInterestReserveFactorShort": "0x2aa9725daad0fa1e612c9078482917018b5e94ae3e2ca2a79a6f3a47f8d6eff6", + "maxOpenInterestLong": "0xacbd0408377068e19677caa8c315f0f901b0e86cc52f7ad9d965e30040d08e62", + "maxOpenInterestShort": "0x82ce77532fd31918c659adf4e8d011ebca38a3a688d7d2d13cd55e12990e1634", + "minPositionImpactPoolAmount": "0x69f94cb067c092c42c9b747e724db32e222c93bae42cac75aa77d93fba878450", + "positionImpactPoolDistributionRate": "0xdd9218453c825ef2c173ec3651d033f3faf3626cd81ca10c56e7a681cb39f12d", + "borrowingFactorLong": "0x924e0e6001bd8a1754e691a1c3a8d34f8838a172d70619f82915803ba2a7d3e9", + "borrowingFactorShort": "0xf995f16361c5279c85c9c6644be42b4c1c32870beb246463fd4fd99634b8c3fa", + "borrowingExponentFactorLong": "0xd68da9856658b248451a1c134c01e78eba9cdcbc4b8c6b8c57df6dab7fe9336d", + "borrowingExponentFactorShort": "0x41a7af2411b1b445437b57f96e76623d8390a9ee9361a2d8bec77fd0d69b1cdd", + "fundingFactor": "0xda7306eb079f134714d0d2c1ffce3a28083652e480d0ec366ea2db582fbd6ff7", + "fundingExponentFactor": "0xd814f3d14deaad192438ded63d1c676e93b321b67aedd8d5c6823194065dabc8", + "fundingIncreaseFactorPerSecond": "0xd0910e43af64de3af2193796129183c96dc10b45310e39b619a7d0757ac69c8a", + "fundingDecreaseFactorPerSecond": "0x4872b1edfe766578d09f8b650a4ee763067ebf24dd78430a93250c335e11cc46", + "thresholdForStableFunding": "0x1cc0ec1c2e44427227c1deadc02aa6dacd2ad6fe4f717975941d91592de7c40f", + "thresholdForDecreaseFunding": "0x794859d2a6787d1b67a4353fad86292b99dfc8426cdb569631275b6c9e433674", + "minFundingFactorPerSecond": "0xe48c7523c1b379a8359993d80cd74c8866c1374edf87ca54efdcc680f7590bae", + "maxFundingFactorPerSecond": "0x6b85ff7923dbdcaa94d40e31a8230cd43c153c52281e5775c18291ba6e07fc9a", + "maxPnlFactorForTradersLong": "0x14b54ef0e1831a9c54fede496291692ee1e66df6c9351bb30aa8733444d75283", + "maxPnlFactorForTradersShort": "0xe2d702533899a9378c8529417bb8e486b47d96c8579ae78e3c7f554f7b0d49a6", + "positionFeeFactorForBalanceWasImproved": "0xfdc95ce18962ec80346835ac149b7d0e878b9287b4e21e6c6347abc5f4be7279", + "positionFeeFactorForBalanceWasNotImproved": "0x1f085622033c2dc07123f921acf0d23c8ec2683bdf5e5d60feb906cabf6bf93e", + "positionImpactFactorPositive": "0x8ed9c512a644da16d9ffeb56300b86343d8ec1b8caabd39ab8d2d0588e9691ff", + "positionImpactFactorNegative": "0x90228e8fa5ec58d2480db04b96119b60bb89081dca601bb36350a27778fb949f", + "maxPositionImpactFactorPositive": "0x5bcc99c3061e5a3ece98174b274241184f11c565b1a7d0b397ab22edae0322d1", + "maxPositionImpactFactorNegative": "0xa9e5331f0cb2f6a2f593b3f9001ecece8888ce337b3b797cd6b861c928492641", + "maxPositionImpactFactorForLiquidations": "0xaef6f97c42028f7f2ecf1a9be354589983b02f6f2626cfc1c9af4c974d0f0acb", + "maxLendableImpactFactor": "0xd9f7c63fb729af60cf88aaa90e68ee7b52730392f719c04d403a4213ef56aebf", + "maxLendableImpactFactorForWithdrawals": "0xcaad66126131ed2a1b3575301196fc53045de0e0f9572e349eea64ade96c921b", + "maxLendableImpactUsd": "0x794321cf0f2e3faed0b9c77613d1023681102117d9ca890823e9e98ee444a5fd", + "lentPositionImpactPoolAmount": "0x2fdc17a13f8c5d63252bc636b6e93a474303eadc40ec43cd0f8fe4237e8b9dda", + "minCollateralFactor": "0xe133878cae3c4cade64dd9fc35e503710527de025473516ec7ab4255b7ccca0d", + "minCollateralFactorForLiquidation": "0xb908a0d05fd278a56c31958e75fceb3c2266f828f50e36653aac06abfa63ed13", + "minCollateralFactorForOpenInterestLong": "0x2679bef46badd361c2e497d2b6cc34a5fcf3cd2c57656986afea25367a0e142e", + "minCollateralFactorForOpenInterestShort": "0xffe9f50af5ddb537dc7db1f7ee077a09d7160a6eced5d633abba3bd4fb8ac8c5", + "positionImpactExponentFactorPositive": "0x7ed00c4bdd5bff160d1641fb2742a224db21f08e649a4c96e6ede337c9318f84", + "positionImpactExponentFactorNegative": "0x0fb425c1b4f00e1acc954c5f3894a454739438a855b4cdc278dca21dafc5fd5c", + "swapFeeFactorForBalanceWasImproved": "0x494f651f940242b903b8614a86fc4a1b9755ef78099a829cf5f36cbe30dbfa74", + "swapFeeFactorForBalanceWasNotImproved": "0xecf226cf6890fdb80b6b9810ef3bf99c7a6a1fde6c359ca84d47543df1518037", + "atomicSwapFeeFactor": "0x4cfe8353701f646c5e21b3ddd13bfd0d674b719c8cc0d63c47185fe618a55e81", + "swapImpactFactorPositive": "0x51b1f4733396d60385c23f5afc960a52938ad44f88e559c6acfd1a5403a46a00", + "swapImpactFactorNegative": "0x84b26c75494f43f94f23375783de0b2bc4870a15b6591c83575cce5c97eb6cda", + "swapImpactExponentFactor": "0xdde1d8557acd68570fcf5c97474ac7809c50d5644a26c87ec1083a53d2396cd0", + "withdrawalFeeFactorBalanceWasImproved": "0x80b6c9d94ac0a99f26960a1037f6946a3df063c670af4abe912a914d8bc31300", + "withdrawalFeeFactorBalanceWasNotImproved": "0xf6d9bcbd1ab4cbc2b0e3056155ae480b9f8838b6672c19155c38451f73615af5", + "virtualMarketId": "0xe9a64e575fb29970589f251a8ac9e316b61bb69bf7165e057804d2c8f09a794a", + "virtualLongTokenId": "0xaab37f889b9680dda34f58a689de3023cb22f7ae14d32a3c1d45798a973db1f5", + "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" + }, + "0xac484106d935f0f20F1485b631fA6F65AeEff550": { + "isDisabled": "0x89c9856c2106293e69670ea8ce6afe27d933ed3974752fa4dc57d77ca1e09f47", + "maxLongPoolAmount": "0x551f43d60fcb6a0790b9e8ac80b01183b7ab0d3d0f16482ff5bb1d2ac954eeaf", + "maxShortPoolAmount": "0xb481b1779387fbbd26f033555192be83dfbe4dc0870c4310729eea2fe7df9128", + "maxLongPoolUsdForDeposit": "0x107b216513556cf79f2a4b743fe854123c19fc58f5c7963107d25c025f497869", + "maxShortPoolUsdForDeposit": "0xa7136f19ef34cf09ffee7725d53169c3fe8ac975a1a3d13e98f89865b28ef90b", + "reserveFactorLong": "0x225b8488bb13815bdd526eb689ed5eaf37a23a8e00353233942f3547c7b0d6d5", + "reserveFactorShort": "0xf91b23ade9f6acd4939bcc922e48ffca593e0f3aa98b757c1ef1036d3f29e5d5", + "openInterestReserveFactorLong": "0x7d2e81d98559220aa29f3a93414dd540ef237da44bd3aae48bd1ded5f6fc1477", + "openInterestReserveFactorShort": "0x0accaff31cb6b330000401d2ae12c1b58d82696600aea9c04803777d80d5cd9c", + "maxOpenInterestLong": "0xa2fb025ac6cad96962041ccd0ccf3032c950fd2cafb40b675e6e7768bf8a9f05", + "maxOpenInterestShort": "0x7336dc3fc3c68196ba9f67a54c68f2d070b40b6e1a9660bdf8401c1a7d21a168", + "minPositionImpactPoolAmount": "0xff095e851c8cdfd79c38d030e6f8d5a360b052fb4a67e743956e7d8d39a61a81", + "positionImpactPoolDistributionRate": "0x42e84cc9b6552cb8df1921d382ab44cf792e750e9a9f96e843787997dd564d8b", + "borrowingFactorLong": "0x72191031efd625abc6e9a2dcd14c871677ecbcec9c23133ef6fb112917b48925", + "borrowingFactorShort": "0x4dfdea98c7936aa2ffb90297797f99b88ed09135b8830766a7096c95df292324", + "borrowingExponentFactorLong": "0xc795f721802e5c39085170691340f18add2144486d5e6a1c605a973970de0763", + "borrowingExponentFactorShort": "0xf2b3d12a2fa233b13ca899d154eb4ae97b428dac1698cc7f3055bcbe1f7e3090", + "fundingFactor": "0x235a8fa7d44ccf8da4d723172585df18a748dfc50267c8c9ce7b58034c842494", + "fundingExponentFactor": "0xe887319b1bcd8cc837f3437a59c64c51579e10ab0f146a251e24f187075d096b", + "fundingIncreaseFactorPerSecond": "0x1a86b6ae123cd2aae1f7f1d93401a61bfdc65777f08f1b36531158439c60f18f", + "fundingDecreaseFactorPerSecond": "0x0ae88beb5900170b081476b1b87159bdea63f605899a78ff548c326491541521", + "thresholdForStableFunding": "0xa3464899cab5a6ccf67a1e6c727243483caf2a75ed4228af564a5a9e28386f85", + "thresholdForDecreaseFunding": "0xfe4c05f8e67f9bb75821e4f71d2bda1670526c2a0d18d0b346d51067d63129bb", + "minFundingFactorPerSecond": "0x22245d6b7a898666a9fd7f437d4e6e33d5d2d7b730c7384211afdf2bcc79d173", + "maxFundingFactorPerSecond": "0xa86c09cf59ada99fade98fd33a57f3247b1d525a9535bc9fd08e97c8a9285f6b", + "maxPnlFactorForTradersLong": "0xa0e8d25cc9d748d441b22357dcbf5c7b103af2421cd1403452cd49d42c5ffb69", + "maxPnlFactorForTradersShort": "0x56734f12d4f9e04878a9825f74619bb91f1969cb88eee67c63a1deba5fb83bf5", + "positionFeeFactorForBalanceWasImproved": "0x93275fd8b0a498847097e77cb9f90ccc3b171eb769132ccdd6632732e5b4cc26", + "positionFeeFactorForBalanceWasNotImproved": "0xde9c514e5816d2a2c01f7a284a356143b7b282bc2952b72f3250be65cc02790f", + "positionImpactFactorPositive": "0x6613779c1f34b831d667e95b065089d7398dff59e86c30d2486cc1416300cdd6", + "positionImpactFactorNegative": "0x87cf584105d9d8a2294b8614c165057bd62c7b07610e65ca9583b73d27b5ebec", + "maxPositionImpactFactorPositive": "0x51ad1ebc0d22987a0f9c328af810d1e3144764302275de91339eaa8c0811b6e2", + "maxPositionImpactFactorNegative": "0x7a5ca76f95b090330f8bc59ac70da8c4fed82b8704c3de743043290f19d59e45", + "maxPositionImpactFactorForLiquidations": "0xb6602c3aa00117fe02dfd56a8b798df6b5ba818b89a563d6db0b13ffbee3bfca", + "maxLendableImpactFactor": "0x2b05d481a8c468a226dd5b69cf5ae7d40b43228ed3d01f1cffc2b9ea213df512", + "maxLendableImpactFactorForWithdrawals": "0x761146170657991e24593e4c6131b6e4b9274848a8b25594603f298dea34ca8f", + "maxLendableImpactUsd": "0x3a0f428dcae62e4008ecdf8f4073d36766e9bb3b2cfd2b547a40374611e0f1cc", + "lentPositionImpactPoolAmount": "0x0b3d23a6d5a1b5f41deaba84d99c8c1f83ec4d49f274b31c7cc395d023bec4da", + "minCollateralFactor": "0xc4b59860c60a6479b61ed1d8bc43e47a67886ad089ae7c545991ac31b6c4399c", + "minCollateralFactorForLiquidation": "0x1c480ef7518db201643c81bba8201dd396660a7a5bf107435d38165668a4b02b", + "minCollateralFactorForOpenInterestLong": "0x265b5f25b8d75d7f0fdb384ab9ac522d7d491dd90009026d874b5a5ef1285c06", + "minCollateralFactorForOpenInterestShort": "0x374891fd631a38c07c1ab326ed1cda2e08cf395f81b7b632ee07a26934703d92", + "positionImpactExponentFactorPositive": "0x5c401911d914489e3a52a1a345729c2d4e45feb701068f63ea7205c5724f8b37", + "positionImpactExponentFactorNegative": "0x00ad8516bcae97e7792435cd451dbe41501d19bcd43f2dfa6ab1f0781197e6b9", + "swapFeeFactorForBalanceWasImproved": "0x51c35eb7e25c26f0f7b1052a9b6788b7b47395f9edfbda77be8a5ab88eaa9833", + "swapFeeFactorForBalanceWasNotImproved": "0x3bab3899c87d776193b261c5096d4efe1d1a72b1462a3c19a5716448f6cc8ba4", + "atomicSwapFeeFactor": "0x05438167d12c75bc2836b9dcb0a8340514d5d8b18392a344c85141be196d6c8b", + "swapImpactFactorPositive": "0x709027473b9d2e03dc12864f440a265466a72876e7b283a9a814f99c9dbb0223", + "swapImpactFactorNegative": "0x68e29374ede02e02223701cb585ff3c8435307ff4be46e66888adb845379c490", + "swapImpactExponentFactor": "0x88e9eb75cccea5b27891ea0ef2f0e543e96d100537e398f5512b8505ef07c4f7", + "withdrawalFeeFactorBalanceWasImproved": "0x0c13122e1a861069f83f58105b3e83c000bb88e094743958b8fde057ac544821", + "withdrawalFeeFactorBalanceWasNotImproved": "0xae2a7587a95345a0d9a30d481bee13373eecf671206665b4c071dba3b96ded6c", + "virtualMarketId": "0x84a75d28c1231e18a53e73821e3958045899c85de805f86c7252d0709b1f6c36", + "virtualLongTokenId": "0xaab37f889b9680dda34f58a689de3023cb22f7ae14d32a3c1d45798a973db1f5", + "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" + }, + "0x4b67aa8F754b17b1029Ad2DB4fb6a276CCe350c4": { + "isDisabled": "0xf22aa19aed877fdabafceed3ade32678c2dffede199e9cb2328958b9d094d9ea", + "maxLongPoolAmount": "0x9fc7dbd00221566b788982a7f19908fe247bdf5bc7c0eb1fdd0fc6f045689cd9", + "maxShortPoolAmount": "0x2f2460e1a2f76d27627487a2aef0c44089314dc52427fb7feca16e182ea83df8", + "maxLongPoolUsdForDeposit": "0x3d797247a36c98731d894327649eab6383388a4143f55448a0c94ff45b673176", + "maxShortPoolUsdForDeposit": "0x2f37f9def7e54a5563ea1be1a22defe0d2ed8a4019ed030fadc2824e74336585", + "reserveFactorLong": "0x112252e97c4c263e9c76b22b7186ed75dd73ccfd57d47b567943367b86707b6c", + "reserveFactorShort": "0x76acc76f1ec29b576cacf9007d99e694f675d13dc89a63c46a740090144a0a8a", + "openInterestReserveFactorLong": "0x24446cc6d06206a771f6278cda97748a1189a91a23f2ae59dc807af29676c0bc", + "openInterestReserveFactorShort": "0x780ee833d235cc43827dca233e13bef55e8d024741a408dcbe3811c02e2bb716", + "maxOpenInterestLong": "0x30fee31771f5e0cb97a2bea0863457cc15ed47e0653a112408884d3e8e127bbb", + "maxOpenInterestShort": "0x1d418dbb87a128c455c52d7af20ecbdb14f0bb7c0fe024aa4f12e3af166498e8", + "minPositionImpactPoolAmount": "0x8cf872d2e081dc49d899f8a721848490e44bf8ac2fc8476ae654f53a6da3c444", + "positionImpactPoolDistributionRate": "0xe57e995f89e7005974f92a0f60ef37a9d81e43d06547944891a1aab54edc87ff", + "borrowingFactorLong": "0x5a23a67615c283bef916c4c7f2cd058ddacf33316360fe5d356dace8f93adedf", + "borrowingFactorShort": "0xb9fa562e61775013264594a2476f61e3ab35014314d85f02c1b3902194e9aaf3", + "borrowingExponentFactorLong": "0x793aeb5a645b7e98bb1e2e3ead398d6ac7c17bd34c3cb25d95a8d795f64b3617", + "borrowingExponentFactorShort": "0xff4ca0e04afb31bbec5829f1477ce2a76138b571f24fd12d5cf2d43967ddcbce", + "fundingFactor": "0x6816c82c66be89243c4c5106a1e0e11d04da9508cf6b1a7e66c32f0f82b5fe88", + "fundingExponentFactor": "0xb7e337bd23f7118d5c0ddff684d10b2376b4d00c38e9066ef5459ad57f0f1f46", + "fundingIncreaseFactorPerSecond": "0x64322532c4f7f8403ce6733694fe8e4c012099fa144c2ff94be11583b4cb014e", + "fundingDecreaseFactorPerSecond": "0x8a339f1c39d457b1400973569654b97ac90fae3b569603d9aa83d9be419757d5", + "thresholdForStableFunding": "0x3d374f610ba3b95cbfdfe2d6c4fb4a135bb20b6ebaa7dddb024f857ff91343cf", + "thresholdForDecreaseFunding": "0x0e8b18a1bcbced183fea6d1285b847f107e21fae02768c89054d10683fe48f15", + "minFundingFactorPerSecond": "0x1dde1ea310f8c20d52c3980fb95baf0148a7d42d27946629138bee6d9e768a32", + "maxFundingFactorPerSecond": "0x5d1c69f57258126332886c18b4bfec7075c94a770e513f85abd4d84946a41394", + "maxPnlFactorForTradersLong": "0x5ce07cbb2d980a190af2105f5605eaa4a638c6dcf887a88172e480b263172d49", + "maxPnlFactorForTradersShort": "0x73faa3ef82cf2acb8b101a351116d1b793da2a92827a0fcb38ec76e47e0f0c75", + "positionFeeFactorForBalanceWasImproved": "0x048d665450eba3fc9f340c1a747086ea4f3d47fd6eff34c9c6dc55cd05033574", + "positionFeeFactorForBalanceWasNotImproved": "0x07b15c0d2aeec79725798ba1c42940974f6fdd254cdde33fb56a1b33b7018680", + "positionImpactFactorPositive": "0x32dfe97991c68be58afd913d3a13b3aef7f8fa15e682650603985484d3306ac2", + "positionImpactFactorNegative": "0xec2f9b53f59024552bbd0c22fe12d9a7889ce6364a2c7ae4ea68f7fbc53b65eb", + "maxPositionImpactFactorPositive": "0xa384f93eff7a31937e43f20a86890a2ff0e76854c8a908cecad7ff624d7c845e", + "maxPositionImpactFactorNegative": "0xc1d3ccecc9456ba2022e5ccfac533e279af422b92dc5276d1e49dd20a8601d5b", + "maxPositionImpactFactorForLiquidations": "0x28234987298d05741b9de9de0bcbcecc07447c18912db192a9593fac1aa906d5", + "maxLendableImpactFactor": "0xc17835d2c635549762a07e8cb04a62b893146394a4de28414c3af3e05bf39c65", + "maxLendableImpactFactorForWithdrawals": "0xf6af2b065b56f614c0ac05bbeb97985e1b13dfaa7f4848ccd366917a8295e456", + "maxLendableImpactUsd": "0xc0fd53c1edbdf3e910e9e77d7791ee3d9f1bdabc78a11df0a9479766d71e9c52", + "lentPositionImpactPoolAmount": "0x3953f73beee3b4a65078a93cd77173c1b2a85e339b496c498188dc938864350e", + "minCollateralFactor": "0xddffdeb232b60c90c858524a68bef6cb7a1edaeb536a9a316dcceca1409f783b", + "minCollateralFactorForLiquidation": "0x8408c74ecd0da99be07c56ef437700903d1002bb40f3ffaa89c74ddc7cabde75", + "minCollateralFactorForOpenInterestLong": "0x6aed3f08d37c5010e9c8bc452b0f1fc4ed5c08365864779a4fc0208b5be5580a", + "minCollateralFactorForOpenInterestShort": "0x5bf0ce5f3270e96ec87dbc9483d275dac918ef74d0a266ddc7cd41e1c63c0dac", + "positionImpactExponentFactorPositive": "0xc2d7d649263647beab3f6d1e113ebec55f149e827aab640bbcf7b6dce774dc57", + "positionImpactExponentFactorNegative": "0x8b7901f76db65becc81f897dc470938383301424aed9fecd40a05882594c5f17", + "swapFeeFactorForBalanceWasImproved": "0x7693f04659d3edf08393ea3a73a0b4df142401aad7ed9642f7497beec31c4723", + "swapFeeFactorForBalanceWasNotImproved": "0x4328dcc3e6ff3b6245a11f9b69cd85d5e9bce102f1d232ae0ec86593c956b2b5", + "atomicSwapFeeFactor": "0xb5476314e659781460a8e41002397d0f1563ee9c4252d40d2bd7b5395a849e88", + "swapImpactFactorPositive": "0xadd51b62f37698a6452b09ffcab654750e65f4d5dcd2f9daaa667ff9102aba25", + "swapImpactFactorNegative": "0x49ccffa002007375ea108f339f5b860821e5d7ac701ed3a988a08a7f384a3b87", + "swapImpactExponentFactor": "0x8359de4c926f758c2f38b9df355f0fde7473bd480799d8171eb83fc5a7569ae1", + "withdrawalFeeFactorBalanceWasImproved": "0xd49f2ec9552b165a2aff1f4a087e099ec3045eee92705ecedd2c7bde9c121d81", + "withdrawalFeeFactorBalanceWasNotImproved": "0x290c8e61b3f20211c19f616faaafbb0ded26c1274de4c1f367f78a2514db8e30", + "virtualMarketId": "0x6d3a32d540d5188b0b2aa7adfde91cc2ef8befd2f70d36f6d3c7023ff87c3b69", + "virtualLongTokenId": "0xa59040b7efb6b7122a74cb318a192ebc6732849dff5332ee3ba40b90dfa0a04f", + "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" + }, + "0x0164B6c847c65e07C9F6226149ADBFA7C1dE40Cf": { + "isDisabled": "0x364cb19488a460ed21c5b2d721cb2ea716faba517ad75422ba3c96b800a05a73", + "maxLongPoolAmount": "0xbcc5868d7fc783b4ac5d43a422c2e6b3c59dec4ed0d1dfefbc7c9d4a89bde70c", + "maxShortPoolAmount": "0xed29ca1b056ba9e5399769aa37d41dce0423dfc8dde950c294749a004f1e49c4", + "maxLongPoolUsdForDeposit": "0x151cd3f2fc8c28eb90844cd03a00e662590b159e2d939464e1fb03f8174a4771", + "maxShortPoolUsdForDeposit": "0x478975169f5a0a23ec788415f4ff59f7a06a244293434473902b67eb6df232be", + "reserveFactorLong": "0xea17c9642e201e624fd8f2420cdd91bbb9ab1e5973cda3fc0ba84cad0fb5c982", + "reserveFactorShort": "0x7144d7d084388e6028a8f7415c1839ac941241fce733e14eebfaa270a31d23d6", + "openInterestReserveFactorLong": "0x4f8914f1269a3fe582c235c62ed671bc1e087922b1e7a38a8c36d3241dcf5540", + "openInterestReserveFactorShort": "0x3ae23d2b026c6368f8a4c4274e7d1acbb7cdb5441253d173b83b02a27e399a7a", + "maxOpenInterestLong": "0xb812dc863b50fb5a19d65fde8edc599823c99fe542c7463575ec8e7d91a7fef1", + "maxOpenInterestShort": "0xab29b8717408deb8d93b3b3c79f715e5840fe5134f6beb8b5052cd2d8b877562", + "minPositionImpactPoolAmount": "0xb042540395349bde49091c8c5a6bb0727f799d4eb9d18db186d579623085836d", + "positionImpactPoolDistributionRate": "0x68f457987c1a54bed2562b791db1c2fbf44474b407a86b5c0bf81e9578884fe5", + "borrowingFactorLong": "0xa4b07eceec10a9a407b859a768df1ee99785abcc938434cd9b8d1a19255e215a", + "borrowingFactorShort": "0x83db6b3c9216916c948deabba0a14cd4030f1cc5b6f46598434966198d6ba05e", + "borrowingExponentFactorLong": "0x5dbf13cc4adb9094d944285f22ddf69e3d3a8eb9dc2d64fe1ee969132e32004b", + "borrowingExponentFactorShort": "0xcf5f3c86f4d7d0b4a1cda19c128f81613c4a4f27c8f9449a92eb4a9577ec09d1", + "fundingFactor": "0x11102a2b26cd9ea6a469f10b83c8eed4b4135828888d5d84710f4e067459d363", + "fundingExponentFactor": "0xead6692d7c9faf7e97c270e59f8e0d8af847b028ee23e39a32ed983893ae170f", + "fundingIncreaseFactorPerSecond": "0x5be96928c3c6c849ec3d9c56950adbf48830eb2417f5d36ee32f87227c7faefb", + "fundingDecreaseFactorPerSecond": "0x0d1eab1df7c0b4382290f8ef7940d47679afda55589d3cbcf334e6e9fd225e92", + "thresholdForStableFunding": "0xb8c81ff19c43a1316fae2dc138ec4fc9f2fd6703c9624cd903d8c541b8d96553", + "thresholdForDecreaseFunding": "0x61f8c88234ab1e12b5abfb06c6c208717ffb947f838728b0b767becdeac8a4eb", + "minFundingFactorPerSecond": "0x9b246673d2d98dec66c6495370e1d7ad3aceb62399db904e9ae303ea6edf2b02", + "maxFundingFactorPerSecond": "0x05506ece989822a3ae89b665ab67ea61284455971a69a5a23bfa1a7d832d5182", + "maxPnlFactorForTradersLong": "0x8b5445a5879fdeb8534f5218a328c4cc78bf71f214e7515d605cdbffd72d6fa1", + "maxPnlFactorForTradersShort": "0x200d46407f028ffc2a907e2d38b02375dbf6a578d5f7f160f7f4c9f70afe280c", + "positionFeeFactorForBalanceWasImproved": "0xcdce08c92cdb6696d530a11d56a163acd39f79dc31b46071ae3ceaa0577ee249", + "positionFeeFactorForBalanceWasNotImproved": "0x4e6970890d1317fb443f0ed296f2a607d482af05ae4ccaf73994485194d79219", + "positionImpactFactorPositive": "0xd91bfcf3fb2951a48bb438ee066c1b73483742998246d23299ecdf2608ec43a6", + "positionImpactFactorNegative": "0x2880b72b9532cc0c57413845f4515f8c265395870643032d674b896c8e3561c3", + "maxPositionImpactFactorPositive": "0x61f13945732ba6798125676cb38d7ca6ea0e581063dd70c5824f408005fe07dc", + "maxPositionImpactFactorNegative": "0x86a92935dccb2be3a24b0baa296f0e20c2faf5283a2afcd1a110af709b0522d6", + "maxPositionImpactFactorForLiquidations": "0xb4bb20c8afbc9ada7072570ffc383c7aad764454d25725570a6afca28d664b13", + "maxLendableImpactFactor": "0x6018a5d8a4fb03129867cb947cb44e3128b2d8a7961a79df15142d19c949e6d0", + "maxLendableImpactFactorForWithdrawals": "0xc137ea6836e3e96189938a72e0ee144a6b88c46325f48948f8ae7a96c18f608b", + "maxLendableImpactUsd": "0x007fa34cfb1c7e59561d78a68363a683a3eb465de43b54f1b9eb63e028a31040", + "lentPositionImpactPoolAmount": "0xef3df2978730b46e4d5efac7e11d8279da53a5c57b87dc071a5dc167284f4e6d", + "minCollateralFactor": "0x05ae5343c31817e7f75cd7a65c2c555bb7967d740b0de8af1bf35e0397a77a5c", + "minCollateralFactorForLiquidation": "0xbb9809088f60a396ea11c74b99eb7e24ecdde99e5367ebe2d5b5f3b750ac2199", + "minCollateralFactorForOpenInterestLong": "0x265987f5a11cbc2ff03ec43811842f2f93093939f02004a496980b501332bc5a", + "minCollateralFactorForOpenInterestShort": "0x7a166fa9ea7e2583ab30e57aa522267e9c087600f3799f11d845c8f5fde684e2", + "positionImpactExponentFactorPositive": "0x6bddab3e5af34b897063c1c8a6a033ae675f2d23d06e27b3f1c1ed42ca9b28cf", + "positionImpactExponentFactorNegative": "0xa2cada2c3f8987bb15e07727d182bd4eb4c524ffc4a3a30a98c21001c9d37418", + "swapFeeFactorForBalanceWasImproved": "0x2ba3a34d41894bd878fa347f79a47ef3c01bc21c3f4f2426058a3bb6e888aca6", + "swapFeeFactorForBalanceWasNotImproved": "0x2ced52436c8dc4b822acfe89f503371b4376cd1021e18fc80d0c928947e92f07", + "atomicSwapFeeFactor": "0x015d59d4f10be34286c313b3d423e12782026ede427f25d9d979974939ba52f4", + "swapImpactFactorPositive": "0x2f72ebdb5dc847d698eda9c5db343576cee29dbf8061f7a4715742da36b25097", + "swapImpactFactorNegative": "0xaaf8186f2f0a59d375efe89c4a50f83e477588f3abe97740f093b67db365798f", + "swapImpactExponentFactor": "0x24c20731e40c1c1ae59eaf19f7e2d3b63fd1cd62d5ce928e9a483ba0a8558b29", + "withdrawalFeeFactorBalanceWasImproved": "0x173af18c98014b52ce91cdce35f6dbc3561cbfca23da320cfbcba2c286ebc3be", + "withdrawalFeeFactorBalanceWasNotImproved": "0x4782f9ffcde5c5ae1d01f56bd7fce655fc0058fe2f8e5e499c1c07d894b59704", + "virtualMarketId": "0xc02d51cc51da7c0b548e632643797f8bf76ee8bd8f12d18f57225e520f98daa3", + "virtualLongTokenId": "0xa59040b7efb6b7122a74cb318a192ebc6732849dff5332ee3ba40b90dfa0a04f", + "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" + }, + "0xe024188850A822409F362209C1EF2cFdc7c4DE4C": { + "isDisabled": "0x9cffffbd78112bb2e419d41f03f3c26eafcdb5cff3a811508b1a8b5a792f553b", + "maxLongPoolAmount": "0xcb145f958006e6e1c7be44bb619462589ed7645672272c2669869fc2eda38748", + "maxShortPoolAmount": "0x7634b5e36f073f6304ca6c6ba2791971220ff1428b982df5d3bff108fc1d832b", + "maxLongPoolUsdForDeposit": "0x6c87370cd6c79398d1c06869f7adb4ce0676fed95d0b6381486260ce026aac44", + "maxShortPoolUsdForDeposit": "0x63d243aa84767548281ac82b4cdaabd3972bb7e94b41f4f4719b45f83fe542cc", + "reserveFactorLong": "0xb5296e092da27c1e344c1ae93caca6eea165b0683e190d19fbf7cb6a3a093fc5", + "reserveFactorShort": "0x5ca87e72df9059058ca23cf4c8661d079988351357afd0eae5ece318ca1c9d0e", + "openInterestReserveFactorLong": "0x89fff31f4ea872f4eb54abe6bbf0d4cb71a4d392d25fd5b299a6914e9b4fcf4d", + "openInterestReserveFactorShort": "0xc4d72ca5ef0a878adfa8eaff9f4c439ebc06c70e681e24a6386be923b74521ab", + "maxOpenInterestLong": "0x781e8287f8737d05592996fe9411874f84e476c87681cc037ad350be3a08da9d", + "maxOpenInterestShort": "0xf8576d3547cf9aaaf084669d7d310cfcf38233264a37efffeaf3755e0611e3fd", + "minPositionImpactPoolAmount": "0x7306bb3263584ca90c59fbf8c429577c32bcd45881dafec422c223607cac8f85", + "positionImpactPoolDistributionRate": "0x5eaf020f133810bf89a37df9b7c5e5487b05710bcb7274d38e0fbcc4fbcc4569", + "borrowingFactorLong": "0x19b1df086e53a26d4b79798bb2ac62837488c807989e78a3b6ae5b9106b775f3", + "borrowingFactorShort": "0xdfb466e61c46ee4342844d3bb05507b496128283b46d38fa00f4ee3f3ffa5568", + "borrowingExponentFactorLong": "0x1e4068c2cb4b825e8c3488e7413543791a2d57a4a340d4b240743c7ce9303172", + "borrowingExponentFactorShort": "0x1bf559bc2c17de3ce1d2d97cd8f705a69f663864bbd6ad7455c28d643df75510", + "fundingFactor": "0xa6c8daecd0ffcfc5503b566f6655e64b27dba43398c62de50cb6ccde629f703d", + "fundingExponentFactor": "0x6eb1260df05150c9a6c1abc80a2169ad71aff272578760ff8af1129f68251271", + "fundingIncreaseFactorPerSecond": "0xcdaef36adccaa56553aba6cebd6a1b495b838e1d236ff88fbe9bfc418a7d399c", + "fundingDecreaseFactorPerSecond": "0x7f62c3ea6e7bb3236ee92e7afb7a86a45922ab1efafdd6258047ee3f5b0b164e", + "thresholdForStableFunding": "0xd6f9b4f46f62817c7c233d1afbeaf73b1a2b58e9cc68ccce16ee1faa0c9a2f22", + "thresholdForDecreaseFunding": "0xf367bc8833729e8ab4c59f40efe1b537e3ea20d367c2ab76a11c18257030cd37", + "minFundingFactorPerSecond": "0x97a8eb22c8d41d8ec0819c2e31a36f1770b24246693f2092a2a9865d9a65f572", + "maxFundingFactorPerSecond": "0x2f072ff002a35898d1c86aa7fad9c8cdebfa6bf293e6f76f1350cff8ad574288", + "maxPnlFactorForTradersLong": "0x1717df85229b62725697c4b540f3a96180e36802b558242412eb1af6b8dd2c9f", + "maxPnlFactorForTradersShort": "0x22127b724a17d9acdd0c580e29f6d5b8cf5c2ed1687bc676db46b2c64b6d35c5", + "positionFeeFactorForBalanceWasImproved": "0xd92ab42a61b29e13bd88b25f9fd346e0f6aa4ae0037b9a84dd044f75e36cf8b9", + "positionFeeFactorForBalanceWasNotImproved": "0x75a708c4474a7efce0c6adcafa8d199b43f78843496ec860a2d02d01e95cfab4", + "positionImpactFactorPositive": "0xb2148715017084612dea5f84063d8e3bc47eb2646b2b08afc61157feb78a746d", + "positionImpactFactorNegative": "0x7823bee86c24a5e7794742840dff74e29ab748c0dc9585d2cfd3507f9638d2f5", + "maxPositionImpactFactorPositive": "0x265e7742570f9cf2cc6433a14f414f02b9145fa49fbe8fb7662b60ec9842b3f6", + "maxPositionImpactFactorNegative": "0x742a4344c81ea9902e4888f3c231b2da2ed99f0c0737e8aacc8cb56c30b78fa7", + "maxPositionImpactFactorForLiquidations": "0x1b496d4019e4d783803a21407d27e5dca718c373dd244d17cea27fb29f3c0ecc", + "maxLendableImpactFactor": "0xcc75bbb39c7095c1cdd183035ea6cf99ae182a65f9b6e91de75cb9a8e3aac1fd", + "maxLendableImpactFactorForWithdrawals": "0x53a6b6920034341910068787fcac56b78d63cdb6addca1c11d7e7bc2fa194f56", + "maxLendableImpactUsd": "0xd55f5cd61fc97b163622a94c57ebe90ed318abe97742ee16556dbe4cc741d44f", + "lentPositionImpactPoolAmount": "0x1b06ad6dee18b1eb8f86798052b817971ca74181fb248e1b805e74732cdd8a6e", + "minCollateralFactor": "0xc48265d33e1a021a3c0f9a0ffcc8a5e5f6b8380f6de749c7d086b17f7a81e581", + "minCollateralFactorForLiquidation": "0xec73349035a21f4c4c7461776d30d1cecee6022e57f239f40796d0849af369d1", + "minCollateralFactorForOpenInterestLong": "0xc6148ecd4995be59adbe98f6f487df1472b03d0e18c2a96e1c0a72785e6bd164", + "minCollateralFactorForOpenInterestShort": "0x77d6427f9ebd541ab07aad12de4f469f4800fc402d03c3487e94bb65072b8e12", + "positionImpactExponentFactorPositive": "0xc85c50baaf1cf4f2ee291e92355ebeefccac242ee1bebeb48c5b83218af53109", + "positionImpactExponentFactorNegative": "0xaf883f2a33474cc53b8ac595a1834100a1f080d8ad3af8e3b421bb1eaad238a5", + "swapFeeFactorForBalanceWasImproved": "0x5140ba8bc34a8461cf6380623fe8b8ef11315cfcdcb096edd32eb3393a24753a", + "swapFeeFactorForBalanceWasNotImproved": "0x0c7e2445b8c5e110fe20f6e6ec1f2228c8a6012814810f1c4dd0074dd68ce86b", + "atomicSwapFeeFactor": "0xcb60c609816623c52bb75f647f8c3c15b2ddfb7ecd8addba8d8fa95286ed3eaa", + "swapImpactFactorPositive": "0xe66bcf8ce85cf04687fde329431e9ef2d4344fe1f2332289ec5eebb7bdff17a6", + "swapImpactFactorNegative": "0xd04414e841e609602388edd23f99c8abdad0b083798ca34342489a8e351a135f", + "swapImpactExponentFactor": "0x04f3f38a2e3a47e603755ecb377b52d7338ab4f35f58267811ef07dcb670df0e", + "withdrawalFeeFactorBalanceWasImproved": "0x88e3a63380b7a858ed59ce22df7e766852019f9883bbf7f6d9b90f954237f41a", + "withdrawalFeeFactorBalanceWasNotImproved": "0xb640d10193c0a313af7c9c344619388e5d1ecde9dd866c770b1ef3a6b8923a8b", + "virtualMarketId": "0x3d8524bf146baf615be4250ecfe3d1ce935826c0e168f7999b83479f6d655d3d", + "virtualLongTokenId": "0xa59040b7efb6b7122a74cb318a192ebc6732849dff5332ee3ba40b90dfa0a04f", + "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" + }, + "0xCEff9D261A96Cb78Df35f9333ba9F2F4CFcb8a68": { + "isDisabled": "0xe3cfce6d90d5602c15a247148eeff5b17b1b3fd20ded5185bb276f2d452b5c8b", + "maxLongPoolAmount": "0xf077e2537381df8a85174d5e4adb9f85597799a4d5efa9e79553b0d4b45740a7", + "maxShortPoolAmount": "0x4814c50267026680d394d5f1866e674b8962ecbbe728a42779424d6d19e4fec0", + "maxLongPoolUsdForDeposit": "0x4138928ebbe21a694a482026973b8303cf19c6b99d3aad6d189773073f4b6a20", + "maxShortPoolUsdForDeposit": "0x7354dc11024036b2d5134b26ee130a87906c096a39e5569433f9ebfa4a35c847", + "reserveFactorLong": "0x40fe2bfb3a1215c730e9e984cdc97f7ad89bf6507c7797540ddefe6ee84c27d4", + "reserveFactorShort": "0x3fa6a5e2fe3ef1f730f4087fbc8031b12eb07761d62df65efba08c0e14eed6fd", + "openInterestReserveFactorLong": "0x68424607b0348a317ccdc2d284d475b127c3e7dc9e1d99c7de9dfbefb4fb385b", + "openInterestReserveFactorShort": "0xd64eb040ac323eaca46b21a49fc1283002022c85ae338fa362cd0a7aea99dc84", + "maxOpenInterestLong": "0x760b94808cc66345f436191cad4c53cda59fc6d2a64419b5e7bd7f2c392190d9", + "maxOpenInterestShort": "0x0a39c3a502f2fc31a632fc9809875de2029b4edbe6f054d97a31d280a43a71d6", + "minPositionImpactPoolAmount": "0x73ed7e1b743c7bafd4d58aadd95de0e0c977427f73669d8d584c994092400154", + "positionImpactPoolDistributionRate": "0xcbefa7e806988223c2c8af74fd2ac1ac7ddb926e56c850e4b9d96ca7939a7e84", + "borrowingFactorLong": "0x521eec987ecc938460ff6e7b107fcd99806ca3f933bb618fee425b8535a6d584", + "borrowingFactorShort": "0x30a3a9f480fb91695d38bc88157b77cbf2afd402e32ea620e6a903d9bc6b60fe", + "borrowingExponentFactorLong": "0xb3a46ae161ddd30c7e60fe554105797afecf99a15e8066c43eb5dcc86732c5a3", + "borrowingExponentFactorShort": "0x5296a9872aabdf8e0f283ff4c12686a0e327310dbd32d7978b8f979ccf7333dc", + "fundingFactor": "0xd376ec38f2974896cf59b51617d9c5831f303da30481d12cc5721f51e61af84d", + "fundingExponentFactor": "0xd96fef64e4d48911109c9ca2dffc871a1e6acd34813e11134dad1374b92830df", + "fundingIncreaseFactorPerSecond": "0xb04b1b744ff10184b3609cde47ea37e1e334e2f43829d04ab73306acf3cafaef", + "fundingDecreaseFactorPerSecond": "0xd614f1f5f8794e787bc9b5106659cdd0261aba41f3c5043c9f5c83fb0b495bd4", + "thresholdForStableFunding": "0x16decbe9979c8aa88f72c135f7d24bddb11a5ccea3bdb50c07d4c101e7669430", + "thresholdForDecreaseFunding": "0x2da5480a69724a472b6f2e2a1312ed27d2b4aed056d7080a4b8a50237d3d6e24", + "minFundingFactorPerSecond": "0x0cdec542cdce608aa1f8206f47b95a969a8587e3fa8e37a5170d6614fae42fdc", + "maxFundingFactorPerSecond": "0x6b105f35f20ff1b5cb28112ba6a4355d533b71b463354a0053b48723a29ba6c6", + "maxPnlFactorForTradersLong": "0x841e5a4b6f9c436552313cd3ce8bca6d09ebb90a11d2449e750aebff0dd00607", + "maxPnlFactorForTradersShort": "0xa27f2b9a7269072308ee2bf830847949284073cc089ebec2d955f66b851a62de", + "positionFeeFactorForBalanceWasImproved": "0xda38d0a44533d97deac0873ac7c359bed755ac698e90de6639e76a571659a948", + "positionFeeFactorForBalanceWasNotImproved": "0xb356e45b292b9f34840da93569e54c3d767ca378e33fac0ce7c0a9505371f730", + "positionImpactFactorPositive": "0xfe8892e6c23189ff2b32f2ce2603609e67371f197f9d97987421f18876e7c7ed", + "positionImpactFactorNegative": "0xb4ff2ef9b4b8125745179b31592365c59249b2687f06e4c49b4070e6d3814461", + "maxPositionImpactFactorPositive": "0x75595914ad014769bd327141fb73ff33d1f1a891a0b44be7da44d0a1c030368e", + "maxPositionImpactFactorNegative": "0xd55d226837d67e5d7ce352da69adc0eef322aa300482f7c81516d084823a6da2", + "maxPositionImpactFactorForLiquidations": "0x555a07a8457dc5a80738d1fc08f8549f9173f27cba6b0c2dd2c7e78052870fe5", + "maxLendableImpactFactor": "0x7fb7fbf57c57d71cb2eaf43ca62c79200316efcc8e6ef8ac9eb026c045459a96", + "maxLendableImpactFactorForWithdrawals": "0x87cad193fd33f6ee51d2a08f147794f1b064295bdee640a44165b3be46f629d2", + "maxLendableImpactUsd": "0xd5ca6bbeabf69c4e5283286d9c1969c55b5db90e1d1622a2acb0e8b8434554c7", + "lentPositionImpactPoolAmount": "0x1e29402aa2f88266cbfbab669f6c5a3ddc52c7ac54e111cec5aed7a61a8fcad8", + "minCollateralFactor": "0x3185b55bf2373394132424fb0836d0fc5c88b0835355f9bb0c5c4b7b63e85c54", + "minCollateralFactorForLiquidation": "0xf050efc337d274d96e17ffaf6f8cb47aa7cf00d9d7d0d73b5a61321c5c443b19", + "minCollateralFactorForOpenInterestLong": "0xccb3bdaeecb9c248a425924fbc38d7dca0cb5f82def7bc47d5ba82299295df52", + "minCollateralFactorForOpenInterestShort": "0x34a2c8af1ee86666272a8e026328426c04b0b9ba2c79a4cf0dcbf6d51c7bf297", + "positionImpactExponentFactorPositive": "0xd5685141eb18b1d41b0ed32f83a73e3d5f613301d15e5bf42d23f8781097fbe1", + "positionImpactExponentFactorNegative": "0xec2be66c2406bc1cc79252dc5ded6d9bc1eff86ad03bda19d95aba185b04f184", + "swapFeeFactorForBalanceWasImproved": "0x0c6acf989b6db09dbfabe8b0428bba33687c7b5d8693162ed1dbdfd7f961eeac", + "swapFeeFactorForBalanceWasNotImproved": "0x5b36f28b990b39d304c8ebd75fa3d0e6f3e509c2e0acefcbac538ce28209656e", + "atomicSwapFeeFactor": "0xa167d79f5057466f5a267fbc953589df3a025ba47226b4f2a919828b3c490556", + "swapImpactFactorPositive": "0xdc2e0abed167739f74d3ff43064d8a35e7911175da14a4c7a774d5d90e38259b", + "swapImpactFactorNegative": "0x63080e73f908991c1124ae36c754865c4c223468b693f3e08b7493c797c6620f", + "swapImpactExponentFactor": "0x76d039c0c8a8e9fa62f72b0fa8c706a13bdd6d039a84f7ff851a64dbf73914ad", + "withdrawalFeeFactorBalanceWasImproved": "0x342e11b1d4dfd1903d6607f8ac087aebeb6f5f8fe7535467302047d014557514", + "withdrawalFeeFactorBalanceWasNotImproved": "0xd10837802f28f4a688d89f8e5d53406671daef3dcdac03b9b5bf67ce6cdff512", + "virtualMarketId": "0x467dc057355fa4341193e8ff36fee538e45e34e08e411af944a2768be9ec791e", + "virtualLongTokenId": "0xaab37f889b9680dda34f58a689de3023cb22f7ae14d32a3c1d45798a973db1f5", + "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" + }, + "0x6d9430A116ed4d4FC6FE1996A5493662d555b07E": { + "isDisabled": "0xbb71adf7ec8890380728d1f8cf3d32205fd6b0127d3711535a77c2d8dcc19623", + "maxLongPoolAmount": "0x68cf10be0ada6ceeefe5a2d52a0bd284ca606578c277d73a12bc4da0c9f858bc", + "maxShortPoolAmount": "0xf95d6b485088d63ab53a63350c2dc8939054e2093ef8aafd73e6c7e4739755f4", + "maxLongPoolUsdForDeposit": "0x3f92ce9eb31410096547a62072238ad028ee9bff19478ae7b2e15819b9659764", + "maxShortPoolUsdForDeposit": "0xf377184fda9fdfd2bdc741ebba672929e29801b9b9ff60e8591be0215a8e47a7", + "reserveFactorLong": "0xfb83be55342c02ae23d9dc21a2efd06d705be8735e1caa09a18820520a07cf16", + "reserveFactorShort": "0x3fbc4a2707b802367e94427740b592e8eeb8a3911d1fae9dce486bca86c39862", + "openInterestReserveFactorLong": "0xc9db23b753c932593a1f95be795b2f447b7abfae9d6e7930ef40050a9fe3474d", + "openInterestReserveFactorShort": "0xc36be73adcb1b53b598f18d96429f3ad38e62aa90d7359f1910090acf18c07da", + "maxOpenInterestLong": "0x9988b67f3f0bedd6528c90de33573eba3741d7fa50b5cd12e0c32849c653ea34", + "maxOpenInterestShort": "0xeab2e29209d2601e751d54335d52bdc2da5d3f6fb3e9484fcfd558d57612f183", + "minPositionImpactPoolAmount": "0xfbd15176a23ec55b1193c53f49a91db7d0610bb786e90a1a662b303bf395fe98", + "positionImpactPoolDistributionRate": "0xbfeeaa8444855a7fc65b246b0a537f35c0c5a1bf364480acedf5ce02081388d7", + "borrowingFactorLong": "0xa9220395ebf57e98ed83bf9e9d9ddb82646c8e6d8974f45c5f5bfc16af12be39", + "borrowingFactorShort": "0xca5cbd981f397d1ca87d1accd6b60832b6159de0ccd56f339f6ac0b6ee9b6ce8", + "borrowingExponentFactorLong": "0x939135c07c6e0d8d7867cc607056dc11e0e62fa2dac3ea4aa9e82f0e86eece5e", + "borrowingExponentFactorShort": "0x042dab67f3d11e1f2ac6a516d58fbbb8b38cfa88f9d9a38f08d19a1b34cb4882", + "fundingFactor": "0x1185bbd2745892ea34f955fdba509ef7d3b8ab0617dadd3b45326317573d04f9", + "fundingExponentFactor": "0xdf57e7125cd25adb36126d07d272c385b5357464436b869555b7b9ca5a41d0c1", + "fundingIncreaseFactorPerSecond": "0xc65c1324703329f24544fd58b448168f5761a97015cef54bd2e7daf90a89c535", + "fundingDecreaseFactorPerSecond": "0x2d9b63259a9f4b7299683450a7449e7863708cc497a7f7f8c2d801dc63194e90", + "thresholdForStableFunding": "0xe752aa3ae21ac9502da5185f6ec56ab6a3f922eb4f1c6711bdc940095d46f158", + "thresholdForDecreaseFunding": "0xa9f7e5fc6df17e6d2318700634fc24ed6bf4c3876da47473b2fb61a04d62571f", + "minFundingFactorPerSecond": "0x1b90dfd9f27d2dcb5c34ffe3f34c111d159e347a7c3f1315c0b0d4719412a24e", + "maxFundingFactorPerSecond": "0x6098cf3d97f2086c3f254e53dc0faa62512de1f995dcaab7efb9227bfbbe6467", + "maxPnlFactorForTradersLong": "0x27f61b51b3f9dfa78184acede67ccc3cdc34e0fadb04e4d6cac8385f98f114d7", + "maxPnlFactorForTradersShort": "0xbc21a73f02cd8f903137e25288beebec893f7953b04499726796622d31cf42f9", + "positionFeeFactorForBalanceWasImproved": "0x21d5e1f9209a026b0b3b61712e941cc1c6be8ca0056cc46a3fd4a1797a9c407e", + "positionFeeFactorForBalanceWasNotImproved": "0x2c3547c1597a348d3634e7e84971ff5e1e0d20e844483c93c08ff56c875ed093", + "positionImpactFactorPositive": "0xae9d41463ba45b9a2a04d370ff6ca02093c1cfc36c982cd5951b081d8a3024ed", + "positionImpactFactorNegative": "0x9d2712b972e75279529c5580e28dadf9e9e7ca66eef589c20bd382bc6708be65", + "maxPositionImpactFactorPositive": "0xc1e67c544e69cd2468a7ff6a95b18c738efd4eca1750c057d44d18fc62bd8588", + "maxPositionImpactFactorNegative": "0x6f48b976ea693b9026e9e34071056155e45d4cc9347012d16beadd74f00ba31b", + "maxPositionImpactFactorForLiquidations": "0xb467fbff7104aafe423dffa26f0f1038549fa5e151ed319c013c6b58a07ca86d", + "maxLendableImpactFactor": "0xb9291df48ca807521cf30e6612aba5c6bd1d1b72e0844234f9d754877e480792", + "maxLendableImpactFactorForWithdrawals": "0x8d95b5f621bf42a21bd98c42baf08bfc57545614063f8170a334745f5e943aca", + "maxLendableImpactUsd": "0x7e432dd229f26310026fdf2d9174d79272e7de8c4bd666f8e2cff15233e0dc6f", + "lentPositionImpactPoolAmount": "0x0c8f1418611615aee06a9b6386f6adad8fd22e1f5d2f7b769f53c9fa56836bc7", + "minCollateralFactor": "0x6be438ec71a764b9f3c861f9b6bb3964c5a3d1caabc7ab453ed96df2619ac355", + "minCollateralFactorForLiquidation": "0xd905f94762acc39d2cb7b1c42a10dccb9e79935ed53d8eccbcd33ef613573ce1", + "minCollateralFactorForOpenInterestLong": "0xb08a14fa17317eb2cdec8d15c25e4635dcc5f57ca474c2c58059c11d9b7a75f3", + "minCollateralFactorForOpenInterestShort": "0xbf9c57c25e29b05bd548cf7c26d8833fe69dd2157d21d114513c20ced7f86c12", + "positionImpactExponentFactorPositive": "0xe4d7386670773ff4beefdab976bcda08d28ee4b0a66691d941dd616c565be807", + "positionImpactExponentFactorNegative": "0x844356a60a7ea0890d3a4c250e8ed8442bd3deb70efe0f71ded66d37c2c3d4a9", + "swapFeeFactorForBalanceWasImproved": "0x496eb040da865ff078f58d36e8fb94d06e5934e67136bde6203612cf7339dd01", + "swapFeeFactorForBalanceWasNotImproved": "0x7480e90041d069b2c339dc3d7799085d5f5e578d4ef9dc8b1fb1f16c64e6aba4", + "atomicSwapFeeFactor": "0x800e5b4a38b19ac2caaf2d0d51a91c04562697d9a4d74ff5a007feb3fd3ae5c7", + "swapImpactFactorPositive": "0x3183d789cf2518d3f54880f90ffef296a6a75fd1a0db33cc24c83a3c441a3e54", + "swapImpactFactorNegative": "0x5866fd8f18f2cd65344dfc21952250c35e719716d0366f96ec172b1becacfbd2", + "swapImpactExponentFactor": "0x79de5430be95c21bd65c9e785d81c98ac127d94412190b874486556ed4f7f40d", + "withdrawalFeeFactorBalanceWasImproved": "0x40089898962c3e2d10bb32001b4e34f42518d34fa716749ebc85dc115c52a65d", + "withdrawalFeeFactorBalanceWasNotImproved": "0x7f4ab3b64713dd5ebaaf8661bc32076010b39ac374fb184497244b78095cbd7f", + "virtualMarketId": "0x892b08caa7ea49ba00313837431ec83748bab544152f3462cb499acf7c020860", + "virtualLongTokenId": "0xaab37f889b9680dda34f58a689de3023cb22f7ae14d32a3c1d45798a973db1f5", + "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" + }, + "0xcf083d35AD306A042d4Fb312fCdd8228b52b82f8": { + "isDisabled": "0x05b0400fe8d305d58adc3fe8370d778b1826f5974764312bb4018b1efb9324d7", + "maxLongPoolAmount": "0x0a28ad1a90326b86082f7b8a6fd55fe1f363acb155595ecd7720fda524dfd019", + "maxShortPoolAmount": "0xba92b3d5d364db62026898c198d147c2050644311ba43317f17a9b5d5521f882", + "maxLongPoolUsdForDeposit": "0x69f7da27d50cbf41ade818a600c6ea36e2b45748c17b9fb675bcb18045ca289c", + "maxShortPoolUsdForDeposit": "0x1cf50462bb89121308b6193c85e670db350f0c3c53c4b4a676a3a66a72059046", + "reserveFactorLong": "0x448183dfe29a89440ad63376c6a8897e70ceda47197cb25128afc8de0d010055", + "reserveFactorShort": "0x62ff7abfe9d5908f855de6ab685f665650a7fab8ca00a17f2484783610fa6d1a", + "openInterestReserveFactorLong": "0xe36b26d1f9da0d9c62d368629e2d5cd55cde8935aa7788358419a6ba7b3a3b35", + "openInterestReserveFactorShort": "0xaeac4000c45610ad9d433551d7afa8962852be0d66a348efac6cd3aa88ebc21c", + "maxOpenInterestLong": "0xb23108637af886c6eca96374e53f93c8b0619c01defd6e55de6c693c2ce3de54", + "maxOpenInterestShort": "0x8d5a441784fdd3baa3a2d55e8d87e8590c50c0a00d6985c856b4987c34380e64", + "minPositionImpactPoolAmount": "0xf287c3d7c5d4d84a824e5c3dee5470542626a30106f120ac975703712556e155", + "positionImpactPoolDistributionRate": "0xf9107efbd2701ba3a83c3ed4184d81460526afe78b203ca3b2746acd0996855c", + "borrowingFactorLong": "0x61a0f521d8f87e20b3399b218bf98219d791e56452fe5bd9fbf4634a1577107b", + "borrowingFactorShort": "0x24a314caa26b9b0110e28309bfe05d3d68e4883dde21067efe546093538c0d3d", + "borrowingExponentFactorLong": "0xe9bd5bd0385e3c7340aad9e57fca04eac6a241991b7410d8e413377b8bc38b49", + "borrowingExponentFactorShort": "0x3a7b07cf186a397e68d8fd6e13795fa86c0d20d249f0d733849e8bc8e10573e7", + "fundingFactor": "0x79edac7677e487282a8bad53060fae6ad923f38365e5114227f5dc94706c3bc2", + "fundingExponentFactor": "0xd6bd42187806cdaa5a5a80c13638805073ee2ccf6d6e334521e37f3d071481d1", + "fundingIncreaseFactorPerSecond": "0xce2c85b3c1a1042ad8ae7538016c0eb62634f64bce40f1d008e4e326252cf614", + "fundingDecreaseFactorPerSecond": "0xc3d8703068050348477cc505317fd90eb8f96b748726df8f2739e8aaa51b0b65", + "thresholdForStableFunding": "0x3052f19dfb9bc691ba22241530cf0d30fdf4ff729786430c977856f073c45e4d", + "thresholdForDecreaseFunding": "0xbff16398f2aca16b37e216ad2b30a7f7717f29dda56288a08611cb57c2ba6bf4", + "minFundingFactorPerSecond": "0x39a9b4ee75d15dbd6253f49bbdfcd9c6495687e57b6ab091b7b268a8e65f92e1", + "maxFundingFactorPerSecond": "0x3d111ac4f3ee1a0d58681cf09beddaae415034f0de1f429a7fd34f23dc1f2d75", + "maxPnlFactorForTradersLong": "0x971cb538e9db5772185706fff0db9f79ec9cd89941228f625b634653d6a7063d", + "maxPnlFactorForTradersShort": "0x1ae4fc416ac50e34980672a5edef3d3f990c6ba2e585c133b6220ef465d4f3ca", + "positionFeeFactorForBalanceWasImproved": "0xc03853f4160461daf56059f2028f244090af3f266eb792e8a58bbb7f260a0598", + "positionFeeFactorForBalanceWasNotImproved": "0x550f0f5c9fd0a36708b43d2401e6dd2e32d72637fc97abf34ccf4895c9d25de0", + "positionImpactFactorPositive": "0xd19db3e69d3c02590241ad2fd01c70ec78dfb2653ce810a002a74ffab49fb785", + "positionImpactFactorNegative": "0xbafd54443c94ba5f224eaa1e6ba7872e38cacb59224acc5ebc04df8b187b3b46", + "maxPositionImpactFactorPositive": "0x79866fed0a0f65de8304171b66ba04140d70a934e4f77d9426fbf8967139495f", + "maxPositionImpactFactorNegative": "0x8274b7528cd368550dce44b6428db82bae132fc1199d716b5d9cdf6a1c350c14", + "maxPositionImpactFactorForLiquidations": "0x87876aa56e00fc287bb5dce2eda7816c8c34237d5f30f84d85117d76fe54b33b", + "maxLendableImpactFactor": "0x1dca3eafe2f5921849a67d00d99d7eefdf2467c0b26bd09e5605042bdac84c5f", + "maxLendableImpactFactorForWithdrawals": "0x8cdf99c757416011ab063f05299a78cae87bbe6c04a2ee941838bbb72851d720", + "maxLendableImpactUsd": "0xc75abc1f97d2a360431b3cde533c71afed653808fe4ba1b85b7128159f21d632", + "lentPositionImpactPoolAmount": "0x74088997668e46ed0931365a71fbc884923a64b8b9149c4c57ae07713f0d362d", + "minCollateralFactor": "0x24ce8067a043b83f338fe5222c518d7702f1b8802a8ab1a245358fab0acb0307", + "minCollateralFactorForLiquidation": "0xf1fb2e44730b2818a5ad2f261ec25de1d80539c2f1cd81c98f27c3729701f555", + "minCollateralFactorForOpenInterestLong": "0xc96034ad39ac403f6ff020f58e367b6a145f0aa786993fbed65d4049bd63891c", + "minCollateralFactorForOpenInterestShort": "0xfb60868bc58229e221f318f15bde0f5e8992fd1f48b5f89a920384006cacd14a", + "positionImpactExponentFactorPositive": "0xcd8f9aeede3fbfae4d78dc98cd8b54560b652ccac128b1bdb2bdb09eca04acd1", + "positionImpactExponentFactorNegative": "0x96e9f5603ee1472e450528eeebb11916bd5c7f527531efaf087c076b3969b141", + "swapFeeFactorForBalanceWasImproved": "0x2f401f2247adbace68585450b47db663d31eabc3427041950d94dd42267fa999", + "swapFeeFactorForBalanceWasNotImproved": "0x834ae49c87d0f6165b42058268dc205593a948a49de8012e4fb79d1ed759fa9e", + "atomicSwapFeeFactor": "0x5fe454216752d62ab7209b374012916db823a16786bc2323bf417e7af6066a1f", + "swapImpactFactorPositive": "0x1db46c5d86e9606472be2fc94456437907012a141f8b9cab54768b949e3be673", + "swapImpactFactorNegative": "0xa61a701a2ef299cd623394ab44241e30415341876ee5e650812e5a0423a30571", + "swapImpactExponentFactor": "0x46fed69dfaae605ba976128e642fa0f31a67947b66daa3b9cc53000837cfae71", + "withdrawalFeeFactorBalanceWasImproved": "0xcb58bb6b9d7b3bfa4bc4937a288b41274be9bda0f1c131c3642d5b574f285e2c", + "withdrawalFeeFactorBalanceWasNotImproved": "0xc0cac67838054ab0e7f3b822a66acd7eaa43a6e1c9fecdf27567ee6930fac019", + "virtualMarketId": "0x19ff9cd7cb8dc5632a40e2c95fa342b671fc1a7d1142df79421abc53b697a26f", + "virtualLongTokenId": "0xa59040b7efb6b7122a74cb318a192ebc6732849dff5332ee3ba40b90dfa0a04f", + "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" + }, + "0x065577D05c3D4C11505ed7bc97BBF85d462A6A6f": { + "isDisabled": "0xe11b4d5b203390abb0dd3196833f7a0de94cd121444c6458003e39fdd98c6ac0", + "maxLongPoolAmount": "0xab5cf5a38a06862700b3942a28a071908efa43badfe3dcf923645487c27ed0c2", + "maxShortPoolAmount": "0xabd017e19fe28351ef9ff44838e210e8a92f8d6e29cb2dfbf5a0df7da554e35f", + "maxLongPoolUsdForDeposit": "0x8c473b4ac4e73febee91abe7b8f11cdcf3d3a23dd7e4dac6e489221860c2b6f4", + "maxShortPoolUsdForDeposit": "0x4dccee49ab5cac4b7022272705b05a5d691d8944d56bb850f65b6604c1f52798", + "reserveFactorLong": "0x260628d648b07078e74a09d277d2c15e30b405d9e6e7beb91d0699671c22321a", + "reserveFactorShort": "0x92b8a3104baf6aa766e2dc51a8783c0388da792834b01219ada6b152f2542e1e", + "openInterestReserveFactorLong": "0x136d854dafc804dcf8b479443e68852df892bc40e400c30a36966ce8251fe0af", + "openInterestReserveFactorShort": "0x27022e93dd120d3ff4ecd0da4191f9727cae546af9198222cdada11178191a2b", + "maxOpenInterestLong": "0x5dc829ece0d0c9a399255f4a3dae9de7c721150804ae4c302a7a8c40548ce995", + "maxOpenInterestShort": "0x948c4472e09e68247c33a5d498d27426120a05d321449cee221dcfacffd587a4", + "minPositionImpactPoolAmount": "0x0a2fc55044358362c5edc698781b61c84528c4dee67e6e8bd97f5be593e31186", + "positionImpactPoolDistributionRate": "0x492247b1e2505f5a4c7aeacb25eb7d39cad2aee8ca5dfd06940120c1f553e0ab", + "borrowingFactorLong": "0x1a4383b3f219f5b26907853fdd3009db23eb1e4b16b75e2d512f281894d30025", + "borrowingFactorShort": "0x7b7aefa1bb299d0f4ecfea50ac2eb4f1cc692093d092c04359e5337d94fa5004", + "borrowingExponentFactorLong": "0xfb304363d2856b4453ac7d1e31cd3e15186852151bf06f5aaaffe4002553de75", + "borrowingExponentFactorShort": "0x220a4254d90f124a3fdbfdd8c141f92b833084f2c8e830708198d2f2fab11cdd", + "fundingFactor": "0x358278b4f116c6d2cf0d1c0897c7dcc6bd58874477967beed7ab3d188d0c8e27", + "fundingExponentFactor": "0x8b8ef2ccb47ae65dfbc7e0c98c8bb40dcb10fac557315e5f2fa9de4922af9769", + "fundingIncreaseFactorPerSecond": "0xa6ba1b02bc193105d7932aa1da569198f03eeef76ca7d908ff2ae042a01e1412", + "fundingDecreaseFactorPerSecond": "0x1bfeee93cd1cdce2db4fb82e410706681c9f96d89f853ecc2dbbc8e51a211aa8", + "thresholdForStableFunding": "0xbaf53f051cf429de92bd26734dcab60f27b8b0d9e315b7fd0636b8f1aa712238", + "thresholdForDecreaseFunding": "0x8ea370e85bff629c1b865d7699e59a5ae85e612747ac9ed09fdfa9c81f805837", + "minFundingFactorPerSecond": "0x981b5bb2cdda681c042e5a335391e704d69205f2bfe11b496a3b640a40465b8e", + "maxFundingFactorPerSecond": "0x062f4556ba9f3c15bce56c4c035b5cc0694383c792325bae02541d69929e8b09", + "maxPnlFactorForTradersLong": "0x5c8c88689553806a1d9e40ff22ef4d4aae380c7511e0236e44980ccd480880b4", + "maxPnlFactorForTradersShort": "0x7c5f1e37c1e1d5bdc7272d5e6f413c5b07c6653af05aaefe2ee52bbc0d235621", + "positionFeeFactorForBalanceWasImproved": "0x7694847194ccd41ce158c438000e7f13bcea40a8276ac192466d01ea2cc76574", + "positionFeeFactorForBalanceWasNotImproved": "0xf0449290598c5d0a33a27dbf0488e7faf22db1d1c4e882866f878013ed332db8", + "positionImpactFactorPositive": "0x7ceb5a855670b618aee1f0b66e00f29a6b6807499a83e6d09ae70f0690218cbe", + "positionImpactFactorNegative": "0x0c0e4f8c6dc0c6909fbc05b8ae8dbf3ffe785ac4613c4fbf05618ccd6e9d54c0", + "maxPositionImpactFactorPositive": "0x9f69c166b726aae9113bb0105ccdaa48358a3a8bc8b4cb05d56916d87c664b92", + "maxPositionImpactFactorNegative": "0xbf5b745052add72211ff794d98aef557e88b503939b9765298a49dd5abaeaa46", + "maxPositionImpactFactorForLiquidations": "0x5624218f54d7d1fdbe4846ef827cca29ea3efe1da0199aa010a5091115dde506", + "maxLendableImpactFactor": "0xe5ba2a1ee678e10bebfa4f49181018c35d9091fb31b4184e983ed7db19c664d5", + "maxLendableImpactFactorForWithdrawals": "0xb06c991f01677e88582a8d5d3825887ab204953090d4f64b686f9e9698e5dd5d", + "maxLendableImpactUsd": "0xfb3d42bae3161d2c483e98a883b8ae74d9aab13ba22ebbd5f1b3585a59e84331", + "lentPositionImpactPoolAmount": "0xf4848bced20528f91484aedac8478e7f98b2129c351aaa457bae1648a169049f", + "minCollateralFactor": "0x9403099530553b8ccbef34b4e3a93fdc5bfa3747cb0fe7371d3fcee5c2657dc8", + "minCollateralFactorForLiquidation": "0x364a42768797daee1c1bc497be38717d3c80553999da803b12e2afec804a605a", + "minCollateralFactorForOpenInterestLong": "0x3d696b409df0cd8e795af9593040b2e0b167dd22858b77d2856f21c90336c807", + "minCollateralFactorForOpenInterestShort": "0xc141b6ac50e0ff939167d174d2ee4edd7def1f62a2306f1f8bc5a8246c8f3a5d", + "positionImpactExponentFactorPositive": "0x0fa804dea1009f2b3dba4d882dc54b3e37b222885522347dbee8967ea7429bf1", + "positionImpactExponentFactorNegative": "0x693c3e943a1708b5544ec5727686088f9d8d3f59bd4b81536a2825022bb62869", + "swapFeeFactorForBalanceWasImproved": "0x19e1c22620c990d3fb5fdf0df46098d321fe7d65dd3f5489a48704c0eb759a6e", + "swapFeeFactorForBalanceWasNotImproved": "0xc9b0abc6e731ed67a2690ee4e2edcc8a099183967b76c22e1e4556d3ef5fd6d4", + "atomicSwapFeeFactor": "0x3913d06049cd1685bba987246da690063c50428447fac69d574e92c150cda577", + "swapImpactFactorPositive": "0x6c63877b2caf2aa8be69bc9623fda94e55ed29b3cb5da2fa01e7c8865369a427", + "swapImpactFactorNegative": "0x32c553625befcd1e42b1b994054cf4bbdca5d60c04ae8fdf2668c2851d6b6506", + "swapImpactExponentFactor": "0xedaed034cddab5a36a836c10dfcbb46c1a1fc45a4d88821a500eb59d5a80f79a", + "withdrawalFeeFactorBalanceWasImproved": "0xfa43f83c0ef8caf42863b5d83d82417e1b38a2cc44eb209ab555437228c4d9ea", + "withdrawalFeeFactorBalanceWasNotImproved": "0x6214d80ddccd7c47e77a39b7807b10464bcb4a743ba79cd27f2b74eff5a6f2f6", + "virtualMarketId": "0x9be83a3cc8b7b688e5bb766202dc49ec976a3d5ee259e5386afb64e5ce4554c8", + "virtualLongTokenId": "0xa59040b7efb6b7122a74cb318a192ebc6732849dff5332ee3ba40b90dfa0a04f", + "virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960" } }, "43113": { @@ -6058,8 +6679,6 @@ "maxShortPoolAmount": "0x44630fa5d5c083995307eb4e511374be8eb3681fb47659637f5d47084c9f0fe0", "maxLongPoolUsdForDeposit": "0x3c382f71e9e0cde61d1a3ef465ece64c438eef564dd9ad2991fa364b1fe59448", "maxShortPoolUsdForDeposit": "0xb9425baf97cae56d24eace541f53118601642821221107e564568ecbf09184ba", - "longPoolAmountAdjustment": "0xfbb2742785fdaede3abee57c2e0f553f9200ba41b2548a450edc6782b0c21537", - "shortPoolAmountAdjustment": "0x4be90e5cab76b40146e60fb7a4883d8970207086cc810611c51c67b4b18095aa", "reserveFactorLong": "0xdaa590cd4f8986624d5f6ab46eb611270e4aaa5b9eda91c0a2ecf35b382093af", "reserveFactorShort": "0x3b28007f1fefc8345745ad01db9423ea4ebdb56c68b71c6da73d1accb50f317c", "openInterestReserveFactorLong": "0x14185ce19e572458d85ebba467127ba7d0ef06c3694d3f3aa85c588bd7369553", @@ -6097,13 +6716,16 @@ "minCollateralFactorForLiquidation": "0x363406d304aa67f7d3bbde74f80598186c221785469b490cb4927732ee1de679", "minCollateralFactorForOpenInterestLong": "0x3a15736cf99d0f99680260b5422bc87fd69925adbb1387bf7048191f19cab935", "minCollateralFactorForOpenInterestShort": "0xcf4ade53abb36ffbad4b0f4ae1379faa82afa998f3a47875c9986f82cedd274b", - "positionImpactExponentFactor": "0x376b7203a91e73beffcee3efd325eb4e5f07101811d7f211fc36009ca3c95b91", + "positionImpactExponentFactorPositive": "0x5df2572d88724b45ac620ffab1a97e482c6b449ea0274536530cf781e7727612", + "positionImpactExponentFactorNegative": "0xf1354f25fdd295ed866e1f4964cf7ed741f4b125472d54e3e21749d4e69acc63", "swapFeeFactorForBalanceWasImproved": "0x0f8107aaf93b9fe210573d13194d9f77eaceb15b8771c42c821a0046b76f94d0", "swapFeeFactorForBalanceWasNotImproved": "0xc6659dc00cc2d64bc22cd4217267efab7bd990328add0b4bc154feee535e0c6d", "atomicSwapFeeFactor": "0x788e6796662b5dd7c35ce1b4ff0d9af55b38c49eca63a9d2560f226d15721a71", "swapImpactFactorPositive": "0x915a610544b2e035a83207d2f281b51c24cd0d652142267d6d4eb3690a449afe", "swapImpactFactorNegative": "0xf38fd5205d6308e37a289083eb9bf290becf831331de85ae14d6b8e2c0d9c839", "swapImpactExponentFactor": "0x9762e6daac9702ee4052c875bf12c8c18afc24669a6373f713b6d5f3b2988a4e", + "withdrawalFeeFactorBalanceWasImproved": "0x0ea2382367a11c74b5ac8e18351fdb6eacc049df459102c2c1076308f4b3e6f0", + "withdrawalFeeFactorBalanceWasNotImproved": "0xc4135f8540eeed09558684a98db908e8067987bf50e2e006212502848d21c5ac", "virtualMarketId": "0xa40b31b9a01422e45d08c3d561f062dbfb67d96188136b0ee46c5337855ac5cb", "virtualLongTokenId": "0x9ed6fdb2c97b9163ca317ca8473fb94090ec4a9ffe05873e5f5c7c1a9635a4a2", "virtualShortTokenId": "0xe725e5be11641c39c76c9c4632887409d48033b482cc32020bca3dd6a846b180" @@ -6114,8 +6736,6 @@ "maxShortPoolAmount": "0x16b67511f143d0e1f102221fa69ed28480fdb5df7ae0f0eb03ddfef54f16a7f2", "maxLongPoolUsdForDeposit": "0xd82bd1478b369050f2281c0855c43cf386d12972cbd0973b52e896b1f1646872", "maxShortPoolUsdForDeposit": "0x4fa317a09cd123c22503eb8703b7ef6415a7393e2ef84c202ae091844d3d85f8", - "longPoolAmountAdjustment": "0xc6133b07c95d1cf379c29a4f30041c12479ce5a34aa09140b6a4a4c2606220d2", - "shortPoolAmountAdjustment": "0x980f5fb209239613e3a66cedf7a56d4d11c59241000368c43d7eec4494b0ee16", "reserveFactorLong": "0x11d484baedd77a99cea8e16f616058386696edb29833947f4405c66924781f16", "reserveFactorShort": "0x516b521f2987f42eb4ae7c40f93f56c03f58d2a2b68e259ff2ef34694962d69b", "openInterestReserveFactorLong": "0x08d2e6d1ecaeb61b7651da137e010adca74cf2c1ba5b660d85658d843af45791", @@ -6153,13 +6773,16 @@ "minCollateralFactorForLiquidation": "0x4675a79fa14651780daca8e35375904acbeb2958eb5414537ee4214241ee8dbb", "minCollateralFactorForOpenInterestLong": "0x6cf8feab7ea0d8a785b057c390baee97be69e93f87bd3b5ef1b32522ade977e0", "minCollateralFactorForOpenInterestShort": "0x0b5cf2a96425f12b6771217757ad7d3eef0e1a618e0d28884219088615a51649", - "positionImpactExponentFactor": "0x54962ade4b4aac31514ded3d1b37063c949d3579f0ffb707be0d92b66cb3279b", + "positionImpactExponentFactorPositive": "0xead222cef85305c85551f15977212d54bc05827d2d350c058dc54a9a8e006b1e", + "positionImpactExponentFactorNegative": "0x361b71c4ca684ce4929deb4aa64a089136f43d6b352f80534ebbce44922661c4", "swapFeeFactorForBalanceWasImproved": "0x620fd8da66402524c473af3d4496c67b9d787ee9a73d0b1ebc33c2ca501999c8", "swapFeeFactorForBalanceWasNotImproved": "0x8b76d4be7c26e5330ccd659b7b84869b2521aee30ad02c0f64dde54d33ba740a", "atomicSwapFeeFactor": "0xa9b44fdca74a0013f9f5a792e7c24b494f5f530b98830110e47b0d42c5fbc47c", "swapImpactFactorPositive": "0xa6ac9172d7f7529d6a77a02977721eee7008f596226749c98b3cd137f49b0309", "swapImpactFactorNegative": "0xcbd4c14cf1648fdf9f19d309a2d11d4ac497544d25f3a913d864cb326abcf08b", "swapImpactExponentFactor": "0x4f79dda5d67fa79de75a32bbb31b26de722b1282d3e32860aaf16aebf440459d", + "withdrawalFeeFactorBalanceWasImproved": "0x5bfa42bc377730f0717267b6a59c2555f62e0abd3a55f6952e33d3f9f5e60422", + "withdrawalFeeFactorBalanceWasNotImproved": "0x431f777236e19bb4bc774e398ce121d83b458261728c63d1581351a1d5a189a1", "virtualMarketId": "0xadd9722dd1c6cea4b2cc277e2966f1b2d03b3e4d50cc598ca78869fe75ddd533", "virtualLongTokenId": "0x1197dc1f26a5d09df65747e701aa5c198f33661b36a49a71e27bb33cbbdd6794", "virtualShortTokenId": "0xe725e5be11641c39c76c9c4632887409d48033b482cc32020bca3dd6a846b180" @@ -6170,8 +6793,6 @@ "maxShortPoolAmount": "0x136d61fe4080e805e09b3aa3792428f02a67fa588fd379c1fb7442e1c1a1cd9f", "maxLongPoolUsdForDeposit": "0xaae75c711f42022d91d34ebc08a9a40645cfecfd0fbf618549bf3f640a5842f8", "maxShortPoolUsdForDeposit": "0xd521e39583719ca6e281b4578ebef0df7f40698691f22a9365247e0369c2697b", - "longPoolAmountAdjustment": "0x646ed4749ef962bf35749f47d8a4dd396e7b9e3d4d2d6a6c422ff228b94da0d4", - "shortPoolAmountAdjustment": "0x961d6e9b5e3d510d485b78e398d9e6e21fac2a36a2b3a69a7e33c9425be94918", "reserveFactorLong": "0x460d17ecd760ffb06dfe59433a915ee0d9a94deee52c16332e92164c258d8887", "reserveFactorShort": "0x3db62a6245ed8110a2e6090183a3a5bb808fb33ae3e3b153816e484b91991a4b", "openInterestReserveFactorLong": "0x18503bb67bfeeaaf6f315a430d531bb8bd8c649bb1d87f93142350aed23caf43", @@ -6209,13 +6830,16 @@ "minCollateralFactorForLiquidation": "0xe92fa6b0415f90201edf5c668993487dbedb71de9bb489cc4bec41ecebb369cc", "minCollateralFactorForOpenInterestLong": "0xff9fe8e3365a18b999251316da505a550055626be033cf34378f1afd550a4f5b", "minCollateralFactorForOpenInterestShort": "0x770be0a07523fcc86290097d7261ec89c9c2e6b811a5abde348eec9b6afb5bf8", - "positionImpactExponentFactor": "0xc64593f64cf0192c99b011e0843ca58075f1d4b6dbc285f91e812aef624b75f3", + "positionImpactExponentFactorPositive": "0xbdc7b6de080ff59995d1adf7d382eb77775ab49da1bdac5a3b2a48ec3811766d", + "positionImpactExponentFactorNegative": "0x6c0291e834b4f4e8b82f6e3e5c9b224109c92b50442ee85467b6c7abf2d33d66", "swapFeeFactorForBalanceWasImproved": "0x4ef7984fde2237fdd6c76d410cd45733e29a8208a1a444d416a4cf2c552455e2", "swapFeeFactorForBalanceWasNotImproved": "0xe14d026478c114bfabffde611c4387b3c1ec943f2fc6b1304d98755239ac4946", "atomicSwapFeeFactor": "0xc4d687e7509a762728b1ea111a0ce1183ee56281a43f6b3c16a44a935ed87041", "swapImpactFactorPositive": "0x4b1439a3ac79073d516183f0266a7545a2d55413d776d8837dbba0d3238f3744", "swapImpactFactorNegative": "0x15e3223c9f47dc35339b9fcc3a24b9984db33d7a74d7e949f62e3f082f005e20", "swapImpactExponentFactor": "0xe8bfbaf25ed510be1d648f3cfc47f80928dcce48b8e3de792bcce21079984ee6", + "withdrawalFeeFactorBalanceWasImproved": "0x585ab20cbdbf2841986d07118fc749c284207748a0138cb1357d4a3e1ef324fa", + "withdrawalFeeFactorBalanceWasNotImproved": "0xecb4d1b4e5de12a6a46df453883493738513b01dc93d0ca90d262712814435eb", "virtualMarketId": "0xda53e89b74c9a98f95f79f47378029e3e834e1f8ec6f9802f85e7355e2de0d95", "virtualLongTokenId": "0x1197dc1f26a5d09df65747e701aa5c198f33661b36a49a71e27bb33cbbdd6794", "virtualShortTokenId": "0xfcc3d486e44df648e291c838d8a9375bf61b0dd765ecb45bc541a6d6797caf0b" @@ -6226,8 +6850,6 @@ "maxShortPoolAmount": "0x3eb46f37e14421ddf480a6cdfd5417a68936ff6bfad0e41d92dff7459271c149", "maxLongPoolUsdForDeposit": "0x829cf781c1cd9e1da6914abd9f99f40ab11117ef46fb6150e347a09d7c5cf87f", "maxShortPoolUsdForDeposit": "0x829cf781c1cd9e1da6914abd9f99f40ab11117ef46fb6150e347a09d7c5cf87f", - "longPoolAmountAdjustment": "0xecc5ed201011d3de950fb42ec5f55d874a137e880b5afd6808208ee29f4285ed", - "shortPoolAmountAdjustment": "0xecc5ed201011d3de950fb42ec5f55d874a137e880b5afd6808208ee29f4285ed", "reserveFactorLong": "0xc29df4e6e9a08cf4a3d62a7adafa0ee23d05853c519599bf7e76e8ea2b5c314c", "reserveFactorShort": "0x80fed72cd59f82f7e20fd2c5baff0a857dd44b634b09cbc89745308afa8389db", "openInterestReserveFactorLong": "0x7cabba2a6613a79a3edca7aa08c1f951653ff90bd2f1582595e6bbd603e09203", @@ -6265,13 +6887,16 @@ "minCollateralFactorForLiquidation": "0x87ff74340b078cfd33cae47ce1e3ddb268a2380d8badb47bb14ff760be63c9a8", "minCollateralFactorForOpenInterestLong": "0x8cbab030e059e5061c5844541de54fd884103976d5748b1afc27800eb6956781", "minCollateralFactorForOpenInterestShort": "0x964f5425e2d87724d0e98f792e7d202ad30cd08d5b28a305041ef1365fd64c24", - "positionImpactExponentFactor": "0x1a4921b5ca5088e7e780e76a9b8c2cae1f8c46ad9238eecd0677d65eeb88c8a1", + "positionImpactExponentFactorPositive": "0x92659cd9f2c2e76db332864e1fdd3970ee1326f0e987ae84939d9d556b6e9c1c", + "positionImpactExponentFactorNegative": "0x079d736b7f91dcec79a5efa454c8578d98cdc34a5b991507976a24b218acccab", "swapFeeFactorForBalanceWasImproved": "0x6f04144bb368e6acb012e2a47ebfe5802a7aeb1a89c990f21c1c805091c45e74", "swapFeeFactorForBalanceWasNotImproved": "0x62632c19dc73e4144e7d5c11add032ee54ca6c78c5bf178800e5fc530e3f6c5a", "atomicSwapFeeFactor": "0x40fedddf9a8da6ade587f270ef4508b82a4eaeff05567fc8fffe4a1e958b4d49", "swapImpactFactorPositive": "0x0b7287e535216c5171cff8248a990ebfd8cff085af5f7b8d599679ad5642795f", "swapImpactFactorNegative": "0x2a313049a3fcf67138a26bc513f4c9fdd1b9585276633b01dd5de9092ab96423", "swapImpactExponentFactor": "0x3f4613e8874352a37ea67ac77a3d73f85f46d1096e67f9ab6e6003f28bff3ca3", + "withdrawalFeeFactorBalanceWasImproved": "0x5bc2c6b475e61274cc9a4c21f2c87d4fe33e4d5cb7fd5a5d0cdc2748705e24dc", + "withdrawalFeeFactorBalanceWasNotImproved": "0xd13d878801e521edd5167b09444f5effe9c976779247dfc64c2847ae651ec6c8", "virtualMarketId": "0x74ad5c27fb248f871bb15fd43edde411d458427fe8910c5e072faeb19dc946dd", "virtualLongTokenId": "0xe725e5be11641c39c76c9c4632887409d48033b482cc32020bca3dd6a846b180", "virtualShortTokenId": "0xe725e5be11641c39c76c9c4632887409d48033b482cc32020bca3dd6a846b180" @@ -6282,8 +6907,6 @@ "maxShortPoolAmount": "0x5fd99b3c855f1fa93572b75c823e8f297d04c7b77b1498612959078ea051908b", "maxLongPoolUsdForDeposit": "0x50f956592bf01608aa711fa7d545ab5b8668ac441fc37c357443a22b1befc938", "maxShortPoolUsdForDeposit": "0x996877ee0d696e9d0a7e15c32ed26733454b092026ee7cfa96e3c5e7e05f6583", - "longPoolAmountAdjustment": "0xb83d50fa0a5a89d58bc7951014a64c869c3d22d962647eb1a57edf13489b1ac5", - "shortPoolAmountAdjustment": "0xbbd3ffd81fb11c3c726eeba06d80aa51e1cd320a03f72eaf4a6cecc1cea45769", "reserveFactorLong": "0xec489f58be7fad56494387415a7b47b49844bf5c10956bcaae915f8e54e960d9", "reserveFactorShort": "0xd9ba40720349eaaaace6e4a720ffbebcec58b3dba451d609054e2a5a7e9c9658", "openInterestReserveFactorLong": "0x92767f35f9631f8552da59fe790b1e4fecc5cd5da745726a881f02b1ada8e59c", @@ -6321,13 +6944,16 @@ "minCollateralFactorForLiquidation": "0xcbd111c1ddb157b7224dfa2eebc5b69b6666e02062258c016e027a45b66059d8", "minCollateralFactorForOpenInterestLong": "0x3ee6bddafa71cc4e83b9278ef2f015a79ffc105e946f4b46c521388432cd9939", "minCollateralFactorForOpenInterestShort": "0x02a996d1421fa2442a1f27ce3c7f58aee300fe3089fc26ec58f76f12d1faf28f", - "positionImpactExponentFactor": "0x8ed469b25e2d0ab97824ae5523c62e7010f10d1777fefd34b5035c6cfc03a10d", + "positionImpactExponentFactorPositive": "0xacf57d757dbb54ffb7a4434a752a71a0c575f5668a0cc72af2bb4cdcb284b446", + "positionImpactExponentFactorNegative": "0x862e3382950825311dd4007065a9f7c9dbc97619bc3e0b1134442d6cbd3bfaac", "swapFeeFactorForBalanceWasImproved": "0x4ca3b7aa799d579bba5612492862b5bbf5f22db53b16b6f664e01e2089fff96f", "swapFeeFactorForBalanceWasNotImproved": "0x7892b0a32c16b5e6569488049b577a75dc35440887bd5ff698747b8e8b09e079", "atomicSwapFeeFactor": "0x980e9ca063510ef3ccf46dbbcfad2ab7317123c8c17b73377123f2b751281a82", "swapImpactFactorPositive": "0x1feef3112a12fa7240eea516d9c5fc70ea06e89d908422e4232c8bbf77d9bf65", "swapImpactFactorNegative": "0x5159d374359947b125e79c43605b0fc3a99c2ce395723b046cea6101d0c2cc6b", "swapImpactExponentFactor": "0xf8a49893dd52d401bc8615640b9a0b489fc7d0b89dff990a52d2b2d4d718670f", + "withdrawalFeeFactorBalanceWasImproved": "0x352d2358d1e7236cd02a535fd987c299cf3c1c1dd1550d2d0f5ad12b935ccbdf", + "withdrawalFeeFactorBalanceWasNotImproved": "0x087899b9ece626b37a312a16956f989541cef25be8d3efd82f6ec78b03bb2707", "virtualMarketId": "0x3ec099aa949140537caa26666a53dd7eb5d2d5e9e54bdc1c905347ec27c80e9e", "virtualLongTokenId": "0x8ddf9d8fb09ce58ba879fb48de730c9c3cb0ccbf0475f4e71be16ed6c1d3e22f", "virtualShortTokenId": "0xe725e5be11641c39c76c9c4632887409d48033b482cc32020bca3dd6a846b180" @@ -6338,8 +6964,6 @@ "maxShortPoolAmount": "0x481e51709718432b80fc71458185546ede273b5d41c30bd953ba4e8511e90581", "maxLongPoolUsdForDeposit": "0xefe4e54c3babf378ef188428f0a0f478142487543cf7216d75f28c2327990081", "maxShortPoolUsdForDeposit": "0xae897d8a420df0f25e1bd51d1c4770e4b59e6f0f8a735eca65688b9f89e06a5f", - "longPoolAmountAdjustment": "0x3ffb950b7dfabff88254e8ebeeb5c936a182c7aa976a1c1af0c2ca18f2577139", - "shortPoolAmountAdjustment": "0xe5e19b732e25ad83e9dca6b03d7b77ff5392ecc54fc741a566a2154048731172", "reserveFactorLong": "0x92df9fc0af7642c4dfba13bf0ead450d06aa35c420f17862a5dd41d18158e137", "reserveFactorShort": "0xa63a00c2d62e85a41a0f44b3c0d7aa7603b17d97854acfc53a54623592a1c5fe", "openInterestReserveFactorLong": "0x8210ef75f7f143e57056a03d5b0f21c8e008f3000704924b36a6d7bc8e8f1af5", @@ -6377,13 +7001,16 @@ "minCollateralFactorForLiquidation": "0x2fa437b43c4b8978a735c50513a74e89c5cd7f0d2a35ab4f964c4910b9563771", "minCollateralFactorForOpenInterestLong": "0x2397923fc51dfa26d6dac95bec87e8d79e15cf9c934d9cfe3b26e3462bcc2145", "minCollateralFactorForOpenInterestShort": "0xcce46a44d5608dda488c9313a4ec985f8c2102f31fd7c96fb91156aae3911ca0", - "positionImpactExponentFactor": "0x707aa723bf3a479a8300aafd64736f2425a181ce672a79718ad6af650ff87cf8", + "positionImpactExponentFactorPositive": "0x7b43f8cf170145eb5c2cc737b8778504bde39e6763e6d142d4b9c11516b327d9", + "positionImpactExponentFactorNegative": "0x4ddf35a88e33423bbce1a78ce276f10af0c4e7875ec4f9977e8f5f3f96af8473", "swapFeeFactorForBalanceWasImproved": "0xa90535e679944e8be6065b015c62d6a51632451ce684f9e398c1544929caa6d5", "swapFeeFactorForBalanceWasNotImproved": "0x8cda7ab8513c5de3476aa7c0474266c014d1298074d525ca18f1f04002df6891", "atomicSwapFeeFactor": "0x40825caecd1cdc11f5c50fb7cbd67e8e4d02416e771c516e624c1b12ab6d8a2c", "swapImpactFactorPositive": "0x5ba4c56931ed525a5b04e368b7c85d09ef955a121f1a28906a13a6724b5d8cdc", "swapImpactFactorNegative": "0x45e04b88cc7e70f0735c51990a40628b581844ad76c1158d93ce57505753ce24", "swapImpactExponentFactor": "0x49a3c45cc6fb8b327035f5165a13336c0a22c057e7ac09b9eafe737518c1a180", + "withdrawalFeeFactorBalanceWasImproved": "0x863511bde30e9e3bcad54dcd36f27fea20c92bf6cb6fb9c9e46ff98526575949", + "withdrawalFeeFactorBalanceWasNotImproved": "0x97eef1c343e75f86fd44456ce775134ade3510a5c821549605743a32e0f0735e", "virtualMarketId": "0x6a961914d499474e2ad7339a6791d059d32e6c939315f0d2384d66d76d917406", "virtualLongTokenId": "0x8ddf9d8fb09ce58ba879fb48de730c9c3cb0ccbf0475f4e71be16ed6c1d3e22f", "virtualShortTokenId": "0xfcc3d486e44df648e291c838d8a9375bf61b0dd765ecb45bc541a6d6797caf0b" @@ -6394,8 +7021,6 @@ "maxShortPoolAmount": "0xee38c9193b56f2817c0e4f868f483b69204a2a6324cfb8b6a88be19d36ab57a2", "maxLongPoolUsdForDeposit": "0x87db3dff35e64c188cc1d6540918f9c740251b153ea66edae6fe3c9c5ef7cb61", "maxShortPoolUsdForDeposit": "0x40b97829d28799ee6e5b104e34623920245b0d30a2fb6e0dd637e2dcf40cd005", - "longPoolAmountAdjustment": "0xef3931ac781dec8902b128ac19a63a1cf2322da9e390a19bed1f7427cc37ed85", - "shortPoolAmountAdjustment": "0x569999d5866ac4294dbbf08cc9a377afa46cf9cf05d74f6d8adb0aadbee1c898", "reserveFactorLong": "0x9f9403fd1e1edf3086fc7850d035cd01fe03894e093ab728c691724f3df1fd2d", "reserveFactorShort": "0xd2382ebe15a974a600de04c8b2a868efb4a66b262a7cfced1bd5922216b48f5c", "openInterestReserveFactorLong": "0x504b7b55249d28fa161236e751d139acd9164c1463621836e47ff2899c32a89d", @@ -6433,13 +7058,16 @@ "minCollateralFactorForLiquidation": "0x3144b9a5938b191d682d5b8efeed673dc9c06646f4e283817ed5269a4b6cd78f", "minCollateralFactorForOpenInterestLong": "0xdd677dfaf255e6feb915781df3a369173f1ba6a2fdeab9b5042ec3fe4f996930", "minCollateralFactorForOpenInterestShort": "0x54debf477ef3d09f2ef162dc9e624468c36c8e85f1e888837f6068c67b7aaf66", - "positionImpactExponentFactor": "0x5133495a189f1db6dc1f6e752ad0ec22aa469f193c9333ba9bd2fcd99903f55b", + "positionImpactExponentFactorPositive": "0xcf06f5991e0025afd086bff369127451379e0f1aea52aa27a6b4e9f8775e34c6", + "positionImpactExponentFactorNegative": "0x0bee4a3b524e86e3bfc30b36b9b7e591628267c589660d9bea35987bd6932ab5", "swapFeeFactorForBalanceWasImproved": "0xf6498bb4fa2f2989961e3464a3947df93d9cac0bbce132a839479cdf8e09267b", "swapFeeFactorForBalanceWasNotImproved": "0x142b92fa5d0cf4e4757c0eae3b63d0bb49d6845429c32cc3dbf57eafa62d388f", "atomicSwapFeeFactor": "0x70bc5ab7094ea2c8739cfd003eccbe740c18d03242e18d4c23a943eea2fd5ab7", "swapImpactFactorPositive": "0x4c21de75900510998632752943bdaae846fb3cd120da605ec2704287c27dae45", "swapImpactFactorNegative": "0x97a9546d0e8771e3f65b56eb7a6faf815f6d257777ae8d7b03473eb0e1246ab2", "swapImpactExponentFactor": "0x50eb756d6759ffca7723754dcf3ff56c2525bb49868fc2d0e52c4f642d0da36a", + "withdrawalFeeFactorBalanceWasImproved": "0x14c30b4bc6be408915781f147367b99203f079c1f559abddd83b5c6a6ec4d621", + "withdrawalFeeFactorBalanceWasNotImproved": "0x23527b8c31c15fc3c141b734e6ba0300105d66b0e3409e00bf87155b97203ec8", "virtualMarketId": "0x8e967bc39a00855c88ce6825d1b4657ed1c37630220751b3fa598b8ce6401ed4", "virtualLongTokenId": "0x1197dc1f26a5d09df65747e701aa5c198f33661b36a49a71e27bb33cbbdd6794", "virtualShortTokenId": "0xe725e5be11641c39c76c9c4632887409d48033b482cc32020bca3dd6a846b180" @@ -6450,8 +7078,6 @@ "maxShortPoolAmount": "0x98251498335e12deb5e8a2d4ec034058afc9bc021ffa4eb04b7298d449b4fe96", "maxLongPoolUsdForDeposit": "0xd6290ee45e23edf05282774c7e330d4ce7d96407876c9ded9c1b6e879519c1de", "maxShortPoolUsdForDeposit": "0xec30d84507cfa6427cd1fc2914816ed6100c2d85a16dba98ce3063c8a74cd653", - "longPoolAmountAdjustment": "0x45d830cfcfbc445b81163b0e80136968014be29b9035382d9940290ad8bc9fed", - "shortPoolAmountAdjustment": "0xd5e34df9d23774e3b97c0af940d1da712e1bbfe2d160416f5562a7a9d9a5042e", "reserveFactorLong": "0x9ce7bed473003b4aa7a51c622d6fb75d4ec9001bb43f54ff943b84701dbaff95", "reserveFactorShort": "0xa715537fc643695fcc24c5d5817a9e283e49c349cc8f493d89b5912c546fd3fa", "openInterestReserveFactorLong": "0x6b15102468d5ad52e0bdfee9fe17643a51812fddb8fbb3034fbc503c34909fb8", @@ -6489,13 +7115,16 @@ "minCollateralFactorForLiquidation": "0xe0c8811ffba815d0fbb87b64a17f0f1bac3ea3b6613f79f8646289964d94fec7", "minCollateralFactorForOpenInterestLong": "0xfab6fae41bc596b1bfcfb94ae9584c0de545d379cd225cb9c25c487d0503e4f7", "minCollateralFactorForOpenInterestShort": "0x4c1326fc073e6b1d85be6a3d20e1c8ad4cbb9954a3705d9143e1c9245907cd85", - "positionImpactExponentFactor": "0x01843a5efcc528e9c8ac7b8cd268b5bacd76a50ab8567b7642f774d15aaedd66", + "positionImpactExponentFactorPositive": "0x79f8c546cae7cc4d847c0cb793195514cbd9983e60ef45d71e550e7850c580c3", + "positionImpactExponentFactorNegative": "0x2fd3c3864efc042e257ff2d89b8822b0651998d6169c5002182c43cff0c60776", "swapFeeFactorForBalanceWasImproved": "0x88018f8220a21b3917d43ad26912e52e3b8ca361da3d8174be35567b0e24af1d", "swapFeeFactorForBalanceWasNotImproved": "0x548929a4495accb9b6cb141f314517f145ce7ea2b032738583b964b3c67b20c5", "atomicSwapFeeFactor": "0x21e2089d1f40e0a0778c1fe9629870e40fd58fdeeca822dde9b9354502d6fbdf", "swapImpactFactorPositive": "0xd4a7c4f352139efdc20b2198b165d123a241d6de0e2dd735b8acb612c061d0e2", "swapImpactFactorNegative": "0x7f18362928b7b6e3cfe488252656020e312b67e2ce13853c49295f2c527cb640", "swapImpactExponentFactor": "0x545b4c56631b0395a4578efc12493a09fa5d60f69389a8fe615faffa96085a57", + "withdrawalFeeFactorBalanceWasImproved": "0x18b2dd3ee7e7e11736483f666820022b6054b705529082452c152d83ba82b880", + "withdrawalFeeFactorBalanceWasNotImproved": "0xf41ae81f3c4ec0006e4b3f0a0c81fe93b0bf274d022911b1814298a37317a32d", "virtualMarketId": "0xa41d65a1f8e794f8ae9417c17bce2598bb897a44316cd2925773de41b086edbe", "virtualLongTokenId": "0xe725e5be11641c39c76c9c4632887409d48033b482cc32020bca3dd6a846b180", "virtualShortTokenId": "0x93fe7d6e41dc283f2425ead19918d1c540da5f63bdd93a62c6f33303373edb1d" @@ -6506,8 +7135,6 @@ "maxShortPoolAmount": "0x2244f53c1a6ae890c8a6a4e6a4d13c7b81a6e25c7120358473ad1f778e64bb50", "maxLongPoolUsdForDeposit": "0xe99644f91e7d57ebcf25a2b1ed77a7d34f440b32007c9b4db2456b8c848e80c4", "maxShortPoolUsdForDeposit": "0x9c3de87147b8bc46af27cc21a9f781b5411349473b0fcec44b353e110382e114", - "longPoolAmountAdjustment": "0x5904826406435de06b966f6b6b36cf0b379d2fcbd15afc298172d4a67fe514c1", - "shortPoolAmountAdjustment": "0x8ebf4186e2cafb53363d4bfb555e8079fb0972d9ee570b1cca177baa12b2b8bb", "reserveFactorLong": "0x82679e735ce72429af827174905d1004dc86bdea2356d894a2e17c587c9bc538", "reserveFactorShort": "0x0d92aae032a3a6110b1eeda655e72090ecb3c35bbe137b79529c31f311139cf6", "openInterestReserveFactorLong": "0x106077b00fdecefe52bc85eda4760beede0a7a1323870e11aabef8ed6de3e4de", @@ -6545,13 +7172,16 @@ "minCollateralFactorForLiquidation": "0xb8b85be580514372ca4219fe34e89d7d0ff5cff5390ed948981ac4b39e138bdd", "minCollateralFactorForOpenInterestLong": "0xe7dd7bf273ece58779bb00ae9a2e4ab2d1f6e2f112ee752f0a84ba30faea843c", "minCollateralFactorForOpenInterestShort": "0x43b427a16d943f601dd6b7698573380c2a7a77ae99d8ef7cddfa8abdad16790f", - "positionImpactExponentFactor": "0x77063961ee3e498fb05ab39858f824d05c58816f9e207fe4bf16657af84815e0", + "positionImpactExponentFactorPositive": "0x41c134fa6212ca71581d04286e6caa5fa17ecf7a5e13cef359c4390a2fefd9ae", + "positionImpactExponentFactorNegative": "0x63d3bde6e1f5ce894b4bc54c558bcc08f3a200b9e2ed5ae8b29c896b4f785dc9", "swapFeeFactorForBalanceWasImproved": "0x632b360e31d6b7c0caf0657bc4b336b0a87afd7750cfcc4f10d835b6874ccc13", "swapFeeFactorForBalanceWasNotImproved": "0x56e3a25432533027ea1aea296261935fb42abbf8d7511bf774f09b39b1b6af92", "atomicSwapFeeFactor": "0x4d154679eb20c8c9e3bc42655beb1e043cb33b0daf24b875b462ca85f3277609", "swapImpactFactorPositive": "0x2564b478c28569a694e8e1fb47b526f33680c4f7655cc4899f1db2f21620bf68", "swapImpactFactorNegative": "0xa57b6e86d1bd0290122b20c59ffec9cccc1f57d12b491a54bb852dcdaecc99ed", "swapImpactExponentFactor": "0xf0bc83626090efa1a26c684a05571eeb18eedd79b19922960cd956cb993c328c", + "withdrawalFeeFactorBalanceWasImproved": "0x36153dbbd2220b9c6de6c3780bf6e984c74827d5a13b5b49ecd7f4b5940d4422", + "withdrawalFeeFactorBalanceWasNotImproved": "0x49dbc987b20aa09962d2b3b2823fb06b42e99cffe55d51397aed8afc7863a27c", "virtualMarketId": "0x1da4c07527f36916f2710c73802f51fafc0d34b2651756bced81c09ea030ddd0", "virtualLongTokenId": "0x1197dc1f26a5d09df65747e701aa5c198f33661b36a49a71e27bb33cbbdd6794", "virtualShortTokenId": "0xfcc3d486e44df648e291c838d8a9375bf61b0dd765ecb45bc541a6d6797caf0b" @@ -6562,8 +7192,6 @@ "maxShortPoolAmount": "0xd1bf20d66a6cf87111cf04ee3a4ee7d2299be87f9682ef5595d1e8963204e3f8", "maxLongPoolUsdForDeposit": "0x832232da26e8a78bac9d0772da0e2409b43ab43f42d626eeb96f5dba39acfc78", "maxShortPoolUsdForDeposit": "0xdbd4f0be29b917eeb7ee7aa7f1ca0bc0de28a9e0eefba304cc1ccf8f2d09c141", - "longPoolAmountAdjustment": "0x1b80fc128efa6013bfb8a5a1e90a20cdc777b13c06d2f95094e23ad2336ee97f", - "shortPoolAmountAdjustment": "0xa037659cb9f4690c2240982aea92c18639c3292cb7cfdbff28e5c4daf692a193", "reserveFactorLong": "0x0944cb11e9a1770625315d6afaeebc23e3669eb4b37b37271d767f78de5ba59a", "reserveFactorShort": "0x3fd2040f1d3ea3d6dbd711c9744e3afa83ff2ef9f2bafa07f8b8f25682c4705a", "openInterestReserveFactorLong": "0x8cc64831f25bc97923318bc240aa1528451c5c25c98c47c18f0dd7c83f55f378", @@ -6601,13 +7229,16 @@ "minCollateralFactorForLiquidation": "0x62d319d61a973cf3d78242c86aaff68636bcfb93ee41be3b9060305db4ea1129", "minCollateralFactorForOpenInterestLong": "0xd7fbf50ca354ff2b3f6828cd7e94d4ed7aa174e32264de0c0aabd07a70d52335", "minCollateralFactorForOpenInterestShort": "0x895bbd377e9a108c1b204b937d4a844252362e5be220248efe30bc9b8935381c", - "positionImpactExponentFactor": "0x28d3ce9203477c09d7c98c67792a73495a0073c0d280ff8ec79e13fe5054e79e", + "positionImpactExponentFactorPositive": "0x9f1804270d0d1f7a81d12aa10c841abaf8e98b596a1945cbc353bd76e3a6c1a9", + "positionImpactExponentFactorNegative": "0x408419aa3877b99c9c8afdff4202382bff06787e95c588083974eaffda99d5de", "swapFeeFactorForBalanceWasImproved": "0x52e150ad8d5dc548a6fb24c385f9a05225f9bd42eafa9af93b25572a445156b1", "swapFeeFactorForBalanceWasNotImproved": "0xb4c438e9e70648650f3498d02748bb64d17e2b4f7231db82ff4649ad5289e8f2", "atomicSwapFeeFactor": "0x8474deeea21e6229bd4dfae50c5540804ed3a90a2dc43c65d48a15d6bab32d3c", "swapImpactFactorPositive": "0x7ff382731e8dfa0db35f01ee8463833b919a2b6b67c270a7a120b70271e46f39", "swapImpactFactorNegative": "0x32a66fa15048d75d0970f64a82100bf289c0de735a0e68eb6d26d2f4732a4013", "swapImpactExponentFactor": "0x9baffdf906867bf9114fac9e614d47056e935ef5cbe673eded7571c8b58825bd", + "withdrawalFeeFactorBalanceWasImproved": "0x76abcee2527831451b75ee7b0f45e9104587008d41f80674ac6243bf2aee3ffd", + "withdrawalFeeFactorBalanceWasNotImproved": "0x4c65ae734c8bfb14af941e948ba79b8db8e2f2b57b0d475bc8104ba15790f652", "virtualMarketId": "0xbd203f66daaa9e3125798fe87e5a9858227d509113852a73dee7b9f454857145", "virtualLongTokenId": "0x1197dc1f26a5d09df65747e701aa5c198f33661b36a49a71e27bb33cbbdd6794", "virtualShortTokenId": "0xfcc3d486e44df648e291c838d8a9375bf61b0dd765ecb45bc541a6d6797caf0b" @@ -6618,8 +7249,6 @@ "maxShortPoolAmount": "0xa5551cd7034e7c90a11af6d9eaca47b87eed92a55a94fd6e89633265ba5e9659", "maxLongPoolUsdForDeposit": "0xf39166503178a0599cd7a8ce6f0d5a6199cb2238a2ce36782825dae1e55a8b2c", "maxShortPoolUsdForDeposit": "0xf979c892e771d78a0ebbef15c15b41db3ec275bc816bd24f8be83f3da3001d38", - "longPoolAmountAdjustment": "0x7d2f1b502b3173a3de94a1c223182bef56dd115b44d6f76ea0da274d35de71d9", - "shortPoolAmountAdjustment": "0x0b6f0c1b08173fd17d6e35ed8b966606c484b3aea20a49ff74b73c084d2af58d", "reserveFactorLong": "0x9b1f96dc1093c8355529f2b1e75240c6c2d90ed971718bad2922e0346889bd5d", "reserveFactorShort": "0x8bc89cbf2899ee6c7e1083ab26a91d61008542cdda1c6a647066f800e954f4cf", "openInterestReserveFactorLong": "0xfd58a8529f2d38af7456e468f9dd9469d9110c26d8c770c976c9270ffcff5479", @@ -6657,13 +7286,16 @@ "minCollateralFactorForLiquidation": "0x8585b33652b828809ca030664ee0d9ea5e3bf9a37b335e934cb4127331d0ed7b", "minCollateralFactorForOpenInterestLong": "0x7d50ef920428f507294cd36c1782f6d973a2fe06024c91df3cde7689c79fed96", "minCollateralFactorForOpenInterestShort": "0x11f7e8e55c8b9b9dd122a4b43e86c521b1c348c5f813cc016f22cdfd50f834c3", - "positionImpactExponentFactor": "0x815c6fefb00b14bbddc0e03e7c0f220de918f46c3dd67b8fd755edeabae8ecc4", + "positionImpactExponentFactorPositive": "0xcc9d9a3e68ec017af8d50e460135784c417b0bfdb68586cfd6f0f37531d4f7cf", + "positionImpactExponentFactorNegative": "0x37f2d458a9b1b979e88061a23e0201f1aeb1af9db894c99bbd7e00773ecab84d", "swapFeeFactorForBalanceWasImproved": "0xd87f563eee35ff644bbcbc81c285b4b9ba3c76774d5a1529bd482c790240b52d", "swapFeeFactorForBalanceWasNotImproved": "0x10af337efb0891fdc93cfc3f957b35e6e8b478cd80dc1dfe84fab10aafedc81e", "atomicSwapFeeFactor": "0x862667862206eb72e1989351e89dcbc22cb14ba73b6b531c6d53ea7f7c8cd932", "swapImpactFactorPositive": "0xc0cb03d2db382d5e9290eece3432fd194293e21ef1f83ad1a08567da811114cf", "swapImpactFactorNegative": "0xd04dc2dc10cd11ac26ed96f19c2994147a753b9dd0645404de4d4f3ec46342fc", "swapImpactExponentFactor": "0x0bb5e3bd16263d02f75dff55677c009d9b8aa9a24a1912ab72536173b2930658", + "withdrawalFeeFactorBalanceWasImproved": "0x40c4826f583e382fc09a64ed6df43be5c0972c6b416ee7db0924b02cce2a31d7", + "withdrawalFeeFactorBalanceWasNotImproved": "0xa43f47065622ed24edd3e5d1abdee445e4b15be940faf47770250f1e40b90190", "virtualMarketId": "0x1ac08cdda4a98254b0e23742e93fc289434ce535fd22d719ce6f5ca332ad0106", "virtualLongTokenId": "0x1197dc1f26a5d09df65747e701aa5c198f33661b36a49a71e27bb33cbbdd6794", "virtualShortTokenId": "0xfcc3d486e44df648e291c838d8a9375bf61b0dd765ecb45bc541a6d6797caf0b" @@ -6674,8 +7306,6 @@ "maxShortPoolAmount": "0x0b243243015a0b522496c946779bb001f2e4a1cab92466e8f8256f7ecd5b143c", "maxLongPoolUsdForDeposit": "0xbe4c739e75c298ab8f608f0130881fad222ae967a4cedb4322a5d7aa74489080", "maxShortPoolUsdForDeposit": "0x530383b39d88f06600721f4bde03f000f22cc246f549390445866c16ec172fd3", - "longPoolAmountAdjustment": "0x825aa7c2c150a8cbdbc5dfa54eec3d108449631d7e9a156d700df025d0faed08", - "shortPoolAmountAdjustment": "0xa4730b6f7a37740663217e623f5bb778c02ad75f1a942c2f2796d0faee4e553b", "reserveFactorLong": "0x5bb7c1022fcd76ff4a59dbdf32522632dcef55f0093ae36baf9765d86a37bdc8", "reserveFactorShort": "0xe52bfe3973b404538fa9d3c6560aa1e5f9efdb79be82aba8b01c196bc3599a11", "openInterestReserveFactorLong": "0xb6a75555c04ef267c24a5e6d6f6e6fca434249a5318671305c258359295a906e", @@ -6713,13 +7343,16 @@ "minCollateralFactorForLiquidation": "0x33b00fb914ce7903aa886f91080c2351c74dab96ad8d7ddffbb6bef6d8d652a6", "minCollateralFactorForOpenInterestLong": "0x5ae759fed69d3b0c091d183c77af7e0a17e8e28bf134058733d7e4f6c65a9803", "minCollateralFactorForOpenInterestShort": "0x6b3ee35f5d240926128b2cd6d6e06959f849b8be18b92b74cccf3092dc4f17ea", - "positionImpactExponentFactor": "0xe567e59cfea800eb361efb60841f05c69cb32e748be6262247a2a421f040c9cc", + "positionImpactExponentFactorPositive": "0xb3fee7d1061e7fe89417ed5bd67a040785a8bb518fa3304438876d69b8b0f47f", + "positionImpactExponentFactorNegative": "0x4a22c6f82b4dbe49ca91adfc90a2c2cf09491c09ee7b77fbe9f6bde8b45fa0c2", "swapFeeFactorForBalanceWasImproved": "0x47ffe2b682a8bf31cf63778aad5f0eb07789da2a14cc68b4b2d225150807fbc4", "swapFeeFactorForBalanceWasNotImproved": "0xcc012787e83c0b903b1eb1aee64607e237da7ad41657778ff1cfafe6e680b371", "atomicSwapFeeFactor": "0x1df5c00e70e1661c59e1d86e3fe88018b64b65e3f65a756a4b5103507ed3d495", "swapImpactFactorPositive": "0x46909c5fad97c43653f9d5f3368abd6fbebc393ed3e03cac4b1e929beca08746", "swapImpactFactorNegative": "0x09a07f2403de8c394c33d6b5a4546bd1c717e0b5b73b7a4093e0d8de38068017", "swapImpactExponentFactor": "0x3523cf94456f655920bded4f975e92a883868ac996de759eadc368f6c7e65cd4", + "withdrawalFeeFactorBalanceWasImproved": "0x640527f8f3c90af367f3100fe9eabcb81ecd45d15bd005c58ecfe21cd308c5f0", + "withdrawalFeeFactorBalanceWasNotImproved": "0xed5f9955f8aa021ccb4f35a441ae7356149dd08b36b9527c26067b989b3bfdd3", "virtualMarketId": "0x8b4b2ecbbd9ae1092fb18829261d6d140c468c8eb5950328743b19623f24c71d", "virtualLongTokenId": "0x1197dc1f26a5d09df65747e701aa5c198f33661b36a49a71e27bb33cbbdd6794", "virtualShortTokenId": "0xfcc3d486e44df648e291c838d8a9375bf61b0dd765ecb45bc541a6d6797caf0b" @@ -6730,8 +7363,6 @@ "maxShortPoolAmount": "0xc3bb2fcf23ddf8a72620a527a8471a2544f5111c62d8001c9534f2e1ac3e6533", "maxLongPoolUsdForDeposit": "0x500ab367baf4680cca8a727576c2b5a6f9d1bee8590c2ce92d4c1166a3ab32f5", "maxShortPoolUsdForDeposit": "0x283d83bc1fa543123fe5026a5b9791726896bde6a9f4f41b2e39d56bbc0e9cb4", - "longPoolAmountAdjustment": "0x68d977cbc5d2f43b8d9eb7c8282d0c3a8c20d797c563dd4b00a6cdabc639398c", - "shortPoolAmountAdjustment": "0x51a6e4698fa52c14f8b6e497f93b48a061ba2717f1ce2528c624487c49b1624c", "reserveFactorLong": "0xc6a61ba8167d006af620f5c1010172fba0b22d157a31c87c1c5df5585d83a718", "reserveFactorShort": "0xae61bbdddc314cb1af178211f64bf75cfa67ebd3ba531b64eebf95bd751d148e", "openInterestReserveFactorLong": "0x97ceffc1647445fc36f2d6aab61bfce5db5a72c01dcc0ce8feaff6f8676c5d99", @@ -6769,13 +7400,16 @@ "minCollateralFactorForLiquidation": "0x6b71547189b8a846f015a1f2343da687dedcadc907ab4ce46d1b5940de3dfc45", "minCollateralFactorForOpenInterestLong": "0x45eedbc7142301fe4c59155e6ebd1653a9ff0c9a978099ccb2e9d707967adbca", "minCollateralFactorForOpenInterestShort": "0x2903f6e84538e5373d1f54d464ba5df3df4b3588d0d14741fece1716eb35f9a2", - "positionImpactExponentFactor": "0x8844c8b03bd3eaef0764ca1ba1b1d78473ea2cec2d9e6a21b41b938f1af0bae2", + "positionImpactExponentFactorPositive": "0xc84db8d611f647dc107857df2535bf637b7ba2279600b02020758c287ebd1d44", + "positionImpactExponentFactorNegative": "0x2853ffd2c684b1eede45f9b8195ba935b50c37c16d8511b162c702dcb2a22d6e", "swapFeeFactorForBalanceWasImproved": "0x2b6b19422df17ba8c28fced3c7d789005d1a0356b44c1c4c4c0164cc39331e71", "swapFeeFactorForBalanceWasNotImproved": "0xbc5189d59edc722196387581523527cb1d98b00ea7da4f20aac7c20e08b72a3b", "atomicSwapFeeFactor": "0xe173a809ced2500304a23dfa344ca6b3e827719804bd77f8acb525af28d6569c", "swapImpactFactorPositive": "0xc37e7182e1a56e126c4733aecc60d53d29e2b3f102dcfca70d3a86ca928e8814", "swapImpactFactorNegative": "0xc26f85c9450226223a1d4af07280496abe35a15674106503cf26c2c1b7757ff7", "swapImpactExponentFactor": "0xeab458e24e12f3d09444cdcdea113b9f7374871735d166318fc9323552ab2bfc", + "withdrawalFeeFactorBalanceWasImproved": "0x1dece3afa1aa131d88e7919b264fa7f241cc33a585e519d3daec6f30180c05a2", + "withdrawalFeeFactorBalanceWasNotImproved": "0x1870007b13e3c4d362f949e7a481ddc6bb533e372eb4c0c688129d15125f71a2", "virtualMarketId": "0x3fed63ebd03d185b3e77f4f11e900eae2d324aecd2f96cfc894cb21c5f685fb4", "virtualLongTokenId": "0x1197dc1f26a5d09df65747e701aa5c198f33661b36a49a71e27bb33cbbdd6794", "virtualShortTokenId": "0xfcc3d486e44df648e291c838d8a9375bf61b0dd765ecb45bc541a6d6797caf0b" @@ -6786,8 +7420,6 @@ "maxShortPoolAmount": "0x1dac05cb03e52dc5152a6c241d0cbe75582a6cfc1194bf6daf7f929b7bd7f56f", "maxLongPoolUsdForDeposit": "0x90eef587dbf56d4eddbc1b0b9feb44776e548730d202fb846f1ac177655bb76d", "maxShortPoolUsdForDeposit": "0x54f05e75ffa538e60a2f6b666dca1bd62398d499dbcc7b8663118f695a21cf0a", - "longPoolAmountAdjustment": "0xafdb8cf50f47efd31458596436aa1c4f6f549cba20a449c9bf3cb1556c055547", - "shortPoolAmountAdjustment": "0x0e5041dbfe32e5456887fa3686f8cd21e1ca1c37738d4e53eb12b21adb58f190", "reserveFactorLong": "0xd57b02bf1e96f23379ea8ea5dedea7cf37221ba2f12ac1c327612e9b6a4c9c63", "reserveFactorShort": "0x6311532499ad1a50f55dc0a5ade3c90b379bf4738176051b436a19d61bff63f7", "openInterestReserveFactorLong": "0x7475aa3226f8915420114542060a5b834f7a692e4086dd17c8d044c257455e18", @@ -6825,13 +7457,16 @@ "minCollateralFactorForLiquidation": "0x1b75189827254a93f7a53377e63f17e1b8e28a9e760227a07cab05b17a8c6e8c", "minCollateralFactorForOpenInterestLong": "0x29db49c2d35032fbaa6998ba219c6b02284f74bfd0acc163ee051df95ed68ca3", "minCollateralFactorForOpenInterestShort": "0xa40cad44d05c973096a2efad341a66060c01fff6f46ea68b91b0b2bf3fba6c08", - "positionImpactExponentFactor": "0x756f45fc0ceffe9e5d95fa382724d0f2e89ef58b1420ec60110167e98b8eab13", + "positionImpactExponentFactorPositive": "0x03c014c8cf0274ae647d1ca3ef578de89e9425a49e3b0fa49ede1df862d04c0e", + "positionImpactExponentFactorNegative": "0x0aeff3ce7e7ae1f5a08b09d687282b66ef8d0f6960163815fb20b4cf97891b99", "swapFeeFactorForBalanceWasImproved": "0x65de51630b94a759ff7b7fd83e2592f29f091279d19914ccdf27614d77d6bdc4", "swapFeeFactorForBalanceWasNotImproved": "0xee0edaec66c781a5fbc4bc1a3309d734eb0f66eea1a501f5db8b418e4fcddb53", "atomicSwapFeeFactor": "0x5a0d29797f44932d02b08bc879eacb1bcb68e88d6abb2ad4ce3ed486b716738b", "swapImpactFactorPositive": "0x84849cdedb39593852cf43252cd82e46a876f305e4ce1d974ee08fc8ec59d9f7", "swapImpactFactorNegative": "0x09ecd5127f93d7213f6c1fcaf8804ee66808221cf2bf57983e1953fc99bcf9f3", "swapImpactExponentFactor": "0x2d0e9c34fb6aba09c0d97799dcb19419b140516c7a10e3c58b4049a74c67e293", + "withdrawalFeeFactorBalanceWasImproved": "0x0daf56de4173267f9a7ccdb9c149408783e15ce7950ff5a17617c18f270407a2", + "withdrawalFeeFactorBalanceWasNotImproved": "0x3d12d1eb78b397b245bd6128925ef06b6ad33b019077d07b6ec551d7ec87dff6", "virtualMarketId": "0x7b563213b397f929ffcb55fa1a92b0fddd7690a85100059a4e4b74b994bc1b9e", "virtualLongTokenId": "0x1197dc1f26a5d09df65747e701aa5c198f33661b36a49a71e27bb33cbbdd6794", "virtualShortTokenId": "0xe725e5be11641c39c76c9c4632887409d48033b482cc32020bca3dd6a846b180" @@ -6842,8 +7477,6 @@ "maxShortPoolAmount": "0x99d0c4fb42b5283c3fb0cfc70df40a740ce3c8c0aa6a649f33bb9808bd57456e", "maxLongPoolUsdForDeposit": "0x4490d84af673f699f41c9f2f5260b73cf664f52902805eb847de61d7005d15cd", "maxShortPoolUsdForDeposit": "0x04e9410332058dfde6421b1b9990879982b97fc54a99f5d0e1d7a0aa15886789", - "longPoolAmountAdjustment": "0x4e00edf6e42f558b7df775462d58970aa49364c86afff7d9543179b861cdb003", - "shortPoolAmountAdjustment": "0x420fae20237ecb267ee3b10a6794461faefb77bdf6fe56917a0ce22ff59cdca6", "reserveFactorLong": "0x40db48457c1ae9f870082e2dffd93ba2ff574e454108e5d292f0080c892371ad", "reserveFactorShort": "0xd900740390e36c1b2023af05aa878969ed197c211d145d6e735a5aba25fca70c", "openInterestReserveFactorLong": "0x968c6d8adb16727b440f329db2fe2dad31db19a5c18d6760747ad796474aa043", @@ -6881,13 +7514,16 @@ "minCollateralFactorForLiquidation": "0x86ec7dea0767afca2e51da7c95db51654f3f0663312019e5e6cc4b0d1ba41843", "minCollateralFactorForOpenInterestLong": "0x8f3f572e97c9d9c670333b644f13a2d0f6e539e9c061ee0a857cd9792672d22e", "minCollateralFactorForOpenInterestShort": "0x34f3aabf9a0899301758ec60b458136eedccf8190f866a24fb5752b22f439232", - "positionImpactExponentFactor": "0xb2ce75652d03556e0bc3788493523ca7fdebc934c6e54c6c632e181236ffddd9", + "positionImpactExponentFactorPositive": "0x10e453dfcd2b85054349440bb8300730ee3159b47625ede53765012981d9d581", + "positionImpactExponentFactorNegative": "0xbb578a92518c00edf036376962f66a8cf70ff69cca1aadb2b280356d39151d88", "swapFeeFactorForBalanceWasImproved": "0x0589c40a90c42a9ebfc1efeb4b92aade95b9b797d8aa1d5a3157bf122b7d4c51", "swapFeeFactorForBalanceWasNotImproved": "0x1a598b463e1879679db300d3d2984300793cbf7707c66a39bbdd2d35d13f732a", "atomicSwapFeeFactor": "0xe41d968c3b6e3f6edf6a01941130301b746bab7671905eb80ba9d50d65bb3aaf", "swapImpactFactorPositive": "0xd1e65efb757541f80edfff9551b4826043c8e145abe10ae3ef3541fb538f07d1", "swapImpactFactorNegative": "0x7cf01dde2b8fa10b9187d30fd71c411dcdeec784c219d8650622215ee0595300", "swapImpactExponentFactor": "0xd44bd1c8059198d34bfc8874c1651224c654429e4ca93c43743a04c165dec81c", + "withdrawalFeeFactorBalanceWasImproved": "0xd4fc3107ba45af3220b9b32dbab9e10e8a5c090d62a2c659fca6d08cb3f0d4a8", + "withdrawalFeeFactorBalanceWasNotImproved": "0x44ddea819df2a61d5bc55e57d3a566b98ee218f8fe68ead7efae892ea30a2596", "virtualMarketId": "0x424e90987ea6ffacf6e97d87dd8356ab9fba46851591551846abfa0dc2f91c38", "virtualLongTokenId": "0x1197dc1f26a5d09df65747e701aa5c198f33661b36a49a71e27bb33cbbdd6794", "virtualShortTokenId": "0xe725e5be11641c39c76c9c4632887409d48033b482cc32020bca3dd6a846b180" @@ -6898,8 +7534,6 @@ "maxShortPoolAmount": "0xa1eda2da8aefef3bd9f0d0ca9a99e79dae2f41b5ba6f10627aaf2a0c25da80b9", "maxLongPoolUsdForDeposit": "0x76a6c90beb18fb5d83cbe24f2f25b7b5b7e1fad300d3ab82f16188f7e99c1b51", "maxShortPoolUsdForDeposit": "0x2bb74b5197923cf4acf49d34ae72ef34b673287b72a854678fa9a3746214ee1f", - "longPoolAmountAdjustment": "0x02612bc0c90ab605621d19c129606e82f639c0d6364293dbc63e4803d300a772", - "shortPoolAmountAdjustment": "0x7c898c63f68d14941af128520e02ead8652794616d48cd297e1c119101336096", "reserveFactorLong": "0x9b319e914cad608fb01d63059104dc529fae055f918ad5d908f2b30fd0dcbb22", "reserveFactorShort": "0x916fab03caca683c19209fe13b60bf337ec4f9e1db741cb68ac21645a177c22e", "openInterestReserveFactorLong": "0xcce474632931a8fb75e183806fb17ae4ea41f8a5287c49456e7fef9540b7a026", @@ -6937,13 +7571,16 @@ "minCollateralFactorForLiquidation": "0xc181dcf243c0f2329ea8f867834c56e7922d6087c6f367ed5c51e860bb1751a2", "minCollateralFactorForOpenInterestLong": "0x583df5e6f1edfb745d316e7bcd94e72ca9b5ca746577c020be7c18dd7dd4fe06", "minCollateralFactorForOpenInterestShort": "0x36351baa910c7a93b9275819cd9a2692a2cd3a2e6ba054c08ee6b21a35de4d33", - "positionImpactExponentFactor": "0x7ce20313f86d1399be6c8e5a879b0f8444aadf143db8d96c0acb06d082131e5c", + "positionImpactExponentFactorPositive": "0x84ff22f26ed0c3891f0b6a6faa49887e8db46793f5805979a63df99877878fbb", + "positionImpactExponentFactorNegative": "0xe4d42da2ed180ac944b545b8d7d2d5c1d0f283c2f5dacca69344fa271ca9eca4", "swapFeeFactorForBalanceWasImproved": "0xa23ea26f349b7feb83ddc8a2a9fecd42486e44e6fc12a1801d13effd3586b489", "swapFeeFactorForBalanceWasNotImproved": "0x6426e51a54739e518248dcb47aa6a5ef9663cd0c4882d6e49f2c4a9e4e13fac1", "atomicSwapFeeFactor": "0x37af8cd2427637879560e4b804999bbc1df9abd6e4d2550024f191a228196de3", "swapImpactFactorPositive": "0xccdda93d693c2b04ac36cdd1fcb740da6b9a9b761375c4315e1ce1b8474ce507", "swapImpactFactorNegative": "0xa2277bc26726f7bfa667b90d37019e338cd90877358ef57a93296d388daf3b67", "swapImpactExponentFactor": "0x97522d4a4b0412dd7c94149fd9517707b9a13df61108a0fec3f05f9b7c31e9b7", + "withdrawalFeeFactorBalanceWasImproved": "0x4d0ee6e6f9ba519940390eff8e6e700e549d3bec4ff34ffed1222e5e5682ec02", + "withdrawalFeeFactorBalanceWasNotImproved": "0x28c8979e311ab1d1bc8f049f1786c646829b81f32945c5b6f7004ccc271990d7", "virtualMarketId": "0xa4fa7171d12d0955f6b4bca5eb0c384db243a4cc34969aacdf2fae64921d3000", "virtualLongTokenId": "0x1197dc1f26a5d09df65747e701aa5c198f33661b36a49a71e27bb33cbbdd6794", "virtualShortTokenId": "0xe725e5be11641c39c76c9c4632887409d48033b482cc32020bca3dd6a846b180" @@ -6954,8 +7591,6 @@ "maxShortPoolAmount": "0x7e5144c4da3be1c21eddbd6ab2da4964dc7a7223acbaa5b67b5c5bfbffc40828", "maxLongPoolUsdForDeposit": "0x840740d0a642747557469ada9ca2d6c8499840c5e5175420143de754805cc960", "maxShortPoolUsdForDeposit": "0x3c746b8eefb28f5fd32f4fd721295064cdba60620013ee6d317100864fb3b5f1", - "longPoolAmountAdjustment": "0xc65f56eb39ab69178f2a77c56e4e75edb1bedf6ad98c79deaf74343848aefe49", - "shortPoolAmountAdjustment": "0xdb1d50fa2282207bd45452311a33c4a0db8aa3bcae0bf657b288b5700be82d8f", "reserveFactorLong": "0x6e9648425370906bbacb5e68051751c951d0a07645eea7fbd143964a07c150fb", "reserveFactorShort": "0x45cc22983aee531309bd571032b9a8a7adc5be49fc41be54d307cd3c52aa15ea", "openInterestReserveFactorLong": "0x3e27ac03e5770f47ed85192a0bcc9baf4339f2c766e65c7cd406c069dc269de9", @@ -6993,13 +7628,16 @@ "minCollateralFactorForLiquidation": "0xf72fdbe7a9a4fa1a18392a24aac135b2854ad6702857dcb7a02b0396689742df", "minCollateralFactorForOpenInterestLong": "0x818e5181980953fa609b761f0ae96c7ca154f7f0646efb32703b8b00f9066681", "minCollateralFactorForOpenInterestShort": "0x5755b8f70ab34aa48a6f09e98b3f0ea7d53f481a51bf3c43ea8eb29e944c99c8", - "positionImpactExponentFactor": "0x3b971039415093ccc226058fec1bbf78b3120fcce1cc233615f3e18b5360ebf3", + "positionImpactExponentFactorPositive": "0x2d1afe0b60b7b2f3c3418e50f6c56fcc7650e0903b766115e6bf765231c338d3", + "positionImpactExponentFactorNegative": "0x0cfd83a6f133a54ac07d73c2ea7330aaac9bdf820705dbd6d0b2bba36545e9bc", "swapFeeFactorForBalanceWasImproved": "0xb843072f0f5a7464d8d1f7396c97cb7da8af935cae8e33176c8d5f175cc9a55c", "swapFeeFactorForBalanceWasNotImproved": "0xbdb97358626fd42e2914f666f839a6f60265e9ec51dccd6175f3c83aa463977d", "atomicSwapFeeFactor": "0x9532ae7cbc6108a2afb6bc4567e4a7a60decca5cc940dde150db06998e8af445", "swapImpactFactorPositive": "0x901b3d05b703f3c40f99b34c4ff2cba75269582be15a402353f187ed49ff5165", "swapImpactFactorNegative": "0xa0e259f65f79fca5bec4d5341eaf9470dba0fc4d48ba1defd29a7572fd125ebc", "swapImpactExponentFactor": "0xd14dd7875505bc9756a4e613d29ed6582f111ab4bcdfff9cf4753558a94802c1", + "withdrawalFeeFactorBalanceWasImproved": "0x517c7516be5a0c7a0cb7df772c546154b6670c253f75d0295555b210815a2909", + "withdrawalFeeFactorBalanceWasNotImproved": "0x40893a50bd95756ce1da7d7d67bb2d101f852dc58496a1f7a761e0bb4eebc955", "virtualMarketId": "0x4bd15e6a0fd03dbc2bea39c43fc79d398aef82c002d008feb4d1c89fedc29eb9", "virtualLongTokenId": "0x1197dc1f26a5d09df65747e701aa5c198f33661b36a49a71e27bb33cbbdd6794", "virtualShortTokenId": "0xe725e5be11641c39c76c9c4632887409d48033b482cc32020bca3dd6a846b180" @@ -7010,8 +7648,6 @@ "maxShortPoolAmount": "0x5ff5f41bd87b7b1775827c269e4e9be866329f7e04d093669fe759aa9ed6d961", "maxLongPoolUsdForDeposit": "0x7ea137edb528f577a4657512a9054615635c687cdaf8f7bbff77a411a9afbd35", "maxShortPoolUsdForDeposit": "0x7e7ee6ce82ec5fc73e07b36f56cb8049f783b99d31ac69f2fea2c55948537463", - "longPoolAmountAdjustment": "0x50d3c71bdd36571e46aa46ec5ad941e33f888021b2f9885c19f1dc98e054ef73", - "shortPoolAmountAdjustment": "0xacd019a5871a4b0021c4f87ab15aab4c1f97575bc8f3f91f9c82c6aa4bb31b32", "reserveFactorLong": "0xa4c086cf425a1aa4f038549b384e31e909cfe2e3d21ffeb43d60775adcb088cc", "reserveFactorShort": "0x121fc194ab5da8fbb25a15160d0f85c785cd43fd6029f18ddc976491bb8391d1", "openInterestReserveFactorLong": "0x0e6625422d55e85c5f336091c8a069fcc7a200204fa39e169ab257f1437960a4", @@ -7049,13 +7685,16 @@ "minCollateralFactorForLiquidation": "0x49ae2627469cbefb68666adbbbeb744cf29a4400c48e0e21c31cc84e0f34670e", "minCollateralFactorForOpenInterestLong": "0x27e803ec18d5fa51715be719542a289f7423ac9ba9b20f576973d66b2551bf5d", "minCollateralFactorForOpenInterestShort": "0x5258e3c070aaebb888fd398d917ecf80832a6656f40d50a745b124f8ccb7e254", - "positionImpactExponentFactor": "0xc51909a330c2401736876b71a8cfd7c96f42890319cdb371a3b9dec9ecd409ce", + "positionImpactExponentFactorPositive": "0x75f0de1dd983644e31f67886fc34bee509c6fbdc2337a0563fdd05b2a033237c", + "positionImpactExponentFactorNegative": "0x865bc922ee27f08c6d8cf76244a678460cf94d028efbdeeca5519b4bc90b11f3", "swapFeeFactorForBalanceWasImproved": "0x9102f6ad4161a08f0849b3c43c223e364bd4aff8f481d198a4eebeae069553f7", "swapFeeFactorForBalanceWasNotImproved": "0x67ecf17e7395492331fb10f81e89dea078a77a9e46f2fceda54099cc9797a959", "atomicSwapFeeFactor": "0xe16a19c405ac3aff97f370f32424f0cd347870c1e04c55a2359c3be144d17f7a", "swapImpactFactorPositive": "0x1e345ec4f6a863e7ebe4e075da4fcf31672a9182dcb21cd591068f690f2262fc", "swapImpactFactorNegative": "0x4a493f0dc59ec102f37040fb63e5125680bdd15a0fcb2ff76badbcdf3db3fa86", "swapImpactExponentFactor": "0x9e82099a8967147ca78b2ea77f8668503b02fd34e8d52886e684f211da201bba", + "withdrawalFeeFactorBalanceWasImproved": "0x74bab322a243c9aeffc1b079ffda6337aa3b86e0bc839a3b88153f854c51647a", + "withdrawalFeeFactorBalanceWasNotImproved": "0x6024c34d81eb0e8ecb303c29d1a614ea97e8183558afcc6da49a4d30ca9e9129", "virtualMarketId": "0xb1d9439ffc87273c4ea830bb2ffadcda183a37ef662c4099c8dd96ba2bfecd3c", "virtualLongTokenId": "0xe725e5be11641c39c76c9c4632887409d48033b482cc32020bca3dd6a846b180", "virtualShortTokenId": "0x93fe7d6e41dc283f2425ead19918d1c540da5f63bdd93a62c6f33303373edb1d" @@ -7066,8 +7705,6 @@ "maxShortPoolAmount": "0x9d3ea25ddc8cc8e6a3bef3698ac8d4ce7dc803134d35565732a0dedcee881852", "maxLongPoolUsdForDeposit": "0x263151f9e0875b3f499c943889f6ea61bc363e8b97cb06b863e32a81e61c349a", "maxShortPoolUsdForDeposit": "0x400dfba1286afce72f62caeda162cbaadadaf39cd8ceced8c906feff8a9d574c", - "longPoolAmountAdjustment": "0x7f8d362e80842eacbd600c1ed81dff992a5722ad02dd6742d47a3dddebba28d1", - "shortPoolAmountAdjustment": "0x609f9cabbfdc4e301fd9cdd02cab98dfa674cc84a77be3b594e4b4c2b299f8a9", "reserveFactorLong": "0x200ad5d74b542ca618ac58a7629b4b37f13496ccd97d11324b346ac444d10373", "reserveFactorShort": "0x8aed26415d2fd2c3bcb36ce534ba946d95835cae8dd57c099bec215cda268c24", "openInterestReserveFactorLong": "0x5132bb9e9a337b26caf58520c1b17bb4f544249f24dce232a886f49dd307b8bf", @@ -7105,13 +7742,16 @@ "minCollateralFactorForLiquidation": "0x5d8b1de57e1489bee6417db642bdc78295466e0b17ac7cf4f3a4b6cbaf500513", "minCollateralFactorForOpenInterestLong": "0x8e08f3f7be11c7cf1e417bad78b67816cc018466d09dbc178cbf14e775ec84fb", "minCollateralFactorForOpenInterestShort": "0xbdceb26bf2f98e5cc12acaa3f849b8d4b55bdda9afeb7ccf0290238518f1db47", - "positionImpactExponentFactor": "0xff24652bb0828da1596a0f12cb00abede91225f771ad892955193da803cbdf7a", + "positionImpactExponentFactorPositive": "0x7bfd4ab59d4b52b4cc22ea59be3131e6876d6688be202c477cb7d6d541f3098c", + "positionImpactExponentFactorNegative": "0x4663def335f420bbe759494c7464ee0ca2f9083c987a60651ac0f806fb20f5fb", "swapFeeFactorForBalanceWasImproved": "0x31e3930b9996b14fe6f38568e44639ccc50e56787240e19e98310ddcd4a92fda", "swapFeeFactorForBalanceWasNotImproved": "0x79ffe210749a415402ab9be45d30efda2ecb18e6812b20adb226da48d4ca5f02", "atomicSwapFeeFactor": "0x032774c61cbf297fedbbf78bb87559d207fee070f6f33e2d7f5704a2821e886e", "swapImpactFactorPositive": "0x2cab7d169dfb0076ae18bbbcc61065aee049442b6a4625d90829f74f1d431f17", "swapImpactFactorNegative": "0xf62851c1a6f64e7d365044132259a31dd64a680ebb18db650df5aafbff986aa3", "swapImpactExponentFactor": "0x386e3e54e4848c60015711213f37290b3dcc77280b39dfb0a922b780b1126763", + "withdrawalFeeFactorBalanceWasImproved": "0x06b46cc169d6f25528a897c01c4e4f78a9e4714407b83c44c0fde91316cf54da", + "withdrawalFeeFactorBalanceWasNotImproved": "0x4dacab10129ba523982599a20b3d57b9e9432c5708e967334380bc0bbab77eaf", "virtualMarketId": "0xd444324b90fc43f702cd262062a0d5db4984473eebfec16830c3c6f480a0f10b", "virtualLongTokenId": "0xe725e5be11641c39c76c9c4632887409d48033b482cc32020bca3dd6a846b180", "virtualShortTokenId": "0xfcc3d486e44df648e291c838d8a9375bf61b0dd765ecb45bc541a6d6797caf0b" @@ -7122,8 +7762,6 @@ "maxShortPoolAmount": "0xf9f8ba976b516e56d078527730c7540e65356bbaaa36000b6fc60cffc5ab4526", "maxLongPoolUsdForDeposit": "0x076f2d7faa3e25d45cf265e98f78b882229c689f58fe6bcf046a9bc696da1dfd", "maxShortPoolUsdForDeposit": "0x076f2d7faa3e25d45cf265e98f78b882229c689f58fe6bcf046a9bc696da1dfd", - "longPoolAmountAdjustment": "0xfbc989cc1f9e2342364524bf0b748cc73a83704afa4af644152fb57fa6971897", - "shortPoolAmountAdjustment": "0xfbc989cc1f9e2342364524bf0b748cc73a83704afa4af644152fb57fa6971897", "reserveFactorLong": "0x8ef31df4b5738c1e7c88d44e1072e7b11c32bae0bc3324ee1be9d3ca8a865404", "reserveFactorShort": "0x3dd7e5fd01b7a5ab747b2d599618f5ec0a9932ef8d67f9ca9d4ac196ca6d4bf0", "openInterestReserveFactorLong": "0xd34a1c4440b3360a1b834c1f3e73189ab5e88e286032159e73b519efaf82bbb8", @@ -7161,13 +7799,16 @@ "minCollateralFactorForLiquidation": "0x9ea6294cb72900e32d374e281f6bf719a9a65fd530ecfb43f4fd2dccd7d267b1", "minCollateralFactorForOpenInterestLong": "0x1ad4a9c2b4ce935ef436514c8854eedb430a2d63208a46b5b4c1a539c33e3d09", "minCollateralFactorForOpenInterestShort": "0x9e8636270bb17fe8d5dee385bf6abb8ecc53da1f4a98c52ccef3b75eaf4895b4", - "positionImpactExponentFactor": "0xb6d3bd408c744959ffd59a568819258af55102649edb14de3f8c525ed02f5568", + "positionImpactExponentFactorPositive": "0xff90f0fd594559741a54b358c5e39403be19ca5cc517f64a13461963499864d1", + "positionImpactExponentFactorNegative": "0x070db7ec3889dd2739a754931fe2332164f862a365341096ada87287ee16edec", "swapFeeFactorForBalanceWasImproved": "0x9be51f5179ba5927f3ec2509daf80d5ccb06af86cac7f814d62123fdcd41cdd3", "swapFeeFactorForBalanceWasNotImproved": "0x8a9fe3c474ef4ef9d9693f2e0fbc6765169ed2b19284ae93a0ce93eb09b6e2fe", "atomicSwapFeeFactor": "0x3f814b1990fcc2590ee1e6f34b76b7aa9820a7cbcfec9ebbf1eb526848ac6707", "swapImpactFactorPositive": "0xab8e032738aa576a838476c84eb601e7e2f2a8b34e5dc5c536aa6f1b9264bb00", "swapImpactFactorNegative": "0x89dd570058416dd9eabb37b9b0572fe09e54d9096bd0805a622035cd5858e426", "swapImpactExponentFactor": "0xacbb4a823d8b7377146f586552852bef3ceca091776f5b319e655537bcc21ceb", + "withdrawalFeeFactorBalanceWasImproved": "0x821a6f77d8673c1709b0ac250e37b5bd2bd8c2a3dcd20f1a29329120c40fb908", + "withdrawalFeeFactorBalanceWasNotImproved": "0x2fc804fcf1981f37a9c57e3c3ffe55e3449653162ee5655cca93854da6d8edc4", "virtualMarketId": "0x5d464316e1950bfd9d813c2ee8d225be592408ce5a65c0eb039fec20c0718644", "virtualLongTokenId": "0x8ddf9d8fb09ce58ba879fb48de730c9c3cb0ccbf0475f4e71be16ed6c1d3e22f", "virtualShortTokenId": "0x8ddf9d8fb09ce58ba879fb48de730c9c3cb0ccbf0475f4e71be16ed6c1d3e22f" @@ -7180,8 +7821,6 @@ "maxShortPoolAmount": "0x7725940bb4d9bc3c99b1be2223db8f4318a5807dbca6044e5bb5858618d9b648", "maxLongPoolUsdForDeposit": "0xf00fa90dfa028e9fa6e850993da4f38c9d1528854c0530146d9a84fa87cca1e7", "maxShortPoolUsdForDeposit": "0x591e3ae07a9a9b6cb353d6c2f56ea5f341effec64d5479156fae40bc2128b92d", - "longPoolAmountAdjustment": "0x074ac905db8f4aca729f8d62c11ce97830bf6709dc93573f2fcf54fcaa50af76", - "shortPoolAmountAdjustment": "0xd893a2d7b611be6980d113436be018e919864dad5e0588dbe9af4967ca238b9b", "reserveFactorLong": "0xf6e6b1d4a861e49afb8ee2f3b05c3a648ddacd1070855e4130856a722d24b192", "reserveFactorShort": "0xa641aae10d5c32ce63a8edb1e64c8f355c1fbb07a6a2d83ce71e80110028dcfb", "openInterestReserveFactorLong": "0x26e5ed351e617f8529da834e366e5c2b90f81abcdaf2cd308aee8dd471a65161", @@ -7219,13 +7858,16 @@ "minCollateralFactorForLiquidation": "0xb8e50c3357c9b0687230c6323576d8c4ee3945c335963d1b140edeaacb2d4266", "minCollateralFactorForOpenInterestLong": "0xa4bfbf6c0ee876da9dcbfee32442a86b0f70ea215d40f50d6136531dde67e999", "minCollateralFactorForOpenInterestShort": "0x1155b83e2cfe76f46bd264febe8e7e2cba6781f6ae11885ebbce9ddfc94c3d50", - "positionImpactExponentFactor": "0xf7ac92d06cfc6e497db204105052083fb5fbfb4ca5eae120a960a9a3ee379273", + "positionImpactExponentFactorPositive": "0x893e370e76819efe3651775f78ada0860649f9efbc4a065f8fef72be5a1db139", + "positionImpactExponentFactorNegative": "0x99697138f18b0d0b59369a3ae1e1ff99158b738554cf7ff78b14700162c429bf", "swapFeeFactorForBalanceWasImproved": "0x9ff68505a5a6a99d8fcfaa7feffaf3845707beef48ea8496c9938dcc1c8cd659", "swapFeeFactorForBalanceWasNotImproved": "0xc122e6184657495f1328c62b42c211b809ac9f91bae19dcbfa431ea1ba12345f", "atomicSwapFeeFactor": "0xe28fd3f8caddb693b7f72402386369bf85b84285eaf07d50a09950d9240aa883", "swapImpactFactorPositive": "0x76e9a37967d0130ab2ef994e9eb21736904cb97869b42ea63c2ecfb00b01f743", "swapImpactFactorNegative": "0x782fdd24d86e31774c77cbb4cb2ccb0841cb0ccc392d2863a9ee28a52fa8dac8", "swapImpactExponentFactor": "0x7f06ebca597ee9e3171b8bce637b368ae38f9832a9b69b7b9182ad85232d5dd2", + "withdrawalFeeFactorBalanceWasImproved": "0xdb3609696df8c76dee43bbbc30b7397e50d15c1641f7d540f79968efe32a835f", + "withdrawalFeeFactorBalanceWasNotImproved": "0x55c36f47baa007d66c754eeb327f78e55ec789996496942593a266c8bcc1e22d", "virtualMarketId": "0x70772da3d66c09f0258ec93567467284138ce0c476bd39c033323a63c13e9843", "virtualLongTokenId": "0x024e60601109020acd88458d1d543f3e2345a3f7cd30aede0d5ffd5ef9f84cf4", "virtualShortTokenId": "0xb315f0a55a09b93c77ef9d370a2278b19027c88ccc7afd8b899b98bb033ffed6" @@ -7236,8 +7878,6 @@ "maxShortPoolAmount": "0xc617029b95679ecc77d2f288dcc6254bd9484eee8f2966b88d2fb51f604ab211", "maxLongPoolUsdForDeposit": "0x1582a8e78618b4ddb5c24f64383abb8a8d4dff3e87c08917caf87573fa43cfab", "maxShortPoolUsdForDeposit": "0x009e932a527aa0ec44c5c6b1a4307cbf54d88d8c900b0f13dde35c35b823df44", - "longPoolAmountAdjustment": "0x61fe949abf04c95000a7c20f0b5390ceb4e23a98bcef126b8f7d7e604cb2c924", - "shortPoolAmountAdjustment": "0x267a9dc9f5b6a3bfe637786f9db5c39b78629f242f3d8bcd176cba96a8eb23bd", "reserveFactorLong": "0x12e615b6607dbc90c9b6dcad281c29c75654e31c449bc0a90990c47b5dc0b90c", "reserveFactorShort": "0x1ab92951ddee335c05b68ff7560ccd10c02bd3ea340064c64c723b096b3de30a", "openInterestReserveFactorLong": "0xba760c9f38509f843d82c5d23471e3f340ec863c0a7add861487a99d88ba1278", @@ -7275,13 +7915,16 @@ "minCollateralFactorForLiquidation": "0x13c9ef205907f266e10818c057548e059c57d5a0b0fca29f21341a3a34a5f3c8", "minCollateralFactorForOpenInterestLong": "0x21af53e3b857539d49a91f80cd682c8386a7536bacee74a1e3694fcd304a8e46", "minCollateralFactorForOpenInterestShort": "0x49e09964b342ebf117d63182ee4a5d8dfd68db919bc3246e63d6efe220a8936b", - "positionImpactExponentFactor": "0xfeab5aa4b409a9a9a3ac990b76057d6bc1959f9ee2fded5fcf41f952766de901", + "positionImpactExponentFactorPositive": "0xe63bb8015744f225acec3c6d4fbee7a93c92384e48337d5398178f79aa23e666", + "positionImpactExponentFactorNegative": "0x74a027785474aff7b2863d033a00e8243067673462fa4c8c2d8eed3304810636", "swapFeeFactorForBalanceWasImproved": "0xff7943d5848e1ae0a03982cfab38f79b5e09eab5e5f62e140ecc2c6a2f85f271", "swapFeeFactorForBalanceWasNotImproved": "0x5a429e1ede60115ef530a2ca58fc82631d68c05947a67ca99fcc7620b9f5ac99", "atomicSwapFeeFactor": "0x23378dcb748980f5601979fa6eca9aede2470a803a8fdafd86daef60715c771c", "swapImpactFactorPositive": "0xc0cfe1a7954d25ec07bce3d66dab98e0e6f267790c569760cebf1bbab2261402", "swapImpactFactorNegative": "0xfaeadc81caa528d9ef2ad32fae0acfde6fcd2b7caecb02a1636dd457cfbf8a6e", "swapImpactExponentFactor": "0xee2501baa786d9721010c6fa98e1110d7eee82eb1f0e9445b705fd718bc9ebc1", + "withdrawalFeeFactorBalanceWasImproved": "0x39b9f1d4544c37dc43e60005c89a11b630635f85a1eac15268007fb47804b293", + "withdrawalFeeFactorBalanceWasNotImproved": "0x911a65ecbb17239ec121ec4911414c674c12d21c88020f89532830f46dea2ee4", "virtualMarketId": "0x2d80a21b29895e87fde496f92f11c00e257ce81598b6fc6b10a23dae34451031", "virtualLongTokenId": "0xa232c25fc2702b7379fa2865649cdb29aaf502ce1d0bdc6ce0a5bfb86d89f3aa", "virtualShortTokenId": "0xb315f0a55a09b93c77ef9d370a2278b19027c88ccc7afd8b899b98bb033ffed6" @@ -7292,8 +7935,6 @@ "maxShortPoolAmount": "0xacbe8c391546281fc6bad991177377ab0fd7a156d1d243db72372e7b6b1e2bc4", "maxLongPoolUsdForDeposit": "0x554f39ad937e786c332e6edda5475e8c63174232cbd784a5b1c1bc8060ee071d", "maxShortPoolUsdForDeposit": "0xecbc498848ee7ea12a248377ea5048ea4de80a06a3489bb26f3ce851a4a35a46", - "longPoolAmountAdjustment": "0x4624a403792483e3a328c2f7ec8b7f8855084fc574a090b8eb9a49a93126ee87", - "shortPoolAmountAdjustment": "0xdfe3a3f0cc130afe1238c08f442d90b2cb91a2487d8607487640b176cccb7075", "reserveFactorLong": "0xe0dabccb5c9a770b1ded30cd35164fa592cceecf0425ec0afc1c88d328dedeb3", "reserveFactorShort": "0xc36d3ecc169f6f355d4c2c305393c808769b5a3e3e0029e4b184daec9d03c548", "openInterestReserveFactorLong": "0x4583d42ca986d7b116ec69a3a1fbf8842f097733e3a18007d19fd216bfccc92e", @@ -7331,13 +7972,16 @@ "minCollateralFactorForLiquidation": "0x096a65eaa096404bd43912fab0518b62149c2bf39f85d1848fd4d78c40f8dedd", "minCollateralFactorForOpenInterestLong": "0xcf807ed6fdcc8664b593225fc63bb816add4008d891a840fc6af82bb00f9bf3c", "minCollateralFactorForOpenInterestShort": "0xd1aaec1d623b1045cdfb9e5e91e9ee1667fc872a64bab967a18ed039fbaf1c97", - "positionImpactExponentFactor": "0xe50ebe93dd21ce63048f6b6fc748a98f88786e0b798aa7bf3f8c594b729e06b2", + "positionImpactExponentFactorPositive": "0xa90ad6584ac6b2b75e3455f029f65bb13b93e0bd2806f613b7b5ea55ca7eefc6", + "positionImpactExponentFactorNegative": "0x83d3bdcecdc32167fc4cd12fa0aceab0a89cb8a20500d451e85b5a0fbaaf3db2", "swapFeeFactorForBalanceWasImproved": "0x4bfc0ff68b6a51da4cd8b290dbdca223e00ed95be57f4ec4d0387d80893f6042", "swapFeeFactorForBalanceWasNotImproved": "0xd1f0eb18d1b70fd022efbaa081a9d9d49f5a66041f12a9ddd7d542b91dda9500", "atomicSwapFeeFactor": "0x348129bb3c99c81479947c66771ea7a63bc37b52fa6038a498dc9cd885ee1573", "swapImpactFactorPositive": "0x419f18d9a5b531da198a09ba7ef2476b5eeae9c3a16e5c3d739aeac467d6a30f", "swapImpactFactorNegative": "0x0959316b70af2ad02e67588267776e3771423d4755a6eec179108a4455b6703d", "swapImpactExponentFactor": "0xbaa3866145a17207d0e14128c5635d797994884691d43aab2b26b0d235af844d", + "withdrawalFeeFactorBalanceWasImproved": "0x96a31e7e1ac95158480a6a2ec7721ff7faaafd885a6a6de4c09293c03f56352c", + "withdrawalFeeFactorBalanceWasNotImproved": "0x8a2d97828d2ee0fcd6f7ae53eb8b871ea3a498e48df7d6ad01723012721ad615", "virtualMarketId": "0xc0e2e4d56b51293503332020d7b6d52bed703017fb82c7b29a5d05ce29f3ecff", "virtualLongTokenId": "0xe7ad78f733831866f62141bd25f6d75da98498ad5783721686716dce5043e520", "virtualShortTokenId": "0xb315f0a55a09b93c77ef9d370a2278b19027c88ccc7afd8b899b98bb033ffed6" @@ -7348,8 +7992,6 @@ "maxShortPoolAmount": "0xfad5881227ece31b04d4542a77f6c6612e83574aaa4353f679d0d70bc186105c", "maxLongPoolUsdForDeposit": "0xdac030f8a6d1fde6b8c00c4f071d570b72a2a8c2524ef2b5dd70c953c46329f7", "maxShortPoolUsdForDeposit": "0xfa752292e654525d5ef45029c34c3769ef82cc490b70b25800bf95d9a35d8ba2", - "longPoolAmountAdjustment": "0x5dbfe7edb846d8f607f5acaaaf5460ce8a2b8e8d4cad30fdac286895aa8a1efd", - "shortPoolAmountAdjustment": "0x42dc820eaae0b3f0645b4dc2b23852dbeca5baad2a19945f1d7009b00689e642", "reserveFactorLong": "0x2d4063190a06ec021239c1bc9bccf8aa894d27f8d3492dbe6bc2fce767b8ac4f", "reserveFactorShort": "0x083123c6a54ceff4123ab5ba2a2c05deee5c5f34af274aeca5b3becdba0e3cb5", "openInterestReserveFactorLong": "0x9947b50c874397f027501f3950c708a14cfe032ae3b8a29bc93e42d29a33149d", @@ -7387,13 +8029,16 @@ "minCollateralFactorForLiquidation": "0x71a102ce47f7a87ab0db19e35ee9bd0490ab45b2b21733cd96c946728333c56e", "minCollateralFactorForOpenInterestLong": "0x958a0b1e22336db2aa2a005c0f60bec36679d2f78effd8393d8faa699cb6f401", "minCollateralFactorForOpenInterestShort": "0x6ec70b5f9ac71a65136fe6ef68e9cccd1641597d35bb772801bffd12156232f0", - "positionImpactExponentFactor": "0x2067b76344d2ef6c31a16da6d9c602f6f0b6c6083b623dc415b7c54e9227b51e", + "positionImpactExponentFactorPositive": "0xadbf531e959758e0bad9c5c09a5ab55f58e70ce4a5d665c1e55797ca991616b7", + "positionImpactExponentFactorNegative": "0x6f11cce2c668e7585e39ab584027dfacbfd9b6068fa1b6686f8125a4a06c26b6", "swapFeeFactorForBalanceWasImproved": "0xf90922ccdbdf7bf5da782f778623194f62c4e1a1bf2feecd9c5d65cc21a052a4", "swapFeeFactorForBalanceWasNotImproved": "0x19b9bf256fd0b1fd3cb363b592c1a5f6fce3898af1562c22259551a5325fa8ad", "atomicSwapFeeFactor": "0x7c6db4ecbc64f7d30f081d2bd25be2c58442d77ab91b8d0afc618978d26d0722", "swapImpactFactorPositive": "0xf5aaedb45293401a80c2272b02d76b9e9aaa280cd4b02ea183b8e8e8dd1ecdc1", "swapImpactFactorNegative": "0xcac9b44754232c7262bb194373f9b73d63a1d935f0fbb466fac538af440f8ac2", "swapImpactExponentFactor": "0xf51d1fed9f0cc109d834f2868958a9c12cef620aa1a089a6878be5cd5b0416a8", + "withdrawalFeeFactorBalanceWasImproved": "0xf97c2718d0787281293b20c8148e8bc6a4a81a54e0424ef33df1ea1468e1acad", + "withdrawalFeeFactorBalanceWasNotImproved": "0x3ac870ec217e455d968138f77718283267dbb959e68462653c36f37e598dbd56", "virtualMarketId": "0x1cfc55f83c330e611551f5021ea4dd39c813ba02a7e0f70a8a55a6329fefede1", "virtualLongTokenId": "0xda49ccfa12cf1ea3524e26695e8fbdb9fb312bbdcab838a1c14770e241241eaa", "virtualShortTokenId": "0xb315f0a55a09b93c77ef9d370a2278b19027c88ccc7afd8b899b98bb033ffed6" @@ -7404,8 +8049,6 @@ "maxShortPoolAmount": "0xbfe311b142f38e87c0429d85ad70b6e52cb339b415b3bea000185f7187440535", "maxLongPoolUsdForDeposit": "0xd14ef246afcc9bb5c01ad60ff8d8759b553fb185758d4502156f02411c59b11a", "maxShortPoolUsdForDeposit": "0x9a994a0d163257194e5b39755a77ff918519dccd11d1920bae4e49849fb66ffc", - "longPoolAmountAdjustment": "0x2f82b5ff7249f1971e857ef3b533a4dea90ace57fa35d40c24defa460a54f919", - "shortPoolAmountAdjustment": "0x4d1dcd55a421bced119df473fc45a401ac3f5067091495afb19670f4348eea35", "reserveFactorLong": "0xc7b8eba7dc2cd86b5e29eb562ee6930fc4f63acee034404f40c081e4c13f5933", "reserveFactorShort": "0x8cb5f9c7b8d5e54eaf836bf43dfd609d9d3577b9f2398f0cf99a67b49a33decb", "openInterestReserveFactorLong": "0xf6bb18bd634133801cda5aea1e49e18f455e364801d54b262ee69b1f925fb532", @@ -7443,13 +8086,16 @@ "minCollateralFactorForLiquidation": "0xd920b7294e62802604fada6c7c980ebb231a9aa0696622422269bdda53254fd5", "minCollateralFactorForOpenInterestLong": "0x5f9b7158e11769003f8be017ed1bf645a37c93d2c7f1a07fbcef8ec7f04cbb6a", "minCollateralFactorForOpenInterestShort": "0x1de376a03ba431c6f254a42ac66ba838045ae552f87f4894d0ab5c0854f94ff1", - "positionImpactExponentFactor": "0xe4d2b50abb09343c53a1dfa74b24cbb4c5aad66c8e94cae1da7a611c0e637eba", + "positionImpactExponentFactorPositive": "0x7fd0e9db30133311cb4d05429381af2d4bb38c8713c89d441047ce28a0601283", + "positionImpactExponentFactorNegative": "0x2f46e7bf430302e90564831edbd5c6f352d6a0617429f4c00b4eb42b53417ff8", "swapFeeFactorForBalanceWasImproved": "0x1e5f4c350cf2fbeb7312594b741013cab6f982ba880e400fb00a410cb3abad5f", "swapFeeFactorForBalanceWasNotImproved": "0x56c6c93fd5ef836406270f67fb0be7246f7414db276316b34265d269283dcf0c", "atomicSwapFeeFactor": "0x1d242793f220d0a818aadfde2c9fe8c1a13017f1ddd5ef560b7b7628d73e23ca", "swapImpactFactorPositive": "0xccc77f870ba42d778057d944e6c80fb332320084fea7acffec3838cc2c4b84e6", "swapImpactFactorNegative": "0x581d1441b56c1e2c8de4ef60d65ab0f3ee119350688aa8214bc1f3f19f629eea", "swapImpactExponentFactor": "0xc6d4eda05e33dec48a6acd523dbd21543dfdae520576087b2de5a6b6aaeb56ad", + "withdrawalFeeFactorBalanceWasImproved": "0x2182916f14424461d96d16b16e75b5daf3a039f173f3932d0f6ceaa19db04f4c", + "withdrawalFeeFactorBalanceWasNotImproved": "0x75e511d7f51ebf2f93d00aeb6ca63107df8995b292e41e20ea73b0f387d1eb86", "virtualMarketId": "0xca20066cdfe614d4256ea21d1c4be2e921d928fe96589d6ef330c2da92edef1d", "virtualLongTokenId": "0xe7ad78f733831866f62141bd25f6d75da98498ad5783721686716dce5043e520", "virtualShortTokenId": "0xb315f0a55a09b93c77ef9d370a2278b19027c88ccc7afd8b899b98bb033ffed6" @@ -7460,8 +8106,6 @@ "maxShortPoolAmount": "0x64e7d4710a11185dafc270df33bbb127940c2b16c2084e42b04e347abee57e4c", "maxLongPoolUsdForDeposit": "0x2d4e0e2fea17b1da5f94f6a4a5e6bfb0628d683279b1eeb3aa19043f5a82e916", "maxShortPoolUsdForDeposit": "0x00fe56a7cf85e1c5b10d4ec9a14b15635c8cabd35335830a8262f73f4bf3c317", - "longPoolAmountAdjustment": "0xb2201b8ade078c545fd39888f7b979ba6da6e1df7ccc2f2c2400d95305d08db7", - "shortPoolAmountAdjustment": "0x1c206315dbcd00466f36d70f056bd44fc58f1d846198ef5c01bef57a7a5ce484", "reserveFactorLong": "0x3d95bca9d182e31e667bbd28b7cdca72f0abeba45e9b47abf8472c18cd8ff662", "reserveFactorShort": "0x08e88473f18751500ada8502d2823bfb7469a63ed60509f5bc281451ee3a7af8", "openInterestReserveFactorLong": "0xec652e22e54520429c4c66bfa241d129469e5892b58ad950ec52473aad9d1da4", @@ -7499,13 +8143,16 @@ "minCollateralFactorForLiquidation": "0x4d36cb411e16178e83604c194f3384eea3dfc987123fd9cc25ef8f78dd043ee1", "minCollateralFactorForOpenInterestLong": "0x35b24de0a1a1af62333ba0be24b03cf0639b0e1395d94c4cedec839ca221b0e7", "minCollateralFactorForOpenInterestShort": "0x7a3010bd5329103b10512f4947b9d5ac36e6bc5677729ec4f8f68f35924f787c", - "positionImpactExponentFactor": "0x337e63e32187ff3fc173f5011397d5eabbdc507646d2393fd8fbeb287fc4b868", + "positionImpactExponentFactorPositive": "0x82340d8c46eac8bff9bacd26c9c6f9e76d5dcea7548064b15de72cb75972264a", + "positionImpactExponentFactorNegative": "0x298a8925d94aa1ff2c43527abc647d9a67ba6eccd8c15cf69aa9f7dd81905a2c", "swapFeeFactorForBalanceWasImproved": "0x1d62b36458b3597ca93c501028c3de5017918bd9aca0ee3acd919329b2ff8ae2", "swapFeeFactorForBalanceWasNotImproved": "0x5cd08eeaa4133f740cfe2c8d7f4ac62db55fbf503024a0c08b306fd39b48c935", "atomicSwapFeeFactor": "0x9c34e983234a66a6e55681e0829a7d27ab358f9897eb04561eed25f40afcb787", "swapImpactFactorPositive": "0xfb399f4414b807428dd2340b923793f8e3e223c3758d217c66c320265786db6c", "swapImpactFactorNegative": "0xa7583e74286befd226ba820f162caca16ce41291b51dcf4210b99a53bf8d713a", "swapImpactExponentFactor": "0x943c4ce8ee656546292d9a194c061eea37683b344e34d71495cd4555edee883c", + "withdrawalFeeFactorBalanceWasImproved": "0xe7acb203b39dd082288b904c774794acd5d16f802b925491d3dff4afa176a998", + "withdrawalFeeFactorBalanceWasNotImproved": "0xd4cfeb7c03740dbdd32ccbe84d303cce6acaf04a9bcef293914dac57eaa73b84", "virtualMarketId": "0x0e3547b9cf7cb8a1f155129657846708bfcb1d81d78835b7a4bd56ea3a22e29d", "virtualLongTokenId": "0xe7ad78f733831866f62141bd25f6d75da98498ad5783721686716dce5043e520", "virtualShortTokenId": "0xb315f0a55a09b93c77ef9d370a2278b19027c88ccc7afd8b899b98bb033ffed6" @@ -7516,8 +8163,6 @@ "maxShortPoolAmount": "0x269f1fae3a7b65896d9c02d0c07eaf30d633ceba04346ba62452dd4b4cfa3dc4", "maxLongPoolUsdForDeposit": "0xb689c6b5a6fcc464b0d39d73b6303573b6117b1aa700b20f8f0bb87ed4e22b8c", "maxShortPoolUsdForDeposit": "0xab46c37382eeb690d58ca27c0a176e88518985a9a7cae7c59b69666a08ba0bd2", - "longPoolAmountAdjustment": "0xee88b1fa8ce60960a1eba0ec28edaa0d964b7ac8fa4a418e0ea12718e5a16afd", - "shortPoolAmountAdjustment": "0xbaaeb3938a75f89df770df6694e06017ca9803679b0c1bfb8c758a9b211f5bc7", "reserveFactorLong": "0xd605046cfc87a0b3589133bdef2515bcb09136534f1f841330c571d0d3346f5e", "reserveFactorShort": "0x57a18137fa9fdda8b3b1bdfe836e3dc26a5c7b05ed37b84eaf034a5222e53d8b", "openInterestReserveFactorLong": "0xbd8246a53141951996ef354ce6e8d9edd463105a58c5561787dc92460f81d067", @@ -7555,13 +8200,16 @@ "minCollateralFactorForLiquidation": "0x00a26c33e84c34d7464b8b5e05c899812831d9c82e964ca0f6f73e84eb5a7c1e", "minCollateralFactorForOpenInterestLong": "0x58330b893e1565ce7732e4b4d3255dc018500d7aefd5d58946144d3067508cc0", "minCollateralFactorForOpenInterestShort": "0x2d6e8b614741229e997e7f625533433018db60bb050980a288071b2228df61b8", - "positionImpactExponentFactor": "0xbcd5e535b6b2461dd01c0915177b85bdf2ca0974c38402810a2dc5ca974cb8ed", + "positionImpactExponentFactorPositive": "0x0d4c3c8c5a7ff61ceacaae9a043d4767850b7f27d9d059b95c41feafb4f59456", + "positionImpactExponentFactorNegative": "0x8b5f3d43bca5a1b33763cb080b9b859c4fc151d762e69c7e6f20d15bc19eddaa", "swapFeeFactorForBalanceWasImproved": "0xa3ba4d614e29505bac315dee9664716cfa96cadb6207c8ead416299ebab8b69f", "swapFeeFactorForBalanceWasNotImproved": "0x8b990fd6ef7a24250b629c7fa3d3e965f2ee10c1b17c15d9b072aaf0d75d11b0", "atomicSwapFeeFactor": "0x65cef630b6bd35dafd0d12f900765be7171b761240e6caaf01c21d18f5f78ee0", "swapImpactFactorPositive": "0xdb794233f573199e11b2568c3c92f38a3744dece73525f013a685e528bdc6e00", "swapImpactFactorNegative": "0xd579ac5d1571cd61c69c378ebd76a71638e7312306b99fbdfeece3fa47ada36d", "swapImpactExponentFactor": "0x29711b33c281e649cfa71890aa153b28782df34f91a2097dd43f8e75fc408262", + "withdrawalFeeFactorBalanceWasImproved": "0x95c019587ba56a4f7b28934da5177483097045869218a2a625a3ecca5f6ba706", + "withdrawalFeeFactorBalanceWasNotImproved": "0x72acffddfe32e683d70c58cf390df8a88e144b6c595ce8e33ebd7b9446c2ca9f", "virtualMarketId": "0xc8dd68fc490d88c3c3f4216f19696bb65ea304ce12cc32244656eabf754ee4d0", "virtualLongTokenId": "0xb315f0a55a09b93c77ef9d370a2278b19027c88ccc7afd8b899b98bb033ffed6", "virtualShortTokenId": "0xd76fd75c4452939b009a75d63649d6832a008e70cc237b16267c9be01be30308" @@ -7572,8 +8220,6 @@ "maxShortPoolAmount": "0x52a75c8582d44cf8c19d102d9f0c4f2128663e326960a8d2340c7891c2f63e06", "maxLongPoolUsdForDeposit": "0x131b3c2cff98aed325d1b94f27b7a40f32e087c71bdccade1c6be7415dd86cfc", "maxShortPoolUsdForDeposit": "0x8a121ef39dca2279ac44cb780b1bc5269ad97e5239df51ee855b7f808830ebc1", - "longPoolAmountAdjustment": "0x0c5d09c59ff7f61a65aa5addc86d1f2dada6c02a5315a87f5ae0efe847c8163d", - "shortPoolAmountAdjustment": "0xf309a338c0573788b5503a881606fd30381abe09e972cf894d7474a4fe713ca2", "reserveFactorLong": "0xef0c63acac664a4a7cd1c920ef7ccd729ddcb6691438641fe582f319dd998d36", "reserveFactorShort": "0x94d7e9afa99a67aab5a3b3b920caa3454c63d34623572e7636c2ab929ff1cf9e", "openInterestReserveFactorLong": "0xc342533c0332f891defcde3416aa8794b6a2a839b69f6d74bc4f5eedecfd7f12", @@ -7611,13 +8257,16 @@ "minCollateralFactorForLiquidation": "0x8e64049c3c2981df32bed046c45d8b9a264df191d293b069d02d0e790add562c", "minCollateralFactorForOpenInterestLong": "0x68db012f561515480190c5a28c8b7c8bff8bcfefa9f2329aa4ebb00a64dfb027", "minCollateralFactorForOpenInterestShort": "0x3e66b9a84db4568cb7137ffa35aae284f2ee5221724165a49f4fab30490c337c", - "positionImpactExponentFactor": "0x71f13bfb0b47f4087378469ece6811760e36e271d52c8b788af0871595bdb4b5", + "positionImpactExponentFactorPositive": "0x87cab9edc61482dfe596273fd4a1d052b217b705094f39d207a57076e0d1502a", + "positionImpactExponentFactorNegative": "0x3e1ff12cfbd706b836d5eb708a608d4794719e8dc022f7b866208ba096e0d2b4", "swapFeeFactorForBalanceWasImproved": "0x82120bfaf43c7c864880c85bea94c8aed5961dce6c788d1b372783676253b5c4", "swapFeeFactorForBalanceWasNotImproved": "0x9d43fe0c42b447782429e2c237376e87968a70de628212c5900a269da92a6c55", "atomicSwapFeeFactor": "0x4d523175da4643979f545e13545036af4f14cdec8da5cdadd33ef6ff363b0521", "swapImpactFactorPositive": "0x5ac0772f7d1d01adeca5890fd7a12efb194b042a949ff9676956a1b18a6684d8", "swapImpactFactorNegative": "0x1fda8752104b3cec09d2f3deae9a845297c27bf555787375a5095da13b00a0a0", "swapImpactExponentFactor": "0x67ffca46672ad8e81a5ccd1f83a1b5ecb12177ef0235a68e15c3aba5f7e6d588", + "withdrawalFeeFactorBalanceWasImproved": "0x8150576e8ae300110056a34e7bd1d323ecf4be5653d359ea13a2c5811fbe8459", + "withdrawalFeeFactorBalanceWasNotImproved": "0x5eb95558b05bdaf1ba3e305179a6e731d93338ab401a37555ff3560ae2f9d858", "virtualMarketId": "0x6549f7db555b5b5ef63dbee7e89c8bc50bce7a187771064df386943c5c068520", "virtualLongTokenId": "0xb315f0a55a09b93c77ef9d370a2278b19027c88ccc7afd8b899b98bb033ffed6", "virtualShortTokenId": "0x3586bee7d2afaf337c8c1f94d514ab219b0472a7999137d2cb4c956a5e191ee5" @@ -7628,8 +8277,6 @@ "maxShortPoolAmount": "0x387ae0c6d506bc857483030a7599b079e7dec57b6859e729b437b880fa38963a", "maxLongPoolUsdForDeposit": "0x5355b103ac95cdf38b0dc0cae3195dc92531b5537a31685caf67f3fe6647a777", "maxShortPoolUsdForDeposit": "0x70ba7395410d5b64982292466699690b6fe377710829ddd4e836798d80eb741c", - "longPoolAmountAdjustment": "0xa0321763c79ce7acea97dd13192879e06b88a43c0455df385d4553a1a9f569b5", - "shortPoolAmountAdjustment": "0x4b0481000fdc3c15cee3beafd494353c73c8bdea87d6e319b0930ef79a979691", "reserveFactorLong": "0x74e0cdd80c0285b5738c374ce55ec59a452e654e244523be17e778b5091cbff6", "reserveFactorShort": "0x4dcecac5bb0791fa2891dad919663e3e3944aba0a67489986209b6c5542ddb89", "openInterestReserveFactorLong": "0xe7e09efec9568c23ff6c13d6fb2c457d4f9eaae157588d58d3277d521ac828ca", @@ -7667,13 +8314,16 @@ "minCollateralFactorForLiquidation": "0x9793b322d406bd3ab07bab9bfeba55d733658a1866fcd18806a2ea761138e9ec", "minCollateralFactorForOpenInterestLong": "0x764b0b370f16745c38880c82893b0b0272f2631f1298984dce74474631a139fd", "minCollateralFactorForOpenInterestShort": "0x0341fd2b324b8ef1cf6e9c3df7335e1ea580bf8a0dbeb293d36f45ccb4e7cd76", - "positionImpactExponentFactor": "0x6ee59d63c0332b05fdfd3c9c24565b31a667e9634f594ec3454331863bb0bec7", + "positionImpactExponentFactorPositive": "0xa17efa4f04d791d3499fa481c6196d9bd9b8643589691b100b8c241a6ede53af", + "positionImpactExponentFactorNegative": "0x67937950bcbdf5e1eac451bdd0095fa7883058c7074f23b426946d3189ab2882", "swapFeeFactorForBalanceWasImproved": "0x2b53b9fd42b44447585ad140436a690598b97e3a3ac95e23f5fb572474e47b91", "swapFeeFactorForBalanceWasNotImproved": "0x3768b6cc037ee07054b27d75caca82f3c4fed7ad75cbb2cf6309c3bb6b558a1d", "atomicSwapFeeFactor": "0xe25421b86db3537779e58211d2533e3a76b716d49a68233219f571797714db0b", "swapImpactFactorPositive": "0x4d2ba8b5784292dddf36d28528876fe8c70b2c1a23eba9b543e83fe6ce4fde58", "swapImpactFactorNegative": "0x98753b02e57caff21ef4bdd4d67181248ece31553487ccb8d253684f83680156", "swapImpactExponentFactor": "0x89f9737019e4ed3d7fefca8064ca1c1f1c2eac686143ba606cf7bebc80a84660", + "withdrawalFeeFactorBalanceWasImproved": "0x367650f9957f7236c3fd6882273b3bbcb146d0d3ab6cd79a7d36355b82af2d6f", + "withdrawalFeeFactorBalanceWasNotImproved": "0xfe643c0820b22d20d229f38fba0219e647ed0a6f1120f984c356f4bccd43d373", "virtualMarketId": "0xee55fcd3a9c8f4786238e3def3fadc7f3ed6ed40c71c8fa94c27d23e9ab19f87", "virtualLongTokenId": "0xec72fbd52db927c6d1c8a079da3496965cd1f007a9cb861600facc7dea1a2f02", "virtualShortTokenId": "0xd76fd75c4452939b009a75d63649d6832a008e70cc237b16267c9be01be30308" @@ -7684,8 +8334,6 @@ "maxShortPoolAmount": "0xde187a4402526b6d5709e7e719c3f83e215fbd275e61bf1c4dc6e6e30c2d3c39", "maxLongPoolUsdForDeposit": "0x42175f37cf91f0468b778ce041b5d74595f875e56c091eba5ba76ff505eadc45", "maxShortPoolUsdForDeposit": "0xca413aefd04e44fc63fba9f965ba24b673f7248414e195491b16c659588097e7", - "longPoolAmountAdjustment": "0x9c76ae6d18457612e95d72ad17c7075cfade07edde25bde2d1752cda2e84b9f2", - "shortPoolAmountAdjustment": "0x87527a7b8ea5a9d617c275b0e00d072a28d2669515ecfb1cc4bd6fb86d741161", "reserveFactorLong": "0x8f4fe9e8ea8066f68aa3bf86a73227604a58fd5255040812d5c7969e81d373ed", "reserveFactorShort": "0x4b84643c9a65c65e4e92a59fa7f2052115c5fd7623c04a5d41965e2dd964540c", "openInterestReserveFactorLong": "0x2215170206e10cf96cd6bbba4b34dda14005d9a4a9efdded7838d53c8a358d37", @@ -7723,13 +8371,16 @@ "minCollateralFactorForLiquidation": "0x47485a33abc979478e8344f4f7d339fe712240f96bba4b1b86e87d5e787073b5", "minCollateralFactorForOpenInterestLong": "0xe1a895360341ff2c180e3c4243d98086f42adfb2b9d2e5081ac3a5f955d63d07", "minCollateralFactorForOpenInterestShort": "0xc71812a119761c33f9b4103ee133e3ccc0d55fadf484bdbabb43cd21eb503207", - "positionImpactExponentFactor": "0x9431bd8b3347a4230288b4bdb918b609eb1a647bc3c10c3db5e795b420ebdef1", + "positionImpactExponentFactorPositive": "0x817532129b4d8bc589f9da89e0b795a5c368f97fa6c0b8bafd7888ff33536c00", + "positionImpactExponentFactorNegative": "0xf087f713a07f94af0814fa0ed45ff6c6fc248c2877dad6d56eef01b0fb613aa2", "swapFeeFactorForBalanceWasImproved": "0xa8d9f9cff183b65b7dca088651a8baed5af77625298af1a905ae91969311ec55", "swapFeeFactorForBalanceWasNotImproved": "0x93427d77b84c63793a2d92dfa0d1f2129b49307b109fdf789f92d4dfc3eba264", "atomicSwapFeeFactor": "0x59e74a1d6a0fe01c168273b218979ba368fcbead6edd6248f4062f1ae77e128e", "swapImpactFactorPositive": "0xd4d4fec3dac5d648af883c5241e322bb47dcd508044fcdd52b3676e7a8609cba", "swapImpactFactorNegative": "0xf7d514343cd53634029821b1b23419bffd04823ee244f6403632a85290c4fc68", "swapImpactExponentFactor": "0x6598158e286f5d7fb1e33ce7d4d6d6cdc134811b72f3166399ca5f0683005f9c", + "withdrawalFeeFactorBalanceWasImproved": "0x3c7d599a6ccc808e1b7c50b39166a5b3df9fe1b58e8a70f68dfafd93f4dfbeb4", + "withdrawalFeeFactorBalanceWasNotImproved": "0x258fca99b7e1c3466ea9c1790001b08c933c9188bf6d83fb86fe74864caac870", "virtualMarketId": "0x3a64ee272a461e24d42d7ec7a3457b2a6c46bf8f114b1dd0e9c80543ff93950e", "virtualLongTokenId": "0xb315f0a55a09b93c77ef9d370a2278b19027c88ccc7afd8b899b98bb033ffed6", "virtualShortTokenId": "0xd21809bbbaeafb84cde5c437ba0897bda019a417fac4e29387ef19cce3d07cd2" @@ -7740,8 +8391,6 @@ "maxShortPoolAmount": "0xa451bdbb4108beec08e1419387a5c95a8046d0c810de6b24e57b55adf7b369f2", "maxLongPoolUsdForDeposit": "0x19e88dd652377c62aee339fbd1b4aaf894223ffce80c64f093d34ec0dea07a84", "maxShortPoolUsdForDeposit": "0x95ac91e2d7cf026d6f6b5ce5e19f676d2f2dd28a32349a230582824a8b1c8911", - "longPoolAmountAdjustment": "0x853e0da44666bf300399d572df11d4e24f5b87d7e2577542af041f35adf0d1a3", - "shortPoolAmountAdjustment": "0xb70ef5d0fba0c7fbbd660d1deadff7c019daa1470ad4c55e9c29eb404e056180", "reserveFactorLong": "0x26e36ff8dbe590da2c39e2f349d0e5ea97f374dd41a773a5a18111194583148a", "reserveFactorShort": "0xe6a405ef7c83174bfe0769aef2ae2c24210c04fb584515d3d1d3f404f8e32043", "openInterestReserveFactorLong": "0x2b4bf340e03fb526dd1b3fe625078357c42f3a486130bd903a622bfda506a0bf", @@ -7779,13 +8428,16 @@ "minCollateralFactorForLiquidation": "0xbf4106a36b751df8edfb0c97be58049aa60a9535d83945c1e856f91aac3fbe2e", "minCollateralFactorForOpenInterestLong": "0x39019addfc2617caa7a3c788332ec013a656af5eeb2726791dd869e978b6f0b5", "minCollateralFactorForOpenInterestShort": "0x39fb129d3f05dd00fe0eaf0d95008439a0067785fd383e421191678b13db471a", - "positionImpactExponentFactor": "0xa7b30afea3af30a71b26148e633e26ce9280e6a9b0585f0bb857a52208354a90", + "positionImpactExponentFactorPositive": "0x523f33f1e2dfcf66904d3c43aaa3bee3ff9b4d31b11525e25be9ec10e4321719", + "positionImpactExponentFactorNegative": "0x877b89058cdc782d13b7f1766ac1e842519b81f6a0f5fac56d175d4e8cae8387", "swapFeeFactorForBalanceWasImproved": "0x4f4d5219acbebf609e4d3f6dfab866ab875b7493b5ac846a466dd651bd2c238e", "swapFeeFactorForBalanceWasNotImproved": "0x78661a123a93d91d906d41c15c007b19ab8687ce43ae33bed9698de1fd05e9ed", "atomicSwapFeeFactor": "0x1079426947df79faf42bbbfd1ee6735ad7dc60b72e13f804901d8eb426ab5b70", "swapImpactFactorPositive": "0x9b3474784c1a93dc2d0f8f721f7efefb15a584887583dfa3e303ce08249ae5bb", "swapImpactFactorNegative": "0x8fd022a687a7b4da97ceb03d51c39824c1f0669ab078f69b9e27d1f044192986", "swapImpactExponentFactor": "0xe32d18703e43af3e655c210a037d7e7e68a985884947ccaac21eaaf0f08d89b0", + "withdrawalFeeFactorBalanceWasImproved": "0x0d7f5e89a289691127eea6b1e9dba4e9419cfe478f28dc67ed7775c5dfa23ed0", + "withdrawalFeeFactorBalanceWasNotImproved": "0x16e5be45a139c0327ab525b365d354c6db4ca45ed4996e16e9deb36c2f639dab", "virtualMarketId": "0x967b7941411562788a55b8fbdf395c2c3a8be7b6296e0e170ea2f9d4d6c70f54", "virtualLongTokenId": "0xe7ad78f733831866f62141bd25f6d75da98498ad5783721686716dce5043e520", "virtualShortTokenId": "0xb315f0a55a09b93c77ef9d370a2278b19027c88ccc7afd8b899b98bb033ffed6" @@ -7796,8 +8448,6 @@ "maxShortPoolAmount": "0x22a20531538b96f40f34405243b55c18bc03d308aa7c4337d74c90298f6e4ecb", "maxLongPoolUsdForDeposit": "0xd67e4a31d6a082198f959649d918f1132d5c2f4b17be7b201d41c136b4b35f47", "maxShortPoolUsdForDeposit": "0xd67e4a31d6a082198f959649d918f1132d5c2f4b17be7b201d41c136b4b35f47", - "longPoolAmountAdjustment": "0xbcd50fae38d160909645505eded935455b18be4c9f51319daa8fca3c193ef3d5", - "shortPoolAmountAdjustment": "0xbcd50fae38d160909645505eded935455b18be4c9f51319daa8fca3c193ef3d5", "reserveFactorLong": "0xbdd0d3306b1d702cc1fa0a8dcab90f1b86bac7487161ff21c0f281e5e995976f", "reserveFactorShort": "0x89dd70a1455b7fb7f451f5aead81c9d4ed27486053a658eb7f726c296dd58929", "openInterestReserveFactorLong": "0x58bd0b46b4206aeaf5d0bab8c5b967bb919085bbf9749e01039304dca3dff8f3", @@ -7835,13 +8485,16 @@ "minCollateralFactorForLiquidation": "0xfbd2218164ffb156dd63428496d0a3038351db6817aa610b8a3d9c01b6da48d6", "minCollateralFactorForOpenInterestLong": "0xf7423212c3b818bdb9261de36121cde34561293943f7645be9b61f0c35d8a996", "minCollateralFactorForOpenInterestShort": "0x4940911a4ea682a30fc360ef3c5e02a757e3602a50c2abe4c13542699a19566c", - "positionImpactExponentFactor": "0x795f98ee94796448bf3c91698960e4f41eda771cc887322c8157f4ab66fdadf0", + "positionImpactExponentFactorPositive": "0xdf0f67bc3dbade93718ecb127b045cb44bf280ed793bcefdf57593cc74ba1516", + "positionImpactExponentFactorNegative": "0x801577b5c83a8135595f7f14c492ad4a9d4cad3feacf797987e41ed1a9487ed1", "swapFeeFactorForBalanceWasImproved": "0x8051fea8c9ec4de78eb316a8f6d57c8d0b9d3dac08c8a31160bdb0338a464696", "swapFeeFactorForBalanceWasNotImproved": "0xd4a1049e6ea909adb6b8b5053de089ae6d2daa94063b181bde473d202ffdd8e6", "atomicSwapFeeFactor": "0xe62f0e0365e746421c58914761a9d357d610cb48872ab926c581ce083d18f243", "swapImpactFactorPositive": "0x22637b36db12b76a57e8d2282175608a9516baec885472a076edde09e43cc8c4", "swapImpactFactorNegative": "0x61bc53940189842d15da4f36e1a347872fbeeaf835344cfcdd930d6a2a9f7d69", "swapImpactExponentFactor": "0x89d217876518450d1fd8f2c44713331334b39b926d37e7afe8889a1bbdda8164", + "withdrawalFeeFactorBalanceWasImproved": "0xaad25cdbe2db0becde852057fe9b9a6d498ca5f92f02704af23fbf3e308a6a7c", + "withdrawalFeeFactorBalanceWasNotImproved": "0x49fc99eaf7daa0267e7cea0f6d1c357a08def53d4939abb3724c7ed4e069438f", "virtualMarketId": "0x77f19898cd1a7cd3a2373f07ce7adf59726704da9419de76c0b1a965a6ef2c19", "virtualLongTokenId": "0x024e60601109020acd88458d1d543f3e2345a3f7cd30aede0d5ffd5ef9f84cf4", "virtualShortTokenId": "0x024e60601109020acd88458d1d543f3e2345a3f7cd30aede0d5ffd5ef9f84cf4" @@ -7852,8 +8505,6 @@ "maxShortPoolAmount": "0x02db896e224fea134b65ed9c13c6e8efbbf08befe6bfab67e3d55938f0a90d01", "maxLongPoolUsdForDeposit": "0xcf3333368ed0e029fc2e4e02d8f82df3f94af16e595ca98f21253f09e1e6532a", "maxShortPoolUsdForDeposit": "0xcf3333368ed0e029fc2e4e02d8f82df3f94af16e595ca98f21253f09e1e6532a", - "longPoolAmountAdjustment": "0x9789b14ef610305867428dd962c931e9de4b8ae754a0288ce14f74f731c55a8b", - "shortPoolAmountAdjustment": "0x9789b14ef610305867428dd962c931e9de4b8ae754a0288ce14f74f731c55a8b", "reserveFactorLong": "0x1bcef2dbaf481692ba329fc3dacff57c36c8b84eedd3ae0739b9a7a0abcf3204", "reserveFactorShort": "0x95e41f03674aa8cbf6d91749559df826d410fb6ed0c748bb0af8adbcc588bda5", "openInterestReserveFactorLong": "0x952524dd872db28a942cfe8bc9105898096a748b0833c517b90a6738b9c74c03", @@ -7891,13 +8542,16 @@ "minCollateralFactorForLiquidation": "0x0665b1af9c69fea970edc0f3ec2b5c6e6319e90749f8f70c60460cd7bde7230f", "minCollateralFactorForOpenInterestLong": "0x8854c35c045fa4645e96d74bbd69b2e0bc8404a342aa528d70cdc0c015026ca9", "minCollateralFactorForOpenInterestShort": "0xb0c72eb9d2d10ce537aad4e5cd5d143f5b5c48dd97242bbf412e9389771dcb22", - "positionImpactExponentFactor": "0x64355c2777d71979de9e4cdfbad1d22d2f3c0162f675b37da17c3f912c43d52d", + "positionImpactExponentFactorPositive": "0xef4f7cdeae5fb6920f7dd516d653f2bed2e585cdeb4970ccb0d880745aa22ee5", + "positionImpactExponentFactorNegative": "0x95e5c874f63fae215b03da37705e83b4395d7c46c85e6ac4d82b2bdcf77c04e0", "swapFeeFactorForBalanceWasImproved": "0xa84ba5835f870711f5395ff91353a8b6cad4f3c91c427a56d5320d1a1e73df7d", "swapFeeFactorForBalanceWasNotImproved": "0xd2ef95e30885f11501ff5474333b4ddab4a7c3348404023f250f4b4cc35868c5", "atomicSwapFeeFactor": "0x6bce913f581100dedec439ca6a6eaf80d0df49d846242f6f00b0bff1c2a4d493", "swapImpactFactorPositive": "0xbcf53b75dc064d05b8bbae7a8a9024400149ad81b3ccfb631fdcda0458c165f4", "swapImpactFactorNegative": "0x3dcb45d69a8bf6040e48ce2cbb0331be6eee579fa2332e638f0399c4b36e059b", "swapImpactExponentFactor": "0x9e8158dfdc3ab305b80ec742213b82433923bedad9de6c23ef432f9e4dd99126", + "withdrawalFeeFactorBalanceWasImproved": "0xee936c6dd4d737361b886510e542bc61db738becde073857e5cfcc4e3148980b", + "withdrawalFeeFactorBalanceWasNotImproved": "0x131146a389e95efd364d04deba3051a8e33537c9bdcd51163684ebf61755d614", "virtualMarketId": "0xf72da44ec773ac1dc4cacc096bd5da89a67f7b684430092e1c2360069d5318c2", "virtualLongTokenId": "0xa232c25fc2702b7379fa2865649cdb29aaf502ce1d0bdc6ce0a5bfb86d89f3aa", "virtualShortTokenId": "0xa232c25fc2702b7379fa2865649cdb29aaf502ce1d0bdc6ce0a5bfb86d89f3aa" @@ -7908,8 +8562,6 @@ "maxShortPoolAmount": "0xff7de4db9925bd629829487babdba8eb0ce1a2429f4042d3c8054ac2600b02dd", "maxLongPoolUsdForDeposit": "0x5fb4fb3c94f2fe7bff54d460cfa27d94461b8d54cafbc2cda17b4c1ed343f832", "maxShortPoolUsdForDeposit": "0x5fb4fb3c94f2fe7bff54d460cfa27d94461b8d54cafbc2cda17b4c1ed343f832", - "longPoolAmountAdjustment": "0xddf8f7919810570f7483a3325c90d58f153d58a1a3538173e93f9f08f6421a4e", - "shortPoolAmountAdjustment": "0xddf8f7919810570f7483a3325c90d58f153d58a1a3538173e93f9f08f6421a4e", "reserveFactorLong": "0xe562fc3eea980c57f5ebce4a284674d37bd4c82c0cc8b3136bce6e65526c70ac", "reserveFactorShort": "0x59921611f2f054a6c8f02f29e741dd6920044ad197cab77b5ad7c1e7046bc202", "openInterestReserveFactorLong": "0xf223494ca491eeb8879ede7b08de4a37979b6a1dbec431a7171cf11217534166", @@ -7947,13 +8599,16 @@ "minCollateralFactorForLiquidation": "0xb09c34890fe5881ad70910d4f2f6ea1ad50ef8990deedb4f6bd2a67212024656", "minCollateralFactorForOpenInterestLong": "0x09d4ab823430791729510b7468eaaabcb5e8c00f90ecaa1c0fdcffec4c8aaa0a", "minCollateralFactorForOpenInterestShort": "0x579b51b3578168574b5541908b2b4d2a82f61c2e826c25afabf9d443e128d5ad", - "positionImpactExponentFactor": "0x35d0a868df28094966b90e68e435ce14766666913cd4ac19de3d2f6e17f350d3", + "positionImpactExponentFactorPositive": "0x77730668da5d2ae43f46d5680fe41fd59e642e63a6eacc8e9ce2b1d916a6bac7", + "positionImpactExponentFactorNegative": "0x1a48466f68440a32966ece11f5a6228bb1c435e6394c20dbe87e52345f21c1de", "swapFeeFactorForBalanceWasImproved": "0x33a28ad90937883abb9dbc045d6711064d05be93dc5f2805878a0fc4c3847fca", "swapFeeFactorForBalanceWasNotImproved": "0x671f1f5b7f0621951ea9fe875c9f5d648343b4f77ed6ade840a32b4caf223378", "atomicSwapFeeFactor": "0x1e07a30854257a03f15d64a12ba476fc3f11822584607c73ec8cf159ebc9684b", "swapImpactFactorPositive": "0x780903830a9905f560d95f984e56ca7a535833e0bc89c7c2de42ffcbb432b0c2", "swapImpactFactorNegative": "0xdbe58f613a7e4a83dd8f4f2ba745c6bc2a0c8f5d5558b611dbc0d06a12f8d934", "swapImpactExponentFactor": "0x6056e3873031dae6bf9c4ca9cc825412671792c122c3ea69a648c5cf3ed93be0", + "withdrawalFeeFactorBalanceWasImproved": "0x2228954c9091ebb79b450b9cdabb61e4994abc9962fed8ff65b8e8a4a8cf046b", + "withdrawalFeeFactorBalanceWasNotImproved": "0x72245c60699ebba3ccfebefa7c04c83f3ab3b808357af0a5d0203470aba3db84", "virtualMarketId": "0x86aa973b70629617ddd3d6184ccf9da90412d10b17c1ab38ec6fceea9a7b93e6", "virtualLongTokenId": "0xe7ad78f733831866f62141bd25f6d75da98498ad5783721686716dce5043e520", "virtualShortTokenId": "0xe7ad78f733831866f62141bd25f6d75da98498ad5783721686716dce5043e520" @@ -7964,8 +8619,6 @@ "maxShortPoolAmount": "0xebabb42ace11d5b2cca07d5b2eaf951dea33fd55ab67feefb6b942afb5bce136", "maxLongPoolUsdForDeposit": "0x215a065bdc41b5c2f60be346d66ec17766daeb5590d7e6e3265b3c84441fed67", "maxShortPoolUsdForDeposit": "0x231bfabf34e58600544c372c2c9a633e34522a7a8902749767333dec39dabb2b", - "longPoolAmountAdjustment": "0xd45cc3af266884c908cbf1e9135418fe8e11dd00a9832699fe75e9049da2a840", - "shortPoolAmountAdjustment": "0x836682f04df203c39a87209f85a42f76e2c28ecce9d6cb5d068329a35e300d38", "reserveFactorLong": "0x7ecedbd96dda9fd60e0ce1e8f59604ad8a6d8e3e92433d5990cfb020f5fc9d66", "reserveFactorShort": "0x67f19a6fc1cff925425cd3d9dfc83ced7e5c045d973b5f4e09edcd3909ba520e", "openInterestReserveFactorLong": "0x10f7ec7584c6ad4139bbf3ce1669833ff2d9291662b1e12c05d2659f3ebe0bcf", @@ -8003,13 +8656,16 @@ "minCollateralFactorForLiquidation": "0xdf248c72ad94002750220a12ba36fc086656e26676a6700755ba2e70eb3bd3a7", "minCollateralFactorForOpenInterestLong": "0xdfad34850b6f15e9790e144784adf3e0dbe917690bb3f58260b5e578ff17e8c6", "minCollateralFactorForOpenInterestShort": "0x94ec591967c0c2e8b041b2a28bdefa3b898eaa8cd7752278ac568543a7d600e0", - "positionImpactExponentFactor": "0xc412266eb7c2ad47ed8f8e8466b3f28a9cbbb8c1a1366f702a948ef7de625198", + "positionImpactExponentFactorPositive": "0xcdbe38ebd078046d1c5342dd16ffe4dc7305341c24c8e001b517bf2fccc6281b", + "positionImpactExponentFactorNegative": "0x03f8e033ef2a38beb1f118b5065a3586341b5022b3d3497b8ebc4dc7fd0fee86", "swapFeeFactorForBalanceWasImproved": "0x0e1fd9b3a95146e9c5fa9bf8f76c80ba91f3ddc271c5cb43a2b574fb4150c557", "swapFeeFactorForBalanceWasNotImproved": "0x6b9f269680991ffdd1f95773dab02b0962549ff15150976518a739e333c551dd", "atomicSwapFeeFactor": "0xe6ab96eb56a8cf140d345d6f681e1ad4ee5897159a1f571c4b7d81273301acae", "swapImpactFactorPositive": "0x59346f9a4a1b766c626faf5a262d7c4682290eafde924edaccf4793b5aaf9ff8", "swapImpactFactorNegative": "0x7abecb50f1f40514c8910dfdbe2c77053ce52f786284e6cfbb103935052858bc", "swapImpactExponentFactor": "0x67a8eef04a49c1b96d230f1b3113bb32a730fa1868ae6e307b8fe2f8ff5615bf", + "withdrawalFeeFactorBalanceWasImproved": "0x745dcfc316f5cf9d06534a8f300538a2c575d133bebca1e2387fbae92c355364", + "withdrawalFeeFactorBalanceWasNotImproved": "0x8e6c65a97cb920f6325ad81a3e085bb14aa0891ac9b1e3c7b0e945204c089340", "virtualMarketId": "0x5569764266bbc663a0ac2f620efec79cf39e019cc8081b9313d215717bc06870", "virtualLongTokenId": "0xe7ad78f733831866f62141bd25f6d75da98498ad5783721686716dce5043e520", "virtualShortTokenId": "0xb315f0a55a09b93c77ef9d370a2278b19027c88ccc7afd8b899b98bb033ffed6" @@ -8020,8 +8676,6 @@ "maxShortPoolAmount": "0x2863e6f3d61484e45e8419b22fe805a7d9f8aaa26c8f4ec137fe4773ebabb133", "maxLongPoolUsdForDeposit": "0xa4a6578e66ccd0e5f5fd54086cbf4452ccc8eac1a61c65f939e421aa8c7b6783", "maxShortPoolUsdForDeposit": "0xc8b2e124197c1a6ef15346341e145a30f656c3bde7af244d41d916afb6056b67", - "longPoolAmountAdjustment": "0x5b3323506b8c7955b0c42ea1c545e6548bca963632c5de29773b2395fb69b7e6", - "shortPoolAmountAdjustment": "0x4dde22ea292d7917867de6b5f684eb59117799109420a236ef156c258e0abba4", "reserveFactorLong": "0x02aa3b2e23c093ede45c1cba22473cd95faee115f42cc414ced213a0fa2718f6", "reserveFactorShort": "0xe17407a3f33f25baf58a073b77069e7caf1502b06de1d1117faa252a14e8d507", "openInterestReserveFactorLong": "0x8e3a5e8aa659854dc2949e4b9b7c592e23aa1353dfdacdd62fe7a40b6a93b0d4", @@ -8059,13 +8713,16 @@ "minCollateralFactorForLiquidation": "0x5d282deab53e4da440e31d2f5627a9596a180d66855aa39e8afb0fb887459757", "minCollateralFactorForOpenInterestLong": "0x5adf64aba368af76710a5ace26141cbcc2d482564ff50ff73428a666445593c1", "minCollateralFactorForOpenInterestShort": "0xd44120b8a84afe8d59f0398a652e9af48d30ce0d68ed753e577d4ee474ec59a5", - "positionImpactExponentFactor": "0xea5bbc31f9ad83ef0b26dc676f4badba0dd7967b8c2fdfaf5fcd6e378541d5b9", + "positionImpactExponentFactorPositive": "0x5eeb96b10329ee9b5f702ee0005fdcb5781df568f3f3ea2bf2b0af2da3bc267d", + "positionImpactExponentFactorNegative": "0x7584859e095b9aa9453c3e8f90dbbae0b4f172c66b032d5bdcbe293651c13021", "swapFeeFactorForBalanceWasImproved": "0x3528ea3c107c290c0787944fcffb8dcab5c79eb99749ef137cb4251321c05bea", "swapFeeFactorForBalanceWasNotImproved": "0x7f2d20dd6425fb3deefa3d5e2fb1421b98021539f97c248ec897a051737b71a9", "atomicSwapFeeFactor": "0xb385bfac626209fd528bf5ac05da0bca75944b6079274d8edf7de200d6b709b0", "swapImpactFactorPositive": "0x7994d0769514a0f8458062cc3ec7ac46e35e61a41837ef95de31499b096f6afa", "swapImpactFactorNegative": "0x51498d6010ec706431bb43497559c424d46d5a4732ae654c0f8010ada52e32a6", "swapImpactExponentFactor": "0xd0855b4e2c4b463a9d8ef095e149f5f4160bbcf019518d19088398b85d20b0bb", + "withdrawalFeeFactorBalanceWasImproved": "0x87500c557bf9e21bffb6116ac8c0c8058dba921293a5013ab4ccd39f7c38abb4", + "withdrawalFeeFactorBalanceWasNotImproved": "0xb1b41c59c257301f86cd53f672c74d0b33e22b2f8cd9949a16b9e5e844ad1acd", "virtualMarketId": "0xba31ac4f17f85fe1d4f13f98606a4d6795476499126baf4091154165b41ba171", "virtualLongTokenId": "0xe7ad78f733831866f62141bd25f6d75da98498ad5783721686716dce5043e520", "virtualShortTokenId": "0xb315f0a55a09b93c77ef9d370a2278b19027c88ccc7afd8b899b98bb033ffed6" @@ -8076,8 +8733,6 @@ "maxShortPoolAmount": "0x4003a7a22a73accac8f7962d259bb5771ee8eb59a7112305b153df938bb2fde0", "maxLongPoolUsdForDeposit": "0x75e474aafee5000be82f183609236d05dbec67d943e7cfe146f47fea6d32842c", "maxShortPoolUsdForDeposit": "0x408f7129b2e243d5e659ea97d05c76d4eb0bdc25af291d63942b3725aa4e0e87", - "longPoolAmountAdjustment": "0x7ad29bfa54753d283ca13c5eebb287ffa67770d4ac45ed5de90eb38e5fd24d2c", - "shortPoolAmountAdjustment": "0x2c51e1c48aa7ee0183e9a810e17ad1a745f129c2716a3b4b7b6937069cdf784b", "reserveFactorLong": "0x23dbce0dd7be42904e2a91abaca8e1047216ba71fe638a21223be900e0eaebe8", "reserveFactorShort": "0xc441cd48637a20b188f4fc9ebea48594bed51eb8aef1257d4f6cd46dc5dc3e49", "openInterestReserveFactorLong": "0x83fb822355b440c8b1509f722733397ced67a7273e1276ced0880de3a363c6c9", @@ -8115,13 +8770,16 @@ "minCollateralFactorForLiquidation": "0x013a678abe6ed4cd220abe15c07141f42893af0f2e47ff3b029c01b50819b3fd", "minCollateralFactorForOpenInterestLong": "0x522166a0e6ac5a421bc8346f41d2ffbeace0d26930dbd211138e25646df6b4f0", "minCollateralFactorForOpenInterestShort": "0x7ddb336108bda726fb332947360b0a11f8c33b983801dbbdddd318a9ab55f11d", - "positionImpactExponentFactor": "0xad96faefa227e00036c010d351a3ebbcb3ec721b49800ef99607f862b21c281f", + "positionImpactExponentFactorPositive": "0xe619735206014cc395998358387d92765bdbc11a9daea49a18855e50adc5e1d8", + "positionImpactExponentFactorNegative": "0x6bf90374f0e8836496d138564d4963c8eda3edcfc108636b5ca8b4d32a5473ad", "swapFeeFactorForBalanceWasImproved": "0xf1433913b0de4e70f155241c318905ddf54f866c643995a74fc783abba5b5b0c", "swapFeeFactorForBalanceWasNotImproved": "0x072e62bab56c7ea4e91c5ecf1e66732e65b6a95d193631133a001763b30943c8", "atomicSwapFeeFactor": "0xd44cce6933c88884874d99321734dd2823da1495a6bea0020272a18028cf4b9e", "swapImpactFactorPositive": "0xa9bdf476dc12be080747e58c4aa34606357476853c4dc0e1d805569a12fb9bc0", "swapImpactFactorNegative": "0xe62da899f3cd8b0bb237665e81fa32f29cf80a4952c3756a33a3b8fe15c27023", "swapImpactExponentFactor": "0x049d9cff2da901aca1737a4881a54b31c685dc4235e9967f04a5dc4e7864a27f", + "withdrawalFeeFactorBalanceWasImproved": "0x4b86165d2634aa830be08d0d7166a645c0cfd5d8b71c8d75d902b5f844813f35", + "withdrawalFeeFactorBalanceWasNotImproved": "0x6bc4abf5477f14cad2bf073ae76971e0dda40412df297a7a3470f34799e62046", "virtualMarketId": "0x01ac8acc7ef4e6616b090638328c05814c2ce047f4f286659cca62cef1b6ea7d", "virtualLongTokenId": "0xe7ad78f733831866f62141bd25f6d75da98498ad5783721686716dce5043e520", "virtualShortTokenId": "0xb315f0a55a09b93c77ef9d370a2278b19027c88ccc7afd8b899b98bb033ffed6" @@ -8132,8 +8790,6 @@ "maxShortPoolAmount": "0xc26afbf2f4e8d85b0a9a999cbeb4f284c87b39b0e954232ae34c3491dcc61afd", "maxLongPoolUsdForDeposit": "0x9ff0a95b59709ce6d515976eca41fff1292a84e433116a84b3494c48b11496c6", "maxShortPoolUsdForDeposit": "0x704a285a990b509401113105670a4c435ab1fa240401686df9d67ae6b7db7eb4", - "longPoolAmountAdjustment": "0x49879369b77157be34710fef2eaa0ede22035c918aef0ad65deacf6528a1d520", - "shortPoolAmountAdjustment": "0x3bd91678b05f5d0c2964ac7271e30d3f84ddbfe51edddb5f4e6dde31f0fe7272", "reserveFactorLong": "0xe6c9e7c85bd0e3e736658f3345b37b78d1928f90476c6aa62f8f2720981d35e0", "reserveFactorShort": "0x7d03f9a854a7863b0f453494c09e00dfe49d4a3f1f95e1a1032290ab4beffd6c", "openInterestReserveFactorLong": "0xcdb1fbc15fb31317c67d7e5daf45b9ceacf7ddb98b14c4299e3e8662d2bd287b", @@ -8171,16 +8827,133 @@ "minCollateralFactorForLiquidation": "0x83daa2393cc33b7dc64c5de46d0cedd412df54fa451b2fa796d3a3afffbb343a", "minCollateralFactorForOpenInterestLong": "0xe14af2de5341f4d7ada010da66eab444c786f294634afe829fd59115fde1864d", "minCollateralFactorForOpenInterestShort": "0x0ab2e46e7d989cc72c4f04653c04ebef18615b5205bd1210df620a0323bea279", - "positionImpactExponentFactor": "0xcc448f832f38a53c72b3a20aad711d94f1319608da95e6345e955b5d1b022483", + "positionImpactExponentFactorPositive": "0xd6ef2f4b4b6fffdb0f57948711e243ba1374fc430a8f3b0b90fc41cc8583dacd", + "positionImpactExponentFactorNegative": "0x1ba699e0bb9d5c61a6748e60eb2498ddfcbe70b42d277ed5bf95480a8903c991", "swapFeeFactorForBalanceWasImproved": "0x4c14a9f8f2f155359a7b7f2d521ab42355ef06734ae9cecc66913d8a914f3c7e", "swapFeeFactorForBalanceWasNotImproved": "0x7a69ad6d42cefe157b1592436c7133cf9b656fff0c34ed1397148257e979cd95", "atomicSwapFeeFactor": "0x271e4c35276904d2fd9051c2f2b9870deccf2afb45a614adf9a73e296ee62664", "swapImpactFactorPositive": "0x9dcf486ab9270640d6a7f168059824daa74d09bb72a40b7c0edab9d7fe20b5ca", "swapImpactFactorNegative": "0xe678e975c804127c9fa120ea3f8b70364d73a50e51e0cacfa25c99986c15c3cd", "swapImpactExponentFactor": "0xba375b0cf4c9ea71ac0d50044be9059bdb533ca6211951fb1aa89cb114acdf8b", + "withdrawalFeeFactorBalanceWasImproved": "0x9d19ef9aa8f90b4f9afab836c4e8177afa9e8e54d771065cd16e4769d1e4d6f1", + "withdrawalFeeFactorBalanceWasNotImproved": "0x9a15b9aeca375b34541e8f473238adad08363483645e3a1d0098a386f2d77d90", "virtualMarketId": "0x362fa87fde70f1c219b43817f05453f32571be142fa68e587a14975907a9690e", "virtualLongTokenId": "0xe7ad78f733831866f62141bd25f6d75da98498ad5783721686716dce5043e520", "virtualShortTokenId": "0xb315f0a55a09b93c77ef9d370a2278b19027c88ccc7afd8b899b98bb033ffed6" + }, + "0x1635eF7FBdce68eC80A3672aB710A5a99044f5c9": { + "isDisabled": "0xb986298bbc0ac7828d2f668520704002ba9bbbe44af7426d3fafbdec1500c7b0", + "maxLongPoolAmount": "0xa554dd93bf8719dbf7558c646e2e262c61d7d7739d8ffb05daebefb5e450aacc", + "maxShortPoolAmount": "0xa554dd93bf8719dbf7558c646e2e262c61d7d7739d8ffb05daebefb5e450aacc", + "maxLongPoolUsdForDeposit": "0x3f18233f3cc22f52f17c5a8ead48e0725805214a4e86156bf95ffe869621e337", + "maxShortPoolUsdForDeposit": "0x3f18233f3cc22f52f17c5a8ead48e0725805214a4e86156bf95ffe869621e337", + "reserveFactorLong": "0xb16ce4c45ca2998b7a90367a1b8ae37fb5a4050e3d27244f8136a1e711df9603", + "reserveFactorShort": "0xb8486554c4a358f81055e1c1961e11ef6c4c03020abea786506a7dcbdda2afbc", + "openInterestReserveFactorLong": "0x01dbd11a9e40c4657d68b244e9d68dd8ee4dbc2c1bd121ca511cf1856c98cb05", + "openInterestReserveFactorShort": "0xb77d5141684bcf27cebd21323fd7e6f958e5560c71e4bf494d292ba07bfcd85a", + "maxOpenInterestLong": "0x978ca99c6cf7300456707c1c5abcc73a6e0fc3a9c45eaa4fa6ea9fee8f05378e", + "maxOpenInterestShort": "0x88e99a07411aca2b7b3077515df43d13294113b6c8e01189d536061dbd3b7e1a", + "minPositionImpactPoolAmount": "0x16016d83ef9a8554aec6f544c0176140855262b5ff73ad9425958e7a6810ed85", + "positionImpactPoolDistributionRate": "0x83565123858dfeefd4d3175407c7a9be58b62555e8ba1f43590b36183eb12c11", + "borrowingFactorLong": "0x0f79a28644938a21620ba59e047ab05e2a35d0af95fd1a2ae8354ba29dd3a184", + "borrowingFactorShort": "0x4f785202fb4662bd48a0adea1e20f8502b223282e4e0597c0ea051d180463e32", + "borrowingExponentFactorLong": "0x94ecb45383b94746c22f01828aec46927f1fd5090030c6f8980a6a008195eecb", + "borrowingExponentFactorShort": "0x747a5a7e42fc7062319c630682fd26f8c8a5edcf849440ca08711a5bc274bbf8", + "fundingFactor": "0xdbbaa017078e8ca3ec70030ce434c22edd02d8a181466e971df35c801226532e", + "fundingExponentFactor": "0xa1675f3d988cc02259b1e482b82506a11e241fc55332d0adf908733162dc81af", + "fundingIncreaseFactorPerSecond": "0xae73b9094c9f5972fed8f2812c2f1e0a20e2b2029de4bc385fc2a81c0a824c21", + "fundingDecreaseFactorPerSecond": "0x25530f522566e64c89503ed2fbd2f7ed40c9bcc6b783ec3743babf89e44771a1", + "thresholdForStableFunding": "0xd249024f61792345a4182748fc57059c500aa708b1c2beb8b58d9fb098af3c0b", + "thresholdForDecreaseFunding": "0x1079911d11eed06329694ec78539c9cc3c9756e7272e101789d469092bb52a9e", + "minFundingFactorPerSecond": "0xc798c8b68e81fdbac1c3613d9df359ef519bdf59dff1f477fef339af2aaaccd6", + "maxFundingFactorPerSecond": "0x8108501a8b79547495cd5f6a88a835738535f9d6d558df90fca9465c277e3863", + "maxPnlFactorForTradersLong": "0x927579f75d274b8833ecbac6766a5395afdcb4b539bd125d5159976e9324e200", + "maxPnlFactorForTradersShort": "0x4b62418ab9168c6ba99a4dceca4299d45f592323c8cc57898e53569b9e32a956", + "positionFeeFactorForBalanceWasImproved": "0x67f1a4e7be353ef0fded094b266460e58694a432403c9e26fbdcde0b2f6c3ef6", + "positionFeeFactorForBalanceWasNotImproved": "0xd70c284039f94cf218c7f6e5853a436cc8b0ccc3c18fa97c322272cd4cd941c2", + "positionImpactFactorPositive": "0x52cc9378975f03e099e187aeb37511eb7d6a3e34d820abffaab870a6c8adf4a0", + "positionImpactFactorNegative": "0x0c01e763feddd94530c5480a227cd44b38aeb1919ad558d13d40c1bf8bfff48c", + "maxPositionImpactFactorPositive": "0x566286c9a9d7884f435cf3776d6bbd0fc19e9434cc27cd48953dadfc234cb110", + "maxPositionImpactFactorNegative": "0x814f0e61c74578d71ed355e7882116cd71e8bed32093aac6250a4a84f8b8852e", + "maxPositionImpactFactorForLiquidations": "0xff1c1e5384b75e4ec6fa8ab80f50b54e4bd9a3a768fa8201762b79e7a46ea945", + "maxLendableImpactFactor": "0x756609c421c3e9e8995a42841f23b22f6ccede0a66b8bc1b9cff8e311782105a", + "maxLendableImpactFactorForWithdrawals": "0x2f3d33a4d7dba299bc093d44e40e81c3357abd20c78c5036056af670eb53709a", + "maxLendableImpactUsd": "0x751e12141c7886ca3ce9eb59ddbc836ef978d4879b19450a6cdbd1e19043bc79", + "lentPositionImpactPoolAmount": "0x071529404d3c580406c08c73df01923846e4ec051ab35bdfc45ab83aec26dc3c", + "minCollateralFactor": "0x0f1deded5902190ccf36d0358f3bf409f376c47094acea7b899151fd2b85856e", + "minCollateralFactorForLiquidation": "0xa2e6362356dd02b4b661664c7654e0925ce1743747da2f6a2475ab65f70df09a", + "minCollateralFactorForOpenInterestLong": "0xdba59293b6dffe4daaa2717dd70ba27b57349cdf00796c787228938cb2d5be91", + "minCollateralFactorForOpenInterestShort": "0x896cfeaf52305a4a26680b3a95df596c2ce4dbadab592b15105b085bcda26245", + "positionImpactExponentFactorPositive": "0xe14cb69acc0f4884a64d2557009fcca2cb4f41ada93936d5f11be6af99a05b65", + "positionImpactExponentFactorNegative": "0xa5e30326c2af46083d9fe10990f3d8d756fcd87b1f712d216e8c469c76a5e581", + "swapFeeFactorForBalanceWasImproved": "0x227f7b57afc3b8bbb60a01937a24ece052a43d2b9554d01eae9e4b992510117d", + "swapFeeFactorForBalanceWasNotImproved": "0xaaf77bc1553939458a33cd0b82b98325629796bc178cc42a54dcac42753a924e", + "atomicSwapFeeFactor": "0x5cc0448b4cc8b0d4fb3d77b396e61cddf03157fc94aeaeca0cbc3602266e6ec1", + "swapImpactFactorPositive": "0x9c1b020ce78e93a9b0c595667027b453a8de69fa311ffc7a4e42f75caf55c8ea", + "swapImpactFactorNegative": "0xd30f51b7f0c0ef6464530e5d16b24fec4dcf0645e1bd6de8b50c92bf02307a7d", + "swapImpactExponentFactor": "0xbc5d99a0a177ad95b369117aa9efb6c02210c721e9c48cf11ecedf8904b3355a", + "withdrawalFeeFactorBalanceWasImproved": "0x1652a6cde96a8a0296316ecf1a5669394654b9072430a81f6014717e21c0f6c8", + "withdrawalFeeFactorBalanceWasNotImproved": "0x23963fcd178299ec27ccd979bf3d6a31165bc8b5786faf51f36ac4eded973a49", + "virtualMarketId": "0xa5ff318ac7d7916a8cef24b9182937156f5ef2956a416645bc2c5b8c593423f2", + "virtualLongTokenId": "0xeb2bce5d76ecf25989519aa4e56b1ccdddb8a464d4bd7d5437c94b899724feaa", + "virtualShortTokenId": "0xeb2bce5d76ecf25989519aa4e56b1ccdddb8a464d4bd7d5437c94b899724feaa" + }, + "0x92d3DA41E166A12e3Ede9e2Dd9A272C5c6FC55E1": { + "isDisabled": "0x546d048386af287ce0aa998603a0812eb00d28a4eff7fa0988577d5e72bee8bf", + "maxLongPoolAmount": "0x94321eb04da5dd9c928e4ed3446958546ef31952948238b4413efc5c03ed3c5c", + "maxShortPoolAmount": "0x98755ce5c067b64cb952eea99607973bb0c4461a526e68af9e7f7be14eecdb16", + "maxLongPoolUsdForDeposit": "0x224da974b7ecc659b5081fd0e0ae5521e28f51dababd0e2172659b436e1756df", + "maxShortPoolUsdForDeposit": "0x470b774117b5854cf8dd8a3eeda2c0e45ffbd8d241c8886c65c47a6ce9525348", + "reserveFactorLong": "0xf0f5f0dafa2203b3fd68c6f98131cbb98009e67f8578ada073dcf0ab8e8ebd07", + "reserveFactorShort": "0x98e36920fbf9ab9914902391e0d8b4890cda2c7d0021a9955d4f6fb78ec51784", + "openInterestReserveFactorLong": "0xed9b21fa487e48d16b6fca563c2833a43d2c16480b722383287ad1a90c338c42", + "openInterestReserveFactorShort": "0x0372deb6bb29bc57c155650f6432389af63597c34624fbf68ac35f2ae4768491", + "maxOpenInterestLong": "0x411613054db421d047ea24f12403a0eabad9933b255155fed0d1bf82ab9839b1", + "maxOpenInterestShort": "0xac75dbcd0bfa10d594697bb07694d5ba1af3cced095f96e65062fb448e09cdc8", + "minPositionImpactPoolAmount": "0x8ba22bcf66f4d062e96f75e17785305fd9506e7ecf50d2eb4e779742ae55d52a", + "positionImpactPoolDistributionRate": "0x4c28f3f2202cb4bbcda1703c49d2b3e79be68918c4f00e43ef92247a957241b7", + "borrowingFactorLong": "0x0e82dbcac3eab3821762b3db1dd64bd2d939250b2eb05662ab898002656e6889", + "borrowingFactorShort": "0xac1dd3d9d1acf1a72241b8e0aa6414deefc169414cc8c0ca5bd90af93d1cd94b", + "borrowingExponentFactorLong": "0xf524c1c3f204e1cb1fb0c69111c9e68a3e7fd5bb41b27e6cf4bcb20686365b01", + "borrowingExponentFactorShort": "0x2a159ded1e447bcac2546d6c9671a2d991d527e1958fd847289bb860113e4fa3", + "fundingFactor": "0x43224dfbf322463fdde0342358861b8a0d62ab860c0c9aafdac16197dc7a627f", + "fundingExponentFactor": "0xebc8d4c54ce3a5dc087c0bd7b79074678f2418d31fb6d857c5cb3f28fcdc86a0", + "fundingIncreaseFactorPerSecond": "0x1e5684e5a0bb36c42dfcb48117dd28043a730cf569c8737a3711273c1bead9da", + "fundingDecreaseFactorPerSecond": "0x035c5a1cda400ea1139b6f40fcced21c1ff31f970ef4ea1da67a63149d1f517b", + "thresholdForStableFunding": "0x93a79aebcb016a1e36abbf81ce32aca343f4b73d76ea72dc2b8349afcc9ea7cd", + "thresholdForDecreaseFunding": "0xe4c9e8b85314addf696aa0c927605393538577392d8c70280298a1f600fbd32b", + "minFundingFactorPerSecond": "0x1a1a08a96966031216ca29ec7a9e4f51bbd3afc023324fbfd88e0a1605b11f92", + "maxFundingFactorPerSecond": "0xedb2765f11b2dc20bc1cf0cd134d28f80f4cf4ca8a141a24d1e0efe01a853c48", + "maxPnlFactorForTradersLong": "0x0dd637347e056a056a344dcd71f67fac022a626e16b7ab947b7e849ed8883eea", + "maxPnlFactorForTradersShort": "0xcc51d5e0982ac9fe787f644e346aaef8d2b2f3c03eb0d009b81405c6159900f6", + "positionFeeFactorForBalanceWasImproved": "0xf90a3c0bf31e561d5bdf96697d05f83a09610716902874bcf1dff2028b89e33a", + "positionFeeFactorForBalanceWasNotImproved": "0xe7b158f935220a38a1d1d7e6e1e2e277dd1c1f6bb3fe061d53ca64c29470b1fe", + "positionImpactFactorPositive": "0x99758cba0bb91e57584868906382fc39f44467a0bf04a6a7ad121b5636e2d1a1", + "positionImpactFactorNegative": "0x978931efa98621694c24e3e3579d90e8bb6e410b99dbe3047642c139c5ae386f", + "maxPositionImpactFactorPositive": "0xdddbf047694b1aef22dbb2d682db5adf664fb02d9ecb6c6c7d1acf13c58293ac", + "maxPositionImpactFactorNegative": "0x9047ff45487f934161e4c2e50895452b3a817e947dbe04a7a8a814029750b7ae", + "maxPositionImpactFactorForLiquidations": "0x9de564dba57623ddb7b864462fe71687a45c065f76655783db0d55f5e555bed8", + "maxLendableImpactFactor": "0x04523637615108d91a714d3e58ecb1d252a28e19253194a1bc15075dda59027e", + "maxLendableImpactFactorForWithdrawals": "0xae984fc0e04edb8972f52399608eb6ecfea3e41695aff91d2690267005b9e74b", + "maxLendableImpactUsd": "0x473a5957cd439521fafd4035db8ad11f734af0642ff3cab4f566af4c2ff8d1f0", + "lentPositionImpactPoolAmount": "0xfae0ef18087a22542b015c8299cdfd5cb8c2749dfe15037902db771e32783a0c", + "minCollateralFactor": "0x78c9d5c3743c433215fd48eb37ec521eeb69fe5c7227977b8f35f5dc45cc72a2", + "minCollateralFactorForLiquidation": "0x36a49a8fbbdd24961ab84085ddf5c7e340876324c393a070a1032abe0fb156c8", + "minCollateralFactorForOpenInterestLong": "0x97ba643c3a909a01c4027a940933d5046b18eacb9b2fbd97895d7bd79abf1ff1", + "minCollateralFactorForOpenInterestShort": "0x0456f968e2dfd01399ffaa34d3e8dfc69a8fd0110ddd5911a0fb6babe22d2141", + "positionImpactExponentFactorPositive": "0xd11bc8257497c6e29078d9408cbf6aa3ad5e2c089fb193605ec07ee227c36f99", + "positionImpactExponentFactorNegative": "0x4312455339042d14725a9b9aeb78cc1723a4bef31c84c507d3fa083d0619207f", + "swapFeeFactorForBalanceWasImproved": "0x2946563cab5b8029b009fd96eebd3c347b6751f9c04a5d2d3d9f3d3570b25bcd", + "swapFeeFactorForBalanceWasNotImproved": "0xf6000c3ddf943f04800db81267e0b56d4a851af6303ff2eb8b66abd230abad41", + "atomicSwapFeeFactor": "0x5c9476a3481e76006cc8e669ae9a97347354cb7edee24b2d2e57fea7312a7c7f", + "swapImpactFactorPositive": "0x4820b6f7e4b57a6064a7cfe52570a8ecf46f7575ba0d8129cdf5cbd423de6437", + "swapImpactFactorNegative": "0xd5b56ebc36158018e669139a1213667597a90130a54c68a49f2b662078d6406d", + "swapImpactExponentFactor": "0xc4a5f14f9c5e5beb3f0dbb61fa2ddac7b02f4b0a295234869a4182d404a78589", + "withdrawalFeeFactorBalanceWasImproved": "0xe8d313ed626ac939461583b81c89703e10efbf3d9d2d80410942c8a4570c70fb", + "withdrawalFeeFactorBalanceWasNotImproved": "0xba8875dbcaea595acfcc43c0531ec55730a81fd4799efd255f8ba5a45e781dbd", + "virtualMarketId": "0xbc056bd3d40a98dbf246214234a4ec8d9b82dc7247c7b0095b29264205eb2c17", + "virtualLongTokenId": "0xeb2bce5d76ecf25989519aa4e56b1ccdddb8a464d4bd7d5437c94b899724feaa", + "virtualShortTokenId": "0xec72fbd52db927c6d1c8a079da3496965cd1f007a9cb861600facc7dea1a2f02" } }, "421614": { @@ -8190,8 +8963,6 @@ "maxShortPoolAmount": "0x73e597a69c0dec119e8916093d87e7b56b82ac29ab3667e27826914aaac30e05", "maxLongPoolUsdForDeposit": "0x23edccb6911ee20b6d0c59789f3d5d26ff32d25ab07cf85caef8771a97967e11", "maxShortPoolUsdForDeposit": "0xbf814f0e5300854973f384039fd287bd514ffa3b9ad15b34dbb4055bbb723d44", - "longPoolAmountAdjustment": "0x6e636a8f0e2c668d0c375828110389a372d135cf5506a1da74711575022ccacf", - "shortPoolAmountAdjustment": "0x73661373813516e3c79a1efa7ce587a977bcaef5431403dcfa8cf8bac85ce6a2", "reserveFactorLong": "0xc03afcc033db8b33bd7107271906b4e39162e08e1d23d18b2aa6279c6b221e1a", "reserveFactorShort": "0x1e584881c18b1459848bd91c6d6a36e54ef1a5a3c7226108bef84ed92d677643", "openInterestReserveFactorLong": "0x158bba94013f63393566db1ea024c4720b90490c3a5740d4cbc504fac98e7bbf", @@ -8229,13 +9000,16 @@ "minCollateralFactorForLiquidation": "0x5f1772e6791b6c0a69b330be106779748f3a9f8d283357a42308bcd741f65989", "minCollateralFactorForOpenInterestLong": "0xce4c8aa0201126eed98457458fc4d149dcf4493dd67f019fba0201d31699ef29", "minCollateralFactorForOpenInterestShort": "0xec53e2b4c748d71f93a22d19be42e483fb467de3da64e08345bfe07b46cf458d", - "positionImpactExponentFactor": "0x86e444a2a7d73b6e45ce3d479c088bcff698e43838ad15450330c9c9eabd8529", + "positionImpactExponentFactorPositive": "0x41d1c7c271e243e25e0159eaa5c9c6370254fa1c9b63c49ab68a3799e6c2ce37", + "positionImpactExponentFactorNegative": "0x25b7a69f30bf94dcda25283b1df4663f2f168940b551d55bdc54826895ad05ac", "swapFeeFactorForBalanceWasImproved": "0x582396506dac5a19c1f0d1830190c86cb1806ffa2f7fe28ecc2fe43355a322db", "swapFeeFactorForBalanceWasNotImproved": "0xf591bff2380073f41efc2642b062009ea4f5a8cdcefbaed5d8fe46b94b228acb", "atomicSwapFeeFactor": "0xa3e865258a0c6c558a839986f79a58c226474df4d8361461925154417547351d", "swapImpactFactorPositive": "0x4ba7599baa40e9165e69982d1a27dcce324f52f09654b8e59a50aad15bff499d", "swapImpactFactorNegative": "0x7f4945cb90820690df92a26203f54d6dec3444276801e77b49ad6ebcd60792ed", "swapImpactExponentFactor": "0x2cf00a0393c53a8d1adf7cb3a553d29a0d8e951cdb793e24e891264f37a252da", + "withdrawalFeeFactorBalanceWasImproved": "0xb511353042361a017b76258c22c4c81bc75d99b0a43c9701f570e7806b7bdee1", + "withdrawalFeeFactorBalanceWasNotImproved": "0x0ef6a62b4596499fe14ede8394108fd60101e63ebd6c85a5270739a4b060529f", "virtualMarketId": "0x1c5f558f016365f8662333fd181132c33c50ee0bf4947fa83fa9e776133da025", "virtualLongTokenId": "0xbeb8096910fd4d4b3ade12aad31c27a0e5f047fce87d1279b0c71579a8c4ef5b", "virtualShortTokenId": "0x14f396b003aeaa96ad78845dcb7d6d9789c777a23d4ea1e14a7dc58704a595b3" @@ -8246,8 +9020,6 @@ "maxShortPoolAmount": "0x4f0f32930b9a140ba510ffe0ce2d85cd60848909bfd7efe19b1aafefabc6838d", "maxLongPoolUsdForDeposit": "0xf1d19ed404ec9744adb4ecaa5940d32a5d44635ac1089b2aefb9aa7f95453c6c", "maxShortPoolUsdForDeposit": "0x440eab273a4684158d163843799a346464e5ef680ff01e5b43b04bf399a97f53", - "longPoolAmountAdjustment": "0x053bfc751b03d34819fd9d82af904b2b15ed4cc1bd2e82f6c3e822c26adc8b1f", - "shortPoolAmountAdjustment": "0xe85e5d6ddf933f1b269729cb69eb92b0f5485426b304ed17f434f00c6156d2ca", "reserveFactorLong": "0xf865e3c8dfebcb3953792a6f4a52185334b12bfe1208957f13a13476c6c3c549", "reserveFactorShort": "0x3a491ad6e5b0c5bf1147255d18a85301f651c2fc798765cf7eb593631637a867", "openInterestReserveFactorLong": "0x757d9ede69fb1f95303e4885b813c08dc5ee4a0bd34f724dcbd4f09d3c06be38", @@ -8285,13 +9057,16 @@ "minCollateralFactorForLiquidation": "0x7992b22e42f8e8f71ab230265b54505134806d370ae23ea1846b52cadd750028", "minCollateralFactorForOpenInterestLong": "0x06dae7e677152cf439b23a94671cfe2f632bae0a0eb85f52610742b73280818d", "minCollateralFactorForOpenInterestShort": "0xd2576f0cd21f4f8b4aad0b77571a8f5288935a3a461fd9531f47b73aa3bff01e", - "positionImpactExponentFactor": "0xf44a08bc5690d4fd32f6b9bfe2deabee95b4ab4d36c368b22e428736451d5786", + "positionImpactExponentFactorPositive": "0x529ca1cde39705d25594ea1822f18bf408ad6e6020eec16580bd2e3ff5ed1913", + "positionImpactExponentFactorNegative": "0xd8861ff3ea3e82000f9d3fce97fbba98c7379731015f7f21303aa60ed3053ea8", "swapFeeFactorForBalanceWasImproved": "0x334cc9b895850a332fe44e9e2215e5112afe286f0299655afae72b50c7eba86c", "swapFeeFactorForBalanceWasNotImproved": "0x6fb4f892d73acfa2c61cd7ff401e7cfb10eaa3de07ef7c585307b232ca95a17e", "atomicSwapFeeFactor": "0xb41252535f4ea1933db20a160f99b2b369e7a3e96ed58e8fc69fd023555b859e", "swapImpactFactorPositive": "0x8c6991810b91663028e92da492838890535b045f4f6315753142a6587d3ea2aa", "swapImpactFactorNegative": "0xd61daf7708276f38ea49e14d3a708747b70aae2748be4082f230782a1bc144cb", "swapImpactExponentFactor": "0x73e3ff3cce5475da6d435335f98d7ebe12eb4516f82fd00d562baadf4ebda69c", + "withdrawalFeeFactorBalanceWasImproved": "0x2e01614b297e7cfdc65f8c0ab2a43144e38f7e81b619a84fe84966dc65ee2b72", + "withdrawalFeeFactorBalanceWasNotImproved": "0x37419bba44c691ccc2421e81b2b31b4301871d045e963851d796557c788f255c", "virtualMarketId": "0xff3e25d5b26afce16c7292fd6816d955cd0a6a9742ad9ebbf9ead33b13cba441", "virtualLongTokenId": "0xa05108a58d25332e075fca49149dbb671f4b30a226a3325bb46f83000c50ff11", "virtualShortTokenId": "0x14f396b003aeaa96ad78845dcb7d6d9789c777a23d4ea1e14a7dc58704a595b3" @@ -8302,8 +9077,6 @@ "maxShortPoolAmount": "0x7bae869049b373441b706e5d0b2a33a9b2d4e0184979a351eca28b60619b4f91", "maxLongPoolUsdForDeposit": "0xc305af46daf38d80f9127a6def8abaf570059221067bf503a8809584120a2efe", "maxShortPoolUsdForDeposit": "0x7b2ab53e2abd85166f2b560c2be6a436f3729b08287ffb5c56c2a5f2ba94ce73", - "longPoolAmountAdjustment": "0xf418c257ae268296149111ce163e06e66945126255cd037f59cd5d6dddb6e089", - "shortPoolAmountAdjustment": "0x20bc0492e7b97586507d1a3108a78b318f93f77030adbc5c6f1d216b0eb222d2", "reserveFactorLong": "0x3d83ecea80d42860f999b5e3501e112306785a87eeb79980e53c5215e9001d5a", "reserveFactorShort": "0x1e3cf27d5f83c080630f18638b39fa7c678deb87255a369cff61ea2d36cdda9a", "openInterestReserveFactorLong": "0x791344e59f964cd52f723720d8adf00734c78d1c800b9fde2cd914aef015fccc", @@ -8341,13 +9114,16 @@ "minCollateralFactorForLiquidation": "0x9a87fa7bb6705fede532152e983195af8bf8b86ed9b80c87ea22dea75b961c3b", "minCollateralFactorForOpenInterestLong": "0x6ed33823024e228a1e472abbb2b3101ade60d23a6a6039ce31db1558d0954430", "minCollateralFactorForOpenInterestShort": "0xfdc98985190bf92f5a5f4972db27fb5b49fc365e3ec3c65a608cce7ff01a0528", - "positionImpactExponentFactor": "0xf540790997b084333a82f882ae86123e74b7d3ca7f5100a87caf8c87b00cd336", + "positionImpactExponentFactorPositive": "0x42f3dc81ce0b75531752b410763a94922246acaf123a516719c5876c23adaca1", + "positionImpactExponentFactorNegative": "0x10056a4b31ba61a1289103741c56f95ce526431be183465ab8df301211a4fe5a", "swapFeeFactorForBalanceWasImproved": "0x6acb142cb77be26541af1bf784495cd07034fe9371c95a45888cac47bfa4dec9", "swapFeeFactorForBalanceWasNotImproved": "0x7993bf7ee942df132ca439a415dc24b3a0d37f9d966e7fed424621f22e08aff0", "atomicSwapFeeFactor": "0xc46dff7dcd179b6c69db86df5ffc8eaf8ae18c2a8aa86f51a930178d6a1f63b9", "swapImpactFactorPositive": "0xc837e4fd08a4075186e2247915ec7e2af6fcbe68d971d312379a2ede79efc8bb", "swapImpactFactorNegative": "0x5784a907a885c68e0ded4e2c68ae06e3ab0072a0718afcaf89a77d08b1a4bf80", "swapImpactExponentFactor": "0xaa5fed51d9e41d58b45b18df3f2d05b427613e1b04f4875164ae6612d4dedd71", + "withdrawalFeeFactorBalanceWasImproved": "0xc401f1f234f8055e06b83ef65fcddeae316d006a077709de3bb7c7b4c6a96d9c", + "withdrawalFeeFactorBalanceWasNotImproved": "0x22222b01f8c8c7b8c4adcd1e2070bafa5c6f0d605cb9b9ecad65c212d22d74b6", "virtualMarketId": "0xa3ef6bfad330ae40521f70558f2fcadca93725b8acccd3105366e422b829692a", "virtualLongTokenId": "0xbeb8096910fd4d4b3ade12aad31c27a0e5f047fce87d1279b0c71579a8c4ef5b", "virtualShortTokenId": "0xc4ab6a4bf31c6daf14b4280e1dca54edfcb90a85aff3598cfb550dbec25f7786" @@ -8358,8 +9134,6 @@ "maxShortPoolAmount": "0x47bfc249d865ba3e7fa37ddb8c08894ef35219d700e48f5e50dda68c648415f2", "maxLongPoolUsdForDeposit": "0xf88824613fd584bedde59cdd654ee7ddfcfbd6fca9fc0301262bc7fe5b02f212", "maxShortPoolUsdForDeposit": "0x077b2bb0dc1a1b11668dd4fd319ea2f662a90d349bcb5c47dd98ba0b3b784e92", - "longPoolAmountAdjustment": "0xecbb2f82fe5330278cf6047f74ed37a560d524d55f17c7b01916dd7420049f00", - "shortPoolAmountAdjustment": "0x2cf60c9035291dae87a44b7598e8d283e74ca470aed7cefeabefbb8049445e71", "reserveFactorLong": "0x843f706dc60d4a87c883780887a33f606ded5c8fce7058881a2cc704e7e8effb", "reserveFactorShort": "0x263cfefa4032f24002e72993f01a3fb1b7592736a134b4b5d327e1d21851f76c", "openInterestReserveFactorLong": "0x8fe56ff8982100fae8af035ecb1a498280a226ae31c54ae592bc4384b419cc7e", @@ -8397,13 +9171,16 @@ "minCollateralFactorForLiquidation": "0x4dc8fa882d20557c438d4b989132dffcdec3a2eaba1089cef51b90436232479e", "minCollateralFactorForOpenInterestLong": "0x638947e41e3db0abc6f46332e4c0312c0f771ed78912b88148a27aa777c9b3f6", "minCollateralFactorForOpenInterestShort": "0x7c8769a5a124b433fded94e525223a96e7bbd8896e3f732a186cb3cb7b2aba0f", - "positionImpactExponentFactor": "0x931cfbe7dea65d7aff1a7a9d5ad2deb94a8425d54956ba10da61b16c6afb9b2e", + "positionImpactExponentFactorPositive": "0x4252c1f861d557e463f16dbcc9ab5a2665f0cf7db68c4befc44e95bd80c837b5", + "positionImpactExponentFactorNegative": "0xb7e5ef4cdcb5769c1f90b5aa04ae6c9988a73c8fe0edb5420308e7ffb679c0e5", "swapFeeFactorForBalanceWasImproved": "0xde99941e4f2591ef17e7e67bc6cfd36f554cb1ce2d7ca5c1e72da99597eba076", "swapFeeFactorForBalanceWasNotImproved": "0xc84b8858b02972a3e3317df608a8c071096fee1a877c70587e6e03f136be8b3f", "atomicSwapFeeFactor": "0xa79caaa8f613f973bfa9f2169a68ef604f5609c375fb2a8f1fb26bdfd0c1c634", "swapImpactFactorPositive": "0x074a3442b4dae7be586549047b6a5a6a20ca259ca5a3d41ec54a5a8863efd116", "swapImpactFactorNegative": "0xbf15c04624ef8978f119e3622f8ecee78ac7dda7045062f7e52fe444da1b70f2", "swapImpactExponentFactor": "0x4cafea763650e7b8f0c8520a3bb775cf805cc589bf41624dfa2832d90f9941e1", + "withdrawalFeeFactorBalanceWasImproved": "0x8b770609c48e993f62b7e1fec9672d5db3f5fbd22ea39e6b61bea1ab1a413cab", + "withdrawalFeeFactorBalanceWasNotImproved": "0x0dd0124e91a8d46d0217218f789bbd0fc76fcd8f2da15d886ec692e6d68705ac", "virtualMarketId": "0xcffa9b917dfc97b3f9003d4b7b97c67f28bf90b1ede4e09739a87cb2a196f95a", "virtualLongTokenId": "0xa05108a58d25332e075fca49149dbb671f4b30a226a3325bb46f83000c50ff11", "virtualShortTokenId": "0xc4ab6a4bf31c6daf14b4280e1dca54edfcb90a85aff3598cfb550dbec25f7786" @@ -8414,8 +9191,6 @@ "maxShortPoolAmount": "0xb8bc819bf494e11fe7a55d68af1da8a3fa6a42b065e37f39ee351c375815e280", "maxLongPoolUsdForDeposit": "0xf31d10e6b0fdca7a2a1221e1aef71a01637a24b41f1071e52ba32c9e23002a23", "maxShortPoolUsdForDeposit": "0x9cd5fc54b24566a5041bde16ee93911ebff949b113d87c40935c5b0cdfe61762", - "longPoolAmountAdjustment": "0x24ec886fdee4040e95b783b161a0641874ff0ad61bac238b26216ac3ab184a37", - "shortPoolAmountAdjustment": "0x7ee15ba70ea0db723f2dcfad06b4e03f51708c0fab8e63ceaaad04a8a5d23ba7", "reserveFactorLong": "0xaa7f10f290bfdb4f26a9fb241fb0b5eaff79108061e9a1a241def8f62237af2f", "reserveFactorShort": "0x2c0b0c4131bb7003b86a3a2808499e4b359243f803a447c18384f8442aeca164", "openInterestReserveFactorLong": "0x9cda8a7ee4adf4348828dc1a822d32ff3d456605ae512275be3644e4b6ba8f5e", @@ -8453,16 +9228,19 @@ "minCollateralFactorForLiquidation": "0x97c9697f9c54bee1d7aa87aafb951e9271ee448039c033ee1b07f82f6bd393c6", "minCollateralFactorForOpenInterestLong": "0xa671eebbbbf69e5fdc8ba09cd259de013c3efedf731d39a16b2aacfcb0897650", "minCollateralFactorForOpenInterestShort": "0x6e1e0c0d41c794387409f63a8d15cc4185ddab61cc6d53f4b5a097e054db2112", - "positionImpactExponentFactor": "0x2447adae280fd431e18cb993e9f552f9346101d4218b0996a3fd1d6509478a0a", + "positionImpactExponentFactorPositive": "0x47eb622bb2dcd234d624c0e402261da592b06e408d4b5fd5a4f673e8dd3ee290", + "positionImpactExponentFactorNegative": "0xfbaceec1ea94a7c31d48501e4d13e944500a4716db3da8e0c5d114e0e63d64bf", "swapFeeFactorForBalanceWasImproved": "0xfd5c18e7555f9acba6ea862d6e14a04932754012def735e239b47582799926f0", "swapFeeFactorForBalanceWasNotImproved": "0x12b575bf244e9c972168fd84385a4ca7a59f21fbe87aa00290549e16edfa98ca", "atomicSwapFeeFactor": "0x38bcb40bde3296ddd8d48f7105becfc841bb32812c3dad279cd07aebb8245b24", "swapImpactFactorPositive": "0xf8e3ab382a889a5076ee8a8fdad1001719fadd0a46cc58a5dbf1acdb2015cdb4", "swapImpactFactorNegative": "0x3926196acc50053643fa4c3c067d2927c88d7baeeb09455c2398c1d3f51cb680", "swapImpactExponentFactor": "0xf3207408fe2e68e65822649ad5a0519eea88f25d7536f2bf260bbe23833764b3", + "withdrawalFeeFactorBalanceWasImproved": "0xa760b134bfd8d8bac1af77aa36d40988990505d95400f1c23bfd5b6805bffa0f", + "withdrawalFeeFactorBalanceWasNotImproved": "0x3f3254c4dd6fa4d114daf3bd1ead1e40d5eb431030b8607e17fc5a0ad87cb689", "virtualMarketId": "0x1508cc8b108cc92247ff1a8f212cdac883536956cf50ab8b3eaf42ae5d37b7ec", "virtualLongTokenId": "0xbeb8096910fd4d4b3ade12aad31c27a0e5f047fce87d1279b0c71579a8c4ef5b", "virtualShortTokenId": "0xc4ab6a4bf31c6daf14b4280e1dca54edfcb90a85aff3598cfb550dbec25f7786" } } -} \ No newline at end of file +} diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/prebuilt/hashedMarketValuesKeys.json b/src/Managing.Web3Proxy/src/generated/gmxsdk/prebuilt/hashedMarketValuesKeys.json index 824f35de..52db1ce8 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/prebuilt/hashedMarketValuesKeys.json +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/prebuilt/hashedMarketValuesKeys.json @@ -1621,6 +1621,141 @@ "longInterestInTokensUsingShortToken": "0x1ff50c1b1d847765805fc064151fd0dd0cc5a70e3ccae18692296216c566dba4", "shortInterestInTokensUsingLongToken": "0x84f2e6f5d63becd425968f24d9eafa3e629fa6c1e802a36531fdf7942131fcf1", "shortInterestInTokensUsingShortToken": "0xf2974ad3b0355d5e21d9f0bb876e1362ed876460902b71d2127c86c885f96a00" + }, + "0x970b730b5dD18de53A230eE8F4af088dBC3a6F8d": { + "longPoolAmount": "0x2074b61829fcf7b862ae5c3223d153de801b23339b8374400e2e8213093b6a18", + "shortPoolAmount": "0x5a3614bfa81e48f54a7f6100a645c25a462f4480753c2d4e4d5a786237b1bddb", + "positionImpactPoolAmount": "0xbb409d625315501ca3bba1121ff2ce3a900f33c1aba3214b199092d9bb3b3385", + "swapImpactPoolAmountLong": "0x4328c52288d787d6d4b589e491e8e6983158093c50b0bb11da95f6b37cb351e1", + "swapImpactPoolAmountShort": "0x8d0c46a62c3b46830e14eb6ea4fe27bc6d866a012d6ef44523a9d9455e3a94d8", + "longInterestUsingLongToken": "0x7bdd24656d6e7283136eb29a6e644572d522d604508a5a725030da8eaa9b7cd0", + "longInterestUsingShortToken": "0x0a4383191500c1e2d03c0683f2cd6cc9957b3b9a2e4c7800388d4bcc43d9aaa8", + "shortInterestUsingLongToken": "0x9041c450c8d60ae1506392dee5aed5dec60803e44796a6407b3c72114af4e7e3", + "shortInterestUsingShortToken": "0xee6e6e245711037e3c2af2140f3eb362a3732ad5102ad1ea1e53dedc38d308f3", + "longInterestInTokensUsingLongToken": "0x7db65b1da1abf0b73347231e24d410d3a5543ce9d97ffc13c9304514496811a5", + "longInterestInTokensUsingShortToken": "0xc878d10a8130a00570cfd5333ac4c18adf56c91ef3affde6e322ce9f64db0e7a", + "shortInterestInTokensUsingLongToken": "0x8ddc36db16d4f8f01735e858ae65019db693976a2dbc7a4f66980433c9442515", + "shortInterestInTokensUsingShortToken": "0x292d9c867cc5b7c6523ef886096f73156f6dc9fd79354d3ea3d6c8d90911b135" + }, + "0xac484106d935f0f20F1485b631fA6F65AeEff550": { + "longPoolAmount": "0x88696a34708a024c1647d4d45821c07bab167934cd8eddfd8af9d89ec159f2b3", + "shortPoolAmount": "0x8553503522a91d714af79909806c49105800c77639440e66c0affbde881da9c8", + "positionImpactPoolAmount": "0xfa9a32a5d1e9b874498b15b462ae1477daecf84e819a16ad48cc08cb12b32cc1", + "swapImpactPoolAmountLong": "0xa421ef234da6e06183987955f5f54afbf2b05d22772039aad059ebb5a4f3667e", + "swapImpactPoolAmountShort": "0x66e7190228a3ea276b2427e6ea3781d1f15821f2a55ad4b498b6b8caf6eb2d33", + "longInterestUsingLongToken": "0xb679c8ae07d1b2432bacad61e231cd5f14de33bfc3d8f84ddb4058c9c0078a14", + "longInterestUsingShortToken": "0x52d0745ce2581191e2a755c23170c85946d5b61f1e3b6b17233911e4a23c8af2", + "shortInterestUsingLongToken": "0xaa2af1a56940603ca5418aaf38b4b65b99422ff0c1361abe1d89463b70e1525c", + "shortInterestUsingShortToken": "0xd13e08e47264feba50a631e4d4af7918af4abd9786031249676ce85ca170adeb", + "longInterestInTokensUsingLongToken": "0x79aa71997972847b61db6e90eacb556e8d3cc7a1d30a57bb58f35180828345c4", + "longInterestInTokensUsingShortToken": "0x0f6dd4e051cdf677af333459039b3ac7b970a497b29df86ed20657b081d8f216", + "shortInterestInTokensUsingLongToken": "0x705db17b5f25e46052b01fa334c44db76f3c9da5003ebb054d9a8c0fbe4f0977", + "shortInterestInTokensUsingShortToken": "0xb9721cbf719928fd76842832841d2667c9cff29958a09c3ab5ccf68b1df48429" + }, + "0x4b67aa8F754b17b1029Ad2DB4fb6a276CCe350c4": { + "longPoolAmount": "0xc252e721b214e4092ff1a7694fd1cff6c3908192ab9cb44fa88ea5bb640cb4fa", + "shortPoolAmount": "0x87198e7c630b21f159b3a6b62cde2be666045d0e025a89bf51b4c4d1f11a6d21", + "positionImpactPoolAmount": "0x8252954e69a0e4c5cd3f1bb87bdbdee7d9614b85498d95094ead7b32487b8466", + "swapImpactPoolAmountLong": "0x8208b524367c4000bfd597293de89e14fad78d22fd5f09d3572fcd28fc79a93a", + "swapImpactPoolAmountShort": "0x50ec07473a0f859db50645804b4c0b4dd6b7afe12276bebc161362a0f1052aaa", + "longInterestUsingLongToken": "0xadf813a0c2913f7fe14a32ef2687724b225df14e62b33dd7e5bf349e9a7992d9", + "longInterestUsingShortToken": "0x31c59efdf2b99c34fd95af34fa3be8fd344a037b76d3208610148268b36dcc36", + "shortInterestUsingLongToken": "0xbcb68dc3a11b1ec76ee80d725f17d095442cc8a89fbe8c6fc3ecea003b45b03a", + "shortInterestUsingShortToken": "0x456e47bec0574fdfc84f89464329eda731f48ebeb8ae5cbfe02fcb593be1573c", + "longInterestInTokensUsingLongToken": "0x7a279bedd1d25403cc1efc010fe41c43de79b2d17fe123fd1a7cc620b6e79f57", + "longInterestInTokensUsingShortToken": "0xb4edfe6273f0b409079045e3b97794f0513309d6e06cd6629fd81f4d223daec4", + "shortInterestInTokensUsingLongToken": "0x4f2e8e47502dd4a4a571823d47d58f78d51bb61cd0ffcfbc5c8d4e9d7d82d405", + "shortInterestInTokensUsingShortToken": "0xffb1d44736f2bd600df3498295a5257cf4e5e632728ad3e1f38d1909f72edbe2" + }, + "0x0164B6c847c65e07C9F6226149ADBFA7C1dE40Cf": { + "longPoolAmount": "0xd9cd8adb24e17be8efc857751713be6085223bfc246d8fb2ffff705ea0a3c4d2", + "shortPoolAmount": "0xb99b7541c9d8afa104ebe5ab6e1422c537d4f31a90d2e36996c5f69335ac2362", + "positionImpactPoolAmount": "0xbc5be64d8ae6b6778a22413bc91d626354224a5af0b8fcd66337f69c3aa7a731", + "swapImpactPoolAmountLong": "0x5440a4141487e2a90943c431b062c0af493a9ce7fc4deed63cb4ed1412e8f7e5", + "swapImpactPoolAmountShort": "0xd05b59c7052f53d7ee218859cbefc71057138afef553bee3c3bd1b406f515d9d", + "longInterestUsingLongToken": "0x6bdd1908f6ae48ec861271bfe830a2a6a3167f85a709643b6f6e5715746b5b67", + "longInterestUsingShortToken": "0x75c666cc6452dafbf8bc21359ad13d7a0380210d8599564e378cffdcbeb799e5", + "shortInterestUsingLongToken": "0x4ad76dfca9bd003b6910a139e162959dcbb51fb9ab8253082053631288ca59e6", + "shortInterestUsingShortToken": "0x4348c11f59099463b529e936a9dd06c33387cb964dbbe9b4a0e45c4134b3f348", + "longInterestInTokensUsingLongToken": "0x021a36e023987d43045a3370e418861b92ea06df332648ea080a37bf54383cd0", + "longInterestInTokensUsingShortToken": "0xb2f7233755d62142fd4e2ab23c1a4f674541f6173ed85646940b96d059b30203", + "shortInterestInTokensUsingLongToken": "0xc83c07059722fed876c854d7faa917560bb37cde495c0e1fe325c3047bc6a5e2", + "shortInterestInTokensUsingShortToken": "0x319877b6a99b001914833da1a440479a6a4c87af293092bf4628abc984543c7d" + }, + "0xe024188850A822409F362209C1EF2cFdc7c4DE4C": { + "longPoolAmount": "0xcfd0cac54d1876a942cd1919d43da577170436ad98d0fe5ba69b9ac70ea83c80", + "shortPoolAmount": "0xa5257183015b669cf5cbae797f063516ef1c4f7d78ec8f0c0a488f20c25246e5", + "positionImpactPoolAmount": "0xb179b39ded71770a0accb70930d80f5dd28c7464c078f5ad916ea2c266fd20b1", + "swapImpactPoolAmountLong": "0xf9b229df4fe832453d5b821d8609d3131c91b489a68d6bd14f0a4f3f0e846f34", + "swapImpactPoolAmountShort": "0x5b2c47bb2d54d15c3f8e57c20d310a084c25929e7b44b4c330653d5493fbb480", + "longInterestUsingLongToken": "0xa5b1b6fcc841ab4ba127eeb972e2765c049c6ec1a43dcc43383f30cde6e05151", + "longInterestUsingShortToken": "0xc25acb17ce87df826e373ef7b9255d6fd994efb94e1c8791986f5e035cb90ca6", + "shortInterestUsingLongToken": "0x8563823f78058733d67c2c451cc9964b4dffd0613d170b872f05083ed4a329a6", + "shortInterestUsingShortToken": "0x07ad5eaaf7a34f6d9a8f8489e8e288d6464195a3e650efaf5793155b6be86b2f", + "longInterestInTokensUsingLongToken": "0x66abaae0e02c29c1f9cb4303a9f06168ad12deea19c4d23689451b8dfdcaff8e", + "longInterestInTokensUsingShortToken": "0x215f8e13c3ba0d8570c8d0a8db4725d77ccb221677a16e8b3d9043e01ed53565", + "shortInterestInTokensUsingLongToken": "0xce1276418054aa1ea3134d7bd488955f2fcd037895e27639575e6dbee309f390", + "shortInterestInTokensUsingShortToken": "0x10744213353ced355159f4a8a8019f58a7bb203511c2fb36a40f4f11ebdd55ac" + }, + "0xCEff9D261A96Cb78Df35f9333ba9F2F4CFcb8a68": { + "longPoolAmount": "0x55852ef103c17efc574e2e0a26b02c88ac3ee2851aaafa385b75e36ae3e9c570", + "shortPoolAmount": "0x42cfb332851c22c61f2d02ddb644dcc6d7cf1ccc87da1c7f32174aef51306ccc", + "positionImpactPoolAmount": "0x5790b94d343647d534881aeafe923889b404ede6933e62243125873c9563168a", + "swapImpactPoolAmountLong": "0x7ce51665b3faae136a0db5226c04f95fbdb701e2c05170acef3979616c813283", + "swapImpactPoolAmountShort": "0xb8eac86a35937ba87fa595e081132424a66cdf4793aeadc39328505959339cb9", + "longInterestUsingLongToken": "0xd33ec937e0d9236f7f569237387bd1433e16a95248f27798424ea618054cbae5", + "longInterestUsingShortToken": "0xdcc6917aa3a08101246a944fa8674e223d111bfb9202dea16bf776f22ed4dfb3", + "shortInterestUsingLongToken": "0xc29fd33d90e62fdb487dd491dd35e4ecacf6f323706d51f2c0e34d0f1f73497e", + "shortInterestUsingShortToken": "0x1eadd2625d9d9eba562e24f52dbc9e8363127ac3a67482d85cca1aa29f390a1e", + "longInterestInTokensUsingLongToken": "0x3aaf5d339b4c00a694e0530c388d5b6bcd46d8cc288a319a84fe09b136c4f2b6", + "longInterestInTokensUsingShortToken": "0x66474d3d4ad76bb6f1bb56a019bbcbdf9da566137352692f7d7ef28d7607de9d", + "shortInterestInTokensUsingLongToken": "0xbb3275ebff455e7cb7af11c0d1f5cbeb45ea109310e0e13ea94cadf78ac80cf9", + "shortInterestInTokensUsingShortToken": "0x51b8804fe654ba2af1d4922548b583287da4055b7b2f3b410e6937afbfeb1d75" + }, + "0x6d9430A116ed4d4FC6FE1996A5493662d555b07E": { + "longPoolAmount": "0xec290f0c8261424b104e536fb3a0b1d88e16fcc94aa450b2fbac81bb539a0d43", + "shortPoolAmount": "0x8a7b8ed848a99959a9302a4b8473fe53b57365dfb4585915b333e429f62f1b71", + "positionImpactPoolAmount": "0xb5ca3874064b68984b63ef1186ae8d4bde9e53d32fafd0066ded5e4b33a1810f", + "swapImpactPoolAmountLong": "0x742de278fefabbc41434738921f9ad5c6ca666f93d85f55bda690455cd1e1b38", + "swapImpactPoolAmountShort": "0x49fa803cb40e40033d6b96666e9e70f4af90f36340d01ea98f0f0bc5eaaf1a39", + "longInterestUsingLongToken": "0xe13608ba7ba4bd152d66b07beb2f77c5c8cd6d4ba8c14e046bd31c781c046798", + "longInterestUsingShortToken": "0x2d6bbfa8c179d03a7dbbbaec3bba4a343516412502bd2dbd5164e5cb63244773", + "shortInterestUsingLongToken": "0x3eb6cf11a1430eeb6a37442c4cf61c91812ef14b76941af237495a5130823d58", + "shortInterestUsingShortToken": "0x7902c737c4788649e0625e36bc0e1db6bcbeaf2aba22364b568c548dc2d04816", + "longInterestInTokensUsingLongToken": "0xb12295a1f8c588a16275821eb09f0f1f27f0491c5d615ea91042849d56200579", + "longInterestInTokensUsingShortToken": "0x6c69ea1917ba5d72284a2dbf32a75c122b466e98ad92571fabdda79c928769d6", + "shortInterestInTokensUsingLongToken": "0x10b543e262006c2cd2303e85f3ddc9591fa07aee6166d518b9c72953b2c1cf0f", + "shortInterestInTokensUsingShortToken": "0x325e2107d913d309e5794949ed06b3659799cdd2e591d552a78de1e9cc099d36" + }, + "0xcf083d35AD306A042d4Fb312fCdd8228b52b82f8": { + "longPoolAmount": "0x142c115bef8350a0f93f2177918747697aea197635e0011ed5c5700b233ab509", + "shortPoolAmount": "0x1af39c24260d7fea155228b41df1fc7a10f5f8b11becfe8d6bde64f5a26bef59", + "positionImpactPoolAmount": "0x1d21a31ff7e05495ae7c5cea901172e1b297a5b41843dee9c1de2f6ce3464c09", + "swapImpactPoolAmountLong": "0xb35c2efb46da4f97f643fcd2bf08f91d353e73236fe29f379caa39c65e1e8098", + "swapImpactPoolAmountShort": "0x8a211411dec473266d0541d5ed912b68f7e641904a5441b3038356fe8f0ae40d", + "longInterestUsingLongToken": "0x32474dbe10f29d0afc1c53605b661ab516c23ac96e36f4f70e81a8829b678306", + "longInterestUsingShortToken": "0xfcfd3a1f1528dedc958574a563d3a6ca888bee089bdef0d8620f64ac5d381917", + "shortInterestUsingLongToken": "0x517983efa2f695e6b7821c4b3a45ef27504847c5c8fa68f42863182d586263af", + "shortInterestUsingShortToken": "0xd2bc21e3bf9f97e8010c0bce7a4964f4043976a33b4d4118a2b58b50d410c7d7", + "longInterestInTokensUsingLongToken": "0x4d00ba1372ca0b7176e3572748e4bfa7fd77f2764c251bd64d15eed0f998785c", + "longInterestInTokensUsingShortToken": "0xd5ce540100036f304535bed6e274cbe527d7240dee24ddecb1683ad6e0c836f0", + "shortInterestInTokensUsingLongToken": "0xffc122809927612147d727f3e8962ef70b779e6ae9db4dd1e0ed41fa579f9928", + "shortInterestInTokensUsingShortToken": "0xc5b60158f086cbe1a044860ac5942e4ed5a699452674ba324a2879e77fb6a3ed" + }, + "0x065577D05c3D4C11505ed7bc97BBF85d462A6A6f": { + "longPoolAmount": "0xdfdff9779e656e38a5554375664e005139b845c12044cba3698cec93b132061d", + "shortPoolAmount": "0xf691ed7ec53d9af08fa9e23a009b4cb50fceaac322fa7f251227ed62e3cd73e3", + "positionImpactPoolAmount": "0xaa0d639b75a9a598109eb8fb4de2bba82a07cca421b7d3828dd434bd258b4603", + "swapImpactPoolAmountLong": "0x3494c8e4a1a0461858b7e4da60f05c4d611989d66f09ee16e5fe9b3d77092f31", + "swapImpactPoolAmountShort": "0x1a15518e7524b634e77457bd4ed80fe96c6982e4627cc453922a4c53b65fc14b", + "longInterestUsingLongToken": "0x5e42113d33c048d1199eba207c68ecaab4e619e229d80b87a050d6797d521bae", + "longInterestUsingShortToken": "0x1338686dcb7a0a10437ba8d4f375deb5782a832ff7241db047218f339569e153", + "shortInterestUsingLongToken": "0x98da8a6a472abfa42d8616d285c9a9235f75f8c726e55577458301fac5b79249", + "shortInterestUsingShortToken": "0x15c3fb4c9139827e3378dfd52b1a5df0255bac7aed808a39360e6b24688fb2d4", + "longInterestInTokensUsingLongToken": "0xc93f37ab340326439b107869fccbc76c8c4c2466ee810dacc1568a5285518b1d", + "longInterestInTokensUsingShortToken": "0x6734f6e1ed79dbc103747ae3793283a241f5781bdedcee7ecc33e856c5dedb83", + "shortInterestInTokensUsingLongToken": "0x3290d5bb740ead6457be88ecd3dc9fe14cabb45ae3b6f79c1348639e03fa16c6", + "shortInterestInTokensUsingShortToken": "0xc6a4753ad0bccf47988451d2174e0bc5dbd2eb198aeb6e17426d3b8ce0e4b028" } }, "43113": { @@ -2195,6 +2330,36 @@ "longInterestInTokensUsingShortToken": "0xe66cbf40dbb64071b803a8739120264576e6de7d7eebf7c3f75a12a97040d222", "shortInterestInTokensUsingLongToken": "0x6e32e6700f16a1a53fe8c811c5b3e7ceee4b7c7552816bebe96ebca708c87e25", "shortInterestInTokensUsingShortToken": "0xd710836d5908bc3e16f18b7bd2f7f2930256fba5067f84b467f2aad0818aa49a" + }, + "0x1635eF7FBdce68eC80A3672aB710A5a99044f5c9": { + "longPoolAmount": "0x510c25bf725cd04ebf319aee239900a5a282ff2dc8abbf90551f28b7ec9d85a6", + "shortPoolAmount": "0x510c25bf725cd04ebf319aee239900a5a282ff2dc8abbf90551f28b7ec9d85a6", + "positionImpactPoolAmount": "0x8cfed0ffa4b0c9328262ed61bcb0ad1949745b0e03683d94a630838c9e952588", + "swapImpactPoolAmountLong": "0x24069c5d9d8bd85137f8944f2d14f7e960b686129d85f6d71cc938bec0fd1a3e", + "swapImpactPoolAmountShort": "0x24069c5d9d8bd85137f8944f2d14f7e960b686129d85f6d71cc938bec0fd1a3e", + "longInterestUsingLongToken": "0xba6e5920a68446810b072c4e3ab43f2da73355f46cce7b5215c08772e3f66720", + "longInterestUsingShortToken": "0xba6e5920a68446810b072c4e3ab43f2da73355f46cce7b5215c08772e3f66720", + "shortInterestUsingLongToken": "0xfbc448b46450e761248cb2cd307737aafdae4ae3ecd086f314a855b698cb9cc1", + "shortInterestUsingShortToken": "0xfbc448b46450e761248cb2cd307737aafdae4ae3ecd086f314a855b698cb9cc1", + "longInterestInTokensUsingLongToken": "0x795742572b1fdf327006310ebb05ab17d3a081f59650ed86121374f6f99d59da", + "longInterestInTokensUsingShortToken": "0x795742572b1fdf327006310ebb05ab17d3a081f59650ed86121374f6f99d59da", + "shortInterestInTokensUsingLongToken": "0x863622eeda97517f094178bb30b186480f28ea844d47199d72b62e02540365ed", + "shortInterestInTokensUsingShortToken": "0x863622eeda97517f094178bb30b186480f28ea844d47199d72b62e02540365ed" + }, + "0x92d3DA41E166A12e3Ede9e2Dd9A272C5c6FC55E1": { + "longPoolAmount": "0x064ed89eaacfaabc419ddb8341c5906c215abc9ae484cb36fcabc1dece4ad724", + "shortPoolAmount": "0x5e40065159119b8df7f619351e3e16453abd3fbd1d9f82add0e36bb2ab59f39b", + "positionImpactPoolAmount": "0x9ca0d5feffd49c228fd3439246c4f0dcc7bdc39db05e586a14d925e00177e572", + "swapImpactPoolAmountLong": "0x6601224d660e2ab4b5df3dcaccec8a80b343a1542ca6cab054b3abeebd2b6b99", + "swapImpactPoolAmountShort": "0xf7ee31bf7c7cef722332acf7b80a52ef0143a1e63f925648658b277375c291c1", + "longInterestUsingLongToken": "0xe81d03ae883c7cf40bf06d42a14a5c2abf944f16c9a31edc2f118faf29b9f0d8", + "longInterestUsingShortToken": "0x5954bef44bc061cd8179868c650f0f67daf2a7df91cb22e39895fb77306ff0d5", + "shortInterestUsingLongToken": "0x9a9a23b4ac0e42ce94339fe7c2b3c1896db77193466368ac8dda6f29958e38cb", + "shortInterestUsingShortToken": "0xd982925a44acc0d87fd2892c94e2444fb19efce0f22c5ba39c9e272e1e533fbd", + "longInterestInTokensUsingLongToken": "0x573b1d58e9bd0ebf966fb422be979aaa1d2606ddf5f581ba66753ddd1ced365a", + "longInterestInTokensUsingShortToken": "0xf122aaffcd9f40878bb37776001360e176e61e4db1378aba085804aea6b5daf5", + "shortInterestInTokensUsingLongToken": "0x7e373c8fa6be58bc987769a712e5d23123df0455a6c9929b3ed668fb5cb18235", + "shortInterestInTokensUsingShortToken": "0x74536f2c5d4f728f2fd4e1c8dda4ca663e2b33ab9b2d6e966b7bd4b020034c82" } }, "421614": { diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/prebuilt/index.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/prebuilt/index.ts index 31f0c5df..84b80775 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/prebuilt/index.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/prebuilt/index.ts @@ -2,12 +2,10 @@ * Json files in this directory are prebuild by scripts from the `scripts/prebuild` directory. * No need to edit them manually, use `yarn run prebuild` command instead. */ - - import { - KinkModelMarketRateMulticallRequestConfig, - MarketConfigMulticallRequestConfig, - MarketValuesMulticallRequestConfig + KinkModelMarketRateMulticallRequestConfig, + MarketConfigMulticallRequestConfig, + MarketValuesMulticallRequestConfig, } from "../modules/markets/types.js"; import hashedKinkModelMarketRatesKeys from "./hashedKinkModelMarketRatesKeys.json" with {type: "json"}; import hashedMarketConfigKeysJson from "./hashedMarketConfigKeys.json" with {type: "json"}; @@ -24,9 +22,7 @@ const HASHED_MARKET_VALUES_KEYS: { }; } = hashedMarketValuesKeysJson; -type HashedMarketConfigKeys = Partial< - Record ->; +type HashedMarketConfigKeys = Record; const HASHED_MARKET_CONFIG_KEYS: { [chainId: number]: { diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/types/fees.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/types/fees.ts index ff9197b3..5b141a5b 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/types/fees.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/types/fees.ts @@ -1,5 +1,6 @@ -import {ExternalSwapAggregator} from "./trade.js"; -import {Token} from "./tokens.js"; +import { Token } from "./tokens.js"; + +import { ExternalSwapAggregator } from "./trade.js"; export type ExecutionFee = { feeUsd: bigint; diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/types/markets.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/types/markets.ts index 3e5112c1..e0d8f563 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/types/markets.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/types/markets.ts @@ -1,4 +1,4 @@ -import {TokenData} from "./tokens"; +import type { TokenData } from "./tokens.js"; export type PnlFactorType = "FOR_DEPOSITS" | "FOR_WITHDRAWALS" | "FOR_TRADERS"; @@ -39,9 +39,6 @@ export type MarketInfo = Market & maxLongPoolUsdForDeposit: bigint; maxShortPoolUsdForDeposit: bigint; - longPoolAmountAdjustment: bigint; - shortPoolAmountAdjustment: bigint; - poolValueMax: bigint; poolValueMin: bigint; @@ -75,6 +72,7 @@ export type MarketInfo = Market & positionImpactPoolDistributionRate: bigint; minCollateralFactor: bigint; + minCollateralFactorForLiquidation: bigint; minCollateralFactorForOpenInterestLong: bigint; minCollateralFactorForOpenInterestShort: bigint; @@ -92,20 +90,29 @@ export type MarketInfo = Market & longInterestInTokens: bigint; shortInterestInTokens: bigint; - positionFeeFactorForPositiveImpact: bigint; - positionFeeFactorForNegativeImpact: bigint; + positionFeeFactorForBalanceWasImproved: bigint; + positionFeeFactorForBalanceWasNotImproved: bigint; positionImpactFactorPositive: bigint; positionImpactFactorNegative: bigint; maxPositionImpactFactorPositive: bigint; maxPositionImpactFactorNegative: bigint; maxPositionImpactFactorForLiquidations: bigint; - positionImpactExponentFactor: bigint; + maxLendableImpactFactor: bigint; + maxLendableImpactFactorForWithdrawals: bigint; + maxLendableImpactUsd: bigint; + lentPositionImpactPoolAmount: bigint; + positionImpactExponentFactorPositive: bigint; + positionImpactExponentFactorNegative: bigint; + useOpenInterestInTokensForBalance: boolean; - swapFeeFactorForPositiveImpact: bigint; - swapFeeFactorForNegativeImpact: bigint; + swapFeeFactorForBalanceWasImproved: bigint; + swapFeeFactorForBalanceWasNotImproved: bigint; + atomicSwapFeeFactor: bigint; swapImpactFactorPositive: bigint; swapImpactFactorNegative: bigint; swapImpactExponentFactor: bigint; + withdrawalFeeFactorBalanceWasImproved?: bigint; + withdrawalFeeFactorBalanceWasNotImproved?: bigint; borrowingFactorPerSecondForLongs: bigint; borrowingFactorPerSecondForShorts: bigint; @@ -120,14 +127,6 @@ export type MarketInfo = Market & virtualMarketId: string; virtualLongTokenId: string; virtualShortTokenId: string; - - atomicSwapFeeFactor: bigint; - swapFeeFactorForBalanceWasImproved: bigint; - swapFeeFactorForBalanceWasNotImproved: bigint; - positionFeeFactorForBalanceWasImproved: bigint; - positionFeeFactorForBalanceWasNotImproved: bigint; - - minCollateralFactorForLiquidation: bigint; }; export type MarketsData = { diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/types/orders.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/types/orders.ts index 8bd9e99c..9fa73d95 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/types/orders.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/types/orders.ts @@ -1,6 +1,6 @@ -import {MarketInfo} from "./markets"; -import {TokenData, TokensRatio, TokensRatioAndSlippage} from "./tokens"; -import {SwapPathStats, TriggerThresholdType} from "./trade"; +import { MarketInfo } from "./markets.js"; +import { TokenData, TokensRatio, TokensRatioAndSlippage } from "./tokens.js"; +import { SwapPathStats, TriggerThresholdType } from "./trade.js"; export enum OrderType { // the order will be cancelled if the minOutputAmount cannot be fulfilled @@ -29,10 +29,16 @@ export type SwapOrderType = OrderType.MarketSwap | OrderType.LimitSwap; export type IncreaseOrderType = OrderType.MarketIncrease | OrderType.LimitIncrease | OrderType.StopIncrease; export type DecreaseOrderType = OrderType.MarketDecrease | OrderType.LimitDecrease | OrderType.StopLossDecrease; +/** + * @see https://github.com/gmx-io/gmx-synthetics/blob/a54f774198d79954d66d694af1be479bb6da61f1/contracts/pricing/ISwapPricingUtils.sol#L5 + */ export enum SwapPricingType { - TwoStep = 0, - Shift = 1, - Atomic = 2, + Swap, + Shift, + AtomicWithdrawal, + Deposit, + Withdrawal, + AtomicSwap, } export enum DecreasePositionSwapType { @@ -74,6 +80,8 @@ export type SwapOrderInfo = Order & { isTwap: false; swapPathStats?: SwapPathStats; triggerRatio?: TokensRatio | TokensRatioAndSlippage; + // Store trigger ratio value + triggerPrice: bigint; initialCollateralToken: TokenData; targetCollateralToken: TokenData; }; diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/types/positions.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/types/positions.ts index ed4d93eb..82a40981 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/types/positions.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/types/positions.ts @@ -1,5 +1,5 @@ -import {Market, MarketInfo} from "./markets"; -import {TokenData} from "./tokens"; +import type { Market, MarketInfo } from "./markets.js"; +import type { TokenData } from "./tokens.js"; export type Position = { key: string; @@ -69,6 +69,7 @@ export type PositionInfo = Position & { closePriceImpactDeltaUsd: bigint; leverage: bigint | undefined; leverageWithPnl: bigint | undefined; + leverageWithoutPnl: bigint | undefined; netValue: bigint; closingFeeUsd: bigint; uiFeeUsd: bigint; diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/types/sdk.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/types/sdk.ts index efac4294..dc77a309 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/types/sdk.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/types/sdk.ts @@ -1,30 +1,32 @@ -import type {PublicClient, WalletClient} from "viem"; -import type {Token} from "./tokens"; -import type {MarketSdkConfig} from "./markets"; -import {ContractsChainId} from "../configs/chains"; +import type { PublicClient, WalletClient } from "viem"; + +import type { ContractsChainId } from "../configs/chains.js"; + +import type { MarketSdkConfig } from "./markets.js"; +import type { Token } from "./tokens.js"; export interface GmxSdkConfig { - /** Chain ID */ - chainId: ContractsChainId; - /** Account's address */ - account?: string; - /** GMX Oracle URL */ - oracleUrl: string; - /** Blockhain RPC URL */ - rpcUrl: string; - /** GMX Subsquid URL */ - subsquidUrl: string; - - /** Custom viem's public and private client */ - publicClient?: PublicClient; - walletClient?: WalletClient; - - /** Tokens override configurations */ - tokens?: Record>; - /** Markets override configurations */ - markets?: Record>; - - settings?: { - uiFeeReceiverAccount?: string; - }; + /** Chain ID */ + chainId: ContractsChainId; + /** Account's address */ + account?: string; + /** GMX Oracle URL */ + oracleUrl: string; + /** Blockhain RPC URL */ + rpcUrl: string; + /** GMX Subsquid URL */ + subsquidUrl: string; + + /** Custom viem's public and private client */ + publicClient?: PublicClient; + walletClient?: WalletClient; + + /** Tokens override configurations */ + tokens?: Record>; + /** Markets override configurations */ + markets?: Record>; + + settings?: { + uiFeeReceiverAccount?: string; + }; } diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/types/subsquid.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/types/subsquid.ts index ba8f9358..47f3905c 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/types/subsquid.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/types/subsquid.ts @@ -25,6 +25,8 @@ export interface AccountPnlHistoryPointObject { cumulativeRealizedPnl: Scalars["BigInt"]["output"]; /** Field for debug */ cumulativeRealizedPriceImpact: Scalars["BigInt"]["output"]; + /** Field for debug */ + cumulativeRealizedSwapImpact: Scalars["BigInt"]["output"]; pnl: Scalars["BigInt"]["output"]; /** Field for debug */ realizedFees: Scalars["BigInt"]["output"]; @@ -33,6 +35,8 @@ export interface AccountPnlHistoryPointObject { /** Field for debug */ realizedPriceImpact: Scalars["BigInt"]["output"]; /** Field for debug */ + realizedSwapImpact: Scalars["BigInt"]["output"]; + /** Field for debug */ startUnrealizedFees: Scalars["BigInt"]["output"]; /** Field for debug */ startUnrealizedPnl: Scalars["BigInt"]["output"]; @@ -57,6 +61,8 @@ export interface AccountPnlSummaryBucketObject { /** Field for debug */ realizedPriceImpactUsd: Scalars["BigInt"]["output"]; /** Field for debug */ + realizedSwapImpactUsd: Scalars["BigInt"]["output"]; + /** Field for debug */ startUnrealizedBasePnlUsd: Scalars["BigInt"]["output"]; /** Field for debug */ startUnrealizedFeesUsd: Scalars["BigInt"]["output"]; @@ -78,6 +84,7 @@ export interface AccountStat { closedCount: Scalars["Int"]["output"]; cumsumCollateral: Scalars["BigInt"]["output"]; cumsumSize: Scalars["BigInt"]["output"]; + deposits: Scalars["BigInt"]["output"]; id: Scalars["String"]["output"]; losses: Scalars["Int"]["output"]; maxCapital: Scalars["BigInt"]["output"]; @@ -86,6 +93,7 @@ export interface AccountStat { realizedFees: Scalars["BigInt"]["output"]; realizedPnl: Scalars["BigInt"]["output"]; realizedPriceImpact: Scalars["BigInt"]["output"]; + realizedSwapImpact: Scalars["BigInt"]["output"]; sumMaxSize: Scalars["BigInt"]["output"]; volume: Scalars["BigInt"]["output"]; wins: Scalars["Int"]["output"]; @@ -123,6 +131,12 @@ export enum AccountStatOrderByInput { cumsumSize_DESC = "cumsumSize_DESC", cumsumSize_DESC_NULLS_FIRST = "cumsumSize_DESC_NULLS_FIRST", cumsumSize_DESC_NULLS_LAST = "cumsumSize_DESC_NULLS_LAST", + deposits_ASC = "deposits_ASC", + deposits_ASC_NULLS_FIRST = "deposits_ASC_NULLS_FIRST", + deposits_ASC_NULLS_LAST = "deposits_ASC_NULLS_LAST", + deposits_DESC = "deposits_DESC", + deposits_DESC_NULLS_FIRST = "deposits_DESC_NULLS_FIRST", + deposits_DESC_NULLS_LAST = "deposits_DESC_NULLS_LAST", id_ASC = "id_ASC", id_ASC_NULLS_FIRST = "id_ASC_NULLS_FIRST", id_ASC_NULLS_LAST = "id_ASC_NULLS_LAST", @@ -165,6 +179,12 @@ export enum AccountStatOrderByInput { realizedPriceImpact_DESC = "realizedPriceImpact_DESC", realizedPriceImpact_DESC_NULLS_FIRST = "realizedPriceImpact_DESC_NULLS_FIRST", realizedPriceImpact_DESC_NULLS_LAST = "realizedPriceImpact_DESC_NULLS_LAST", + realizedSwapImpact_ASC = "realizedSwapImpact_ASC", + realizedSwapImpact_ASC_NULLS_FIRST = "realizedSwapImpact_ASC_NULLS_FIRST", + realizedSwapImpact_ASC_NULLS_LAST = "realizedSwapImpact_ASC_NULLS_LAST", + realizedSwapImpact_DESC = "realizedSwapImpact_DESC", + realizedSwapImpact_DESC_NULLS_FIRST = "realizedSwapImpact_DESC_NULLS_FIRST", + realizedSwapImpact_DESC_NULLS_LAST = "realizedSwapImpact_DESC_NULLS_LAST", sumMaxSize_ASC = "sumMaxSize_ASC", sumMaxSize_ASC_NULLS_FIRST = "sumMaxSize_ASC_NULLS_FIRST", sumMaxSize_ASC_NULLS_LAST = "sumMaxSize_ASC_NULLS_LAST", @@ -215,6 +235,15 @@ export interface AccountStatWhereInput { cumsumSize_lte?: InputMaybe; cumsumSize_not_eq?: InputMaybe; cumsumSize_not_in?: InputMaybe>; + deposits_eq?: InputMaybe; + deposits_gt?: InputMaybe; + deposits_gte?: InputMaybe; + deposits_in?: InputMaybe>; + deposits_isNull?: InputMaybe; + deposits_lt?: InputMaybe; + deposits_lte?: InputMaybe; + deposits_not_eq?: InputMaybe; + deposits_not_in?: InputMaybe>; id_contains?: InputMaybe; id_containsInsensitive?: InputMaybe; id_endsWith?: InputMaybe; @@ -289,6 +318,15 @@ export interface AccountStatWhereInput { realizedPriceImpact_lte?: InputMaybe; realizedPriceImpact_not_eq?: InputMaybe; realizedPriceImpact_not_in?: InputMaybe>; + realizedSwapImpact_eq?: InputMaybe; + realizedSwapImpact_gt?: InputMaybe; + realizedSwapImpact_gte?: InputMaybe; + realizedSwapImpact_in?: InputMaybe>; + realizedSwapImpact_isNull?: InputMaybe; + realizedSwapImpact_lt?: InputMaybe; + realizedSwapImpact_lte?: InputMaybe; + realizedSwapImpact_not_eq?: InputMaybe; + realizedSwapImpact_not_in?: InputMaybe>; sumMaxSize_eq?: InputMaybe; sumMaxSize_gt?: InputMaybe; sumMaxSize_gte?: InputMaybe; @@ -667,12 +705,6 @@ export enum ClaimActionOrderByInput { 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_chainId_ASC = "transaction_chainId_ASC", - transaction_chainId_ASC_NULLS_FIRST = "transaction_chainId_ASC_NULLS_FIRST", - transaction_chainId_ASC_NULLS_LAST = "transaction_chainId_ASC_NULLS_LAST", - transaction_chainId_DESC = "transaction_chainId_DESC", - transaction_chainId_DESC_NULLS_FIRST = "transaction_chainId_DESC_NULLS_FIRST", - transaction_chainId_DESC_NULLS_LAST = "transaction_chainId_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", @@ -850,6 +882,151 @@ export interface ClaimRefsConnection { totalCount: Scalars["Int"]["output"]; } +export interface ClaimableAmount { + __typename?: "ClaimableAmount"; + account: Scalars["String"]["output"]; + amount: Scalars["BigInt"]["output"]; + amountInUsd?: Maybe; + distributionId: Scalars["BigInt"]["output"]; + id: Scalars["String"]["output"]; + token: Scalars["String"]["output"]; +} + +export interface ClaimableAmountEdge { + __typename?: "ClaimableAmountEdge"; + cursor: Scalars["String"]["output"]; + node: ClaimableAmount; +} + +export enum ClaimableAmountOrderByInput { + account_ASC = "account_ASC", + account_ASC_NULLS_FIRST = "account_ASC_NULLS_FIRST", + account_ASC_NULLS_LAST = "account_ASC_NULLS_LAST", + account_DESC = "account_DESC", + account_DESC_NULLS_FIRST = "account_DESC_NULLS_FIRST", + account_DESC_NULLS_LAST = "account_DESC_NULLS_LAST", + amountInUsd_ASC = "amountInUsd_ASC", + amountInUsd_ASC_NULLS_FIRST = "amountInUsd_ASC_NULLS_FIRST", + amountInUsd_ASC_NULLS_LAST = "amountInUsd_ASC_NULLS_LAST", + amountInUsd_DESC = "amountInUsd_DESC", + amountInUsd_DESC_NULLS_FIRST = "amountInUsd_DESC_NULLS_FIRST", + amountInUsd_DESC_NULLS_LAST = "amountInUsd_DESC_NULLS_LAST", + amount_ASC = "amount_ASC", + amount_ASC_NULLS_FIRST = "amount_ASC_NULLS_FIRST", + amount_ASC_NULLS_LAST = "amount_ASC_NULLS_LAST", + amount_DESC = "amount_DESC", + amount_DESC_NULLS_FIRST = "amount_DESC_NULLS_FIRST", + amount_DESC_NULLS_LAST = "amount_DESC_NULLS_LAST", + distributionId_ASC = "distributionId_ASC", + distributionId_ASC_NULLS_FIRST = "distributionId_ASC_NULLS_FIRST", + distributionId_ASC_NULLS_LAST = "distributionId_ASC_NULLS_LAST", + distributionId_DESC = "distributionId_DESC", + distributionId_DESC_NULLS_FIRST = "distributionId_DESC_NULLS_FIRST", + distributionId_DESC_NULLS_LAST = "distributionId_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", + token_ASC = "token_ASC", + token_ASC_NULLS_FIRST = "token_ASC_NULLS_FIRST", + token_ASC_NULLS_LAST = "token_ASC_NULLS_LAST", + token_DESC = "token_DESC", + token_DESC_NULLS_FIRST = "token_DESC_NULLS_FIRST", + token_DESC_NULLS_LAST = "token_DESC_NULLS_LAST", +} + +export interface ClaimableAmountWhereInput { + AND?: InputMaybe>; + OR?: InputMaybe>; + account_contains?: InputMaybe; + account_containsInsensitive?: InputMaybe; + account_endsWith?: InputMaybe; + account_eq?: InputMaybe; + account_gt?: InputMaybe; + account_gte?: InputMaybe; + account_in?: InputMaybe>; + account_isNull?: InputMaybe; + account_lt?: InputMaybe; + account_lte?: InputMaybe; + account_not_contains?: InputMaybe; + account_not_containsInsensitive?: InputMaybe; + account_not_endsWith?: InputMaybe; + account_not_eq?: InputMaybe; + account_not_in?: InputMaybe>; + account_not_startsWith?: InputMaybe; + account_startsWith?: InputMaybe; + amountInUsd_eq?: InputMaybe; + amountInUsd_gt?: InputMaybe; + amountInUsd_gte?: InputMaybe; + amountInUsd_in?: InputMaybe>; + amountInUsd_isNull?: InputMaybe; + amountInUsd_lt?: InputMaybe; + amountInUsd_lte?: InputMaybe; + amountInUsd_not_eq?: InputMaybe; + amountInUsd_not_in?: InputMaybe>; + amount_eq?: InputMaybe; + amount_gt?: InputMaybe; + amount_gte?: InputMaybe; + amount_in?: InputMaybe>; + amount_isNull?: InputMaybe; + amount_lt?: InputMaybe; + amount_lte?: InputMaybe; + amount_not_eq?: InputMaybe; + amount_not_in?: InputMaybe>; + distributionId_eq?: InputMaybe; + distributionId_gt?: InputMaybe; + distributionId_gte?: InputMaybe; + distributionId_in?: InputMaybe>; + distributionId_isNull?: InputMaybe; + distributionId_lt?: InputMaybe; + distributionId_lte?: InputMaybe; + distributionId_not_eq?: InputMaybe; + distributionId_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; + token_contains?: InputMaybe; + token_containsInsensitive?: InputMaybe; + token_endsWith?: InputMaybe; + token_eq?: InputMaybe; + token_gt?: InputMaybe; + token_gte?: InputMaybe; + token_in?: InputMaybe>; + token_isNull?: InputMaybe; + token_lt?: InputMaybe; + token_lte?: InputMaybe; + token_not_contains?: InputMaybe; + token_not_containsInsensitive?: InputMaybe; + token_not_endsWith?: InputMaybe; + token_not_eq?: InputMaybe; + token_not_in?: InputMaybe>; + token_not_startsWith?: InputMaybe; + token_startsWith?: InputMaybe; +} + +export interface ClaimableAmountsConnection { + __typename?: "ClaimableAmountsConnection"; + edges: Array; + pageInfo: PageInfo; + totalCount: Scalars["Int"]["output"]; +} + export interface ClaimableCollateral { __typename?: "ClaimableCollateral"; account: Scalars["String"]["output"]; @@ -860,7 +1037,7 @@ export interface ClaimableCollateral { id: Scalars["String"]["output"]; marketAddress: Scalars["String"]["output"]; reductionFactor: Scalars["BigInt"]["output"]; - timeKey: Scalars["String"]["output"]; + timeKey: Scalars["Int"]["output"]; tokenAddress: Scalars["String"]["output"]; value: Scalars["BigInt"]["output"]; } @@ -877,7 +1054,7 @@ export interface ClaimableCollateralGroup { factor: Scalars["BigInt"]["output"]; id: Scalars["String"]["output"]; marketAddress: Scalars["String"]["output"]; - timeKey: Scalars["String"]["output"]; + timeKey: Scalars["Int"]["output"]; tokenAddress: Scalars["String"]["output"]; } @@ -976,23 +1153,15 @@ export interface ClaimableCollateralGroupWhereInput { marketAddress_not_in?: InputMaybe>; marketAddress_not_startsWith?: InputMaybe; marketAddress_startsWith?: InputMaybe; - timeKey_contains?: InputMaybe; - timeKey_containsInsensitive?: InputMaybe; - timeKey_endsWith?: InputMaybe; - timeKey_eq?: InputMaybe; - timeKey_gt?: InputMaybe; - timeKey_gte?: InputMaybe; - timeKey_in?: InputMaybe>; + timeKey_eq?: InputMaybe; + timeKey_gt?: InputMaybe; + timeKey_gte?: InputMaybe; + timeKey_in?: InputMaybe>; timeKey_isNull?: InputMaybe; - timeKey_lt?: InputMaybe; - timeKey_lte?: InputMaybe; - timeKey_not_contains?: InputMaybe; - timeKey_not_containsInsensitive?: InputMaybe; - timeKey_not_endsWith?: InputMaybe; - timeKey_not_eq?: InputMaybe; - timeKey_not_in?: InputMaybe>; - timeKey_not_startsWith?: InputMaybe; - timeKey_startsWith?: InputMaybe; + timeKey_lt?: InputMaybe; + timeKey_lte?: InputMaybe; + timeKey_not_eq?: InputMaybe; + timeKey_not_in?: InputMaybe>; tokenAddress_contains?: InputMaybe; tokenAddress_containsInsensitive?: InputMaybe; tokenAddress_endsWith?: InputMaybe; @@ -1198,23 +1367,15 @@ export interface ClaimableCollateralWhereInput { reductionFactor_lte?: InputMaybe; reductionFactor_not_eq?: InputMaybe; reductionFactor_not_in?: InputMaybe>; - timeKey_contains?: InputMaybe; - timeKey_containsInsensitive?: InputMaybe; - timeKey_endsWith?: InputMaybe; - timeKey_eq?: InputMaybe; - timeKey_gt?: InputMaybe; - timeKey_gte?: InputMaybe; - timeKey_in?: InputMaybe>; + timeKey_eq?: InputMaybe; + timeKey_gt?: InputMaybe; + timeKey_gte?: InputMaybe; + timeKey_in?: InputMaybe>; timeKey_isNull?: InputMaybe; - timeKey_lt?: InputMaybe; - timeKey_lte?: InputMaybe; - timeKey_not_contains?: InputMaybe; - timeKey_not_containsInsensitive?: InputMaybe; - timeKey_not_endsWith?: InputMaybe; - timeKey_not_eq?: InputMaybe; - timeKey_not_in?: InputMaybe>; - timeKey_not_startsWith?: InputMaybe; - timeKey_startsWith?: InputMaybe; + timeKey_lt?: InputMaybe; + timeKey_lte?: InputMaybe; + timeKey_not_eq?: InputMaybe; + timeKey_not_in?: InputMaybe>; tokenAddress_contains?: InputMaybe; tokenAddress_containsInsensitive?: InputMaybe; tokenAddress_endsWith?: InputMaybe; @@ -1985,12 +2146,6 @@ export enum DistributionOrderByInput { 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_chainId_ASC = "transaction_chainId_ASC", - transaction_chainId_ASC_NULLS_FIRST = "transaction_chainId_ASC_NULLS_FIRST", - transaction_chainId_ASC_NULLS_LAST = "transaction_chainId_ASC_NULLS_LAST", - transaction_chainId_DESC = "transaction_chainId_DESC", - transaction_chainId_DESC_NULLS_FIRST = "transaction_chainId_DESC_NULLS_FIRST", - transaction_chainId_DESC_NULLS_LAST = "transaction_chainId_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", @@ -2342,7 +2497,6 @@ export interface MarketInfo { longOpenInterestUsingLongToken: Scalars["BigInt"]["output"]; longOpenInterestUsingShortToken: Scalars["BigInt"]["output"]; longPoolAmount: Scalars["BigInt"]["output"]; - longPoolAmountAdjustment: Scalars["BigInt"]["output"]; longTokenAddress: Scalars["String"]["output"]; longsPayShorts: Scalars["Boolean"]["output"]; marketTokenAddress: Scalars["String"]["output"]; @@ -2376,7 +2530,8 @@ export interface MarketInfo { poolValueMin: Scalars["BigInt"]["output"]; positionFeeFactorForNegativeImpact: Scalars["BigInt"]["output"]; positionFeeFactorForPositiveImpact: Scalars["BigInt"]["output"]; - positionImpactExponentFactor: Scalars["BigInt"]["output"]; + positionImpactExponentFactorNegative: Scalars["BigInt"]["output"]; + positionImpactExponentFactorPositive: Scalars["BigInt"]["output"]; positionImpactFactorNegative: Scalars["BigInt"]["output"]; positionImpactFactorPositive: Scalars["BigInt"]["output"]; positionImpactPoolAmount: Scalars["BigInt"]["output"]; @@ -2390,7 +2545,6 @@ export interface MarketInfo { shortOpenInterestUsingLongToken: Scalars["BigInt"]["output"]; shortOpenInterestUsingShortToken: Scalars["BigInt"]["output"]; shortPoolAmount: Scalars["BigInt"]["output"]; - shortPoolAmountAdjustment: Scalars["BigInt"]["output"]; shortTokenAddress: Scalars["String"]["output"]; swapFeeFactorForNegativeImpact: Scalars["BigInt"]["output"]; swapFeeFactorForPositiveImpact: Scalars["BigInt"]["output"]; @@ -2574,12 +2728,6 @@ export enum MarketInfoOrderByInput { longOpenInterestUsingShortToken_DESC = "longOpenInterestUsingShortToken_DESC", longOpenInterestUsingShortToken_DESC_NULLS_FIRST = "longOpenInterestUsingShortToken_DESC_NULLS_FIRST", longOpenInterestUsingShortToken_DESC_NULLS_LAST = "longOpenInterestUsingShortToken_DESC_NULLS_LAST", - longPoolAmountAdjustment_ASC = "longPoolAmountAdjustment_ASC", - longPoolAmountAdjustment_ASC_NULLS_FIRST = "longPoolAmountAdjustment_ASC_NULLS_FIRST", - longPoolAmountAdjustment_ASC_NULLS_LAST = "longPoolAmountAdjustment_ASC_NULLS_LAST", - longPoolAmountAdjustment_DESC = "longPoolAmountAdjustment_DESC", - longPoolAmountAdjustment_DESC_NULLS_FIRST = "longPoolAmountAdjustment_DESC_NULLS_FIRST", - longPoolAmountAdjustment_DESC_NULLS_LAST = "longPoolAmountAdjustment_DESC_NULLS_LAST", longPoolAmount_ASC = "longPoolAmount_ASC", longPoolAmount_ASC_NULLS_FIRST = "longPoolAmount_ASC_NULLS_FIRST", longPoolAmount_ASC_NULLS_LAST = "longPoolAmount_ASC_NULLS_LAST", @@ -2784,12 +2932,18 @@ export enum MarketInfoOrderByInput { positionFeeFactorForPositiveImpact_DESC = "positionFeeFactorForPositiveImpact_DESC", positionFeeFactorForPositiveImpact_DESC_NULLS_FIRST = "positionFeeFactorForPositiveImpact_DESC_NULLS_FIRST", positionFeeFactorForPositiveImpact_DESC_NULLS_LAST = "positionFeeFactorForPositiveImpact_DESC_NULLS_LAST", - positionImpactExponentFactor_ASC = "positionImpactExponentFactor_ASC", - positionImpactExponentFactor_ASC_NULLS_FIRST = "positionImpactExponentFactor_ASC_NULLS_FIRST", - positionImpactExponentFactor_ASC_NULLS_LAST = "positionImpactExponentFactor_ASC_NULLS_LAST", - positionImpactExponentFactor_DESC = "positionImpactExponentFactor_DESC", - positionImpactExponentFactor_DESC_NULLS_FIRST = "positionImpactExponentFactor_DESC_NULLS_FIRST", - positionImpactExponentFactor_DESC_NULLS_LAST = "positionImpactExponentFactor_DESC_NULLS_LAST", + positionImpactExponentFactorNegative_ASC = "positionImpactExponentFactorNegative_ASC", + positionImpactExponentFactorNegative_ASC_NULLS_FIRST = "positionImpactExponentFactorNegative_ASC_NULLS_FIRST", + positionImpactExponentFactorNegative_ASC_NULLS_LAST = "positionImpactExponentFactorNegative_ASC_NULLS_LAST", + positionImpactExponentFactorNegative_DESC = "positionImpactExponentFactorNegative_DESC", + positionImpactExponentFactorNegative_DESC_NULLS_FIRST = "positionImpactExponentFactorNegative_DESC_NULLS_FIRST", + positionImpactExponentFactorNegative_DESC_NULLS_LAST = "positionImpactExponentFactorNegative_DESC_NULLS_LAST", + positionImpactExponentFactorPositive_ASC = "positionImpactExponentFactorPositive_ASC", + positionImpactExponentFactorPositive_ASC_NULLS_FIRST = "positionImpactExponentFactorPositive_ASC_NULLS_FIRST", + positionImpactExponentFactorPositive_ASC_NULLS_LAST = "positionImpactExponentFactorPositive_ASC_NULLS_LAST", + positionImpactExponentFactorPositive_DESC = "positionImpactExponentFactorPositive_DESC", + positionImpactExponentFactorPositive_DESC_NULLS_FIRST = "positionImpactExponentFactorPositive_DESC_NULLS_FIRST", + positionImpactExponentFactorPositive_DESC_NULLS_LAST = "positionImpactExponentFactorPositive_DESC_NULLS_LAST", positionImpactFactorNegative_ASC = "positionImpactFactorNegative_ASC", positionImpactFactorNegative_ASC_NULLS_FIRST = "positionImpactFactorNegative_ASC_NULLS_FIRST", positionImpactFactorNegative_ASC_NULLS_LAST = "positionImpactFactorNegative_ASC_NULLS_LAST", @@ -2862,12 +3016,6 @@ export enum MarketInfoOrderByInput { shortOpenInterestUsingShortToken_DESC = "shortOpenInterestUsingShortToken_DESC", shortOpenInterestUsingShortToken_DESC_NULLS_FIRST = "shortOpenInterestUsingShortToken_DESC_NULLS_FIRST", shortOpenInterestUsingShortToken_DESC_NULLS_LAST = "shortOpenInterestUsingShortToken_DESC_NULLS_LAST", - shortPoolAmountAdjustment_ASC = "shortPoolAmountAdjustment_ASC", - shortPoolAmountAdjustment_ASC_NULLS_FIRST = "shortPoolAmountAdjustment_ASC_NULLS_FIRST", - shortPoolAmountAdjustment_ASC_NULLS_LAST = "shortPoolAmountAdjustment_ASC_NULLS_LAST", - shortPoolAmountAdjustment_DESC = "shortPoolAmountAdjustment_DESC", - shortPoolAmountAdjustment_DESC_NULLS_FIRST = "shortPoolAmountAdjustment_DESC_NULLS_FIRST", - shortPoolAmountAdjustment_DESC_NULLS_LAST = "shortPoolAmountAdjustment_DESC_NULLS_LAST", shortPoolAmount_ASC = "shortPoolAmount_ASC", shortPoolAmount_ASC_NULLS_FIRST = "shortPoolAmount_ASC_NULLS_FIRST", shortPoolAmount_ASC_NULLS_LAST = "shortPoolAmount_ASC_NULLS_LAST", @@ -3231,15 +3379,6 @@ export interface MarketInfoWhereInput { longOpenInterestUsingShortToken_lte?: InputMaybe; longOpenInterestUsingShortToken_not_eq?: InputMaybe; longOpenInterestUsingShortToken_not_in?: InputMaybe>; - longPoolAmountAdjustment_eq?: InputMaybe; - longPoolAmountAdjustment_gt?: InputMaybe; - longPoolAmountAdjustment_gte?: InputMaybe; - longPoolAmountAdjustment_in?: InputMaybe>; - longPoolAmountAdjustment_isNull?: InputMaybe; - longPoolAmountAdjustment_lt?: InputMaybe; - longPoolAmountAdjustment_lte?: InputMaybe; - longPoolAmountAdjustment_not_eq?: InputMaybe; - longPoolAmountAdjustment_not_in?: InputMaybe>; longPoolAmount_eq?: InputMaybe; longPoolAmount_gt?: InputMaybe; longPoolAmount_gte?: InputMaybe; @@ -3556,15 +3695,24 @@ export interface MarketInfoWhereInput { positionFeeFactorForPositiveImpact_lte?: InputMaybe; positionFeeFactorForPositiveImpact_not_eq?: InputMaybe; positionFeeFactorForPositiveImpact_not_in?: InputMaybe>; - positionImpactExponentFactor_eq?: InputMaybe; - positionImpactExponentFactor_gt?: InputMaybe; - positionImpactExponentFactor_gte?: InputMaybe; - positionImpactExponentFactor_in?: InputMaybe>; - positionImpactExponentFactor_isNull?: InputMaybe; - positionImpactExponentFactor_lt?: InputMaybe; - positionImpactExponentFactor_lte?: InputMaybe; - positionImpactExponentFactor_not_eq?: InputMaybe; - positionImpactExponentFactor_not_in?: InputMaybe>; + positionImpactExponentFactorNegative_eq?: InputMaybe; + positionImpactExponentFactorNegative_gt?: InputMaybe; + positionImpactExponentFactorNegative_gte?: InputMaybe; + positionImpactExponentFactorNegative_in?: InputMaybe>; + positionImpactExponentFactorNegative_isNull?: InputMaybe; + positionImpactExponentFactorNegative_lt?: InputMaybe; + positionImpactExponentFactorNegative_lte?: InputMaybe; + positionImpactExponentFactorNegative_not_eq?: InputMaybe; + positionImpactExponentFactorNegative_not_in?: InputMaybe>; + positionImpactExponentFactorPositive_eq?: InputMaybe; + positionImpactExponentFactorPositive_gt?: InputMaybe; + positionImpactExponentFactorPositive_gte?: InputMaybe; + positionImpactExponentFactorPositive_in?: InputMaybe>; + positionImpactExponentFactorPositive_isNull?: InputMaybe; + positionImpactExponentFactorPositive_lt?: InputMaybe; + positionImpactExponentFactorPositive_lte?: InputMaybe; + positionImpactExponentFactorPositive_not_eq?: InputMaybe; + positionImpactExponentFactorPositive_not_in?: InputMaybe>; positionImpactFactorNegative_eq?: InputMaybe; positionImpactFactorNegative_gt?: InputMaybe; positionImpactFactorNegative_gte?: InputMaybe; @@ -3673,15 +3821,6 @@ export interface MarketInfoWhereInput { shortOpenInterestUsingShortToken_lte?: InputMaybe; shortOpenInterestUsingShortToken_not_eq?: InputMaybe; shortOpenInterestUsingShortToken_not_in?: InputMaybe>; - shortPoolAmountAdjustment_eq?: InputMaybe; - shortPoolAmountAdjustment_gt?: InputMaybe; - shortPoolAmountAdjustment_gte?: InputMaybe; - shortPoolAmountAdjustment_in?: InputMaybe>; - shortPoolAmountAdjustment_isNull?: InputMaybe; - shortPoolAmountAdjustment_lt?: InputMaybe; - shortPoolAmountAdjustment_lte?: InputMaybe; - shortPoolAmountAdjustment_not_eq?: InputMaybe; - shortPoolAmountAdjustment_not_in?: InputMaybe>; shortPoolAmount_eq?: InputMaybe; shortPoolAmount_gt?: InputMaybe; shortPoolAmount_gte?: InputMaybe; @@ -4054,13 +4193,15 @@ export enum MultichainFundingOperation { export interface MultichainFundingReceiveEvent { __typename?: "MultichainFundingReceiveEvent"; - deliveredTxn?: Maybe; + deliveredTimestamp?: Maybe; + deliveredTxn?: Maybe; id: Scalars["String"]["output"]; isDeliveryError?: Maybe; isUncertain: Scalars["Boolean"]["output"]; operation: MultichainFundingOperation; receivedAmount: Scalars["BigInt"]["output"]; - receivedTxn: Transaction; + receivedTimestamp: Scalars["Int"]["output"]; + receivedTxn: Scalars["String"]["output"]; sourceChainId: Scalars["Int"]["output"]; } @@ -4071,54 +4212,18 @@ export interface MultichainFundingReceiveEventEdge { } export enum MultichainFundingReceiveEventOrderByInput { - deliveredTxn_blockNumber_ASC = "deliveredTxn_blockNumber_ASC", - deliveredTxn_blockNumber_ASC_NULLS_FIRST = "deliveredTxn_blockNumber_ASC_NULLS_FIRST", - deliveredTxn_blockNumber_ASC_NULLS_LAST = "deliveredTxn_blockNumber_ASC_NULLS_LAST", - deliveredTxn_blockNumber_DESC = "deliveredTxn_blockNumber_DESC", - deliveredTxn_blockNumber_DESC_NULLS_FIRST = "deliveredTxn_blockNumber_DESC_NULLS_FIRST", - deliveredTxn_blockNumber_DESC_NULLS_LAST = "deliveredTxn_blockNumber_DESC_NULLS_LAST", - deliveredTxn_chainId_ASC = "deliveredTxn_chainId_ASC", - deliveredTxn_chainId_ASC_NULLS_FIRST = "deliveredTxn_chainId_ASC_NULLS_FIRST", - deliveredTxn_chainId_ASC_NULLS_LAST = "deliveredTxn_chainId_ASC_NULLS_LAST", - deliveredTxn_chainId_DESC = "deliveredTxn_chainId_DESC", - deliveredTxn_chainId_DESC_NULLS_FIRST = "deliveredTxn_chainId_DESC_NULLS_FIRST", - deliveredTxn_chainId_DESC_NULLS_LAST = "deliveredTxn_chainId_DESC_NULLS_LAST", - deliveredTxn_from_ASC = "deliveredTxn_from_ASC", - deliveredTxn_from_ASC_NULLS_FIRST = "deliveredTxn_from_ASC_NULLS_FIRST", - deliveredTxn_from_ASC_NULLS_LAST = "deliveredTxn_from_ASC_NULLS_LAST", - deliveredTxn_from_DESC = "deliveredTxn_from_DESC", - deliveredTxn_from_DESC_NULLS_FIRST = "deliveredTxn_from_DESC_NULLS_FIRST", - deliveredTxn_from_DESC_NULLS_LAST = "deliveredTxn_from_DESC_NULLS_LAST", - deliveredTxn_hash_ASC = "deliveredTxn_hash_ASC", - deliveredTxn_hash_ASC_NULLS_FIRST = "deliveredTxn_hash_ASC_NULLS_FIRST", - deliveredTxn_hash_ASC_NULLS_LAST = "deliveredTxn_hash_ASC_NULLS_LAST", - deliveredTxn_hash_DESC = "deliveredTxn_hash_DESC", - deliveredTxn_hash_DESC_NULLS_FIRST = "deliveredTxn_hash_DESC_NULLS_FIRST", - deliveredTxn_hash_DESC_NULLS_LAST = "deliveredTxn_hash_DESC_NULLS_LAST", - deliveredTxn_id_ASC = "deliveredTxn_id_ASC", - deliveredTxn_id_ASC_NULLS_FIRST = "deliveredTxn_id_ASC_NULLS_FIRST", - deliveredTxn_id_ASC_NULLS_LAST = "deliveredTxn_id_ASC_NULLS_LAST", - deliveredTxn_id_DESC = "deliveredTxn_id_DESC", - deliveredTxn_id_DESC_NULLS_FIRST = "deliveredTxn_id_DESC_NULLS_FIRST", - deliveredTxn_id_DESC_NULLS_LAST = "deliveredTxn_id_DESC_NULLS_LAST", - deliveredTxn_timestamp_ASC = "deliveredTxn_timestamp_ASC", - deliveredTxn_timestamp_ASC_NULLS_FIRST = "deliveredTxn_timestamp_ASC_NULLS_FIRST", - deliveredTxn_timestamp_ASC_NULLS_LAST = "deliveredTxn_timestamp_ASC_NULLS_LAST", - deliveredTxn_timestamp_DESC = "deliveredTxn_timestamp_DESC", - deliveredTxn_timestamp_DESC_NULLS_FIRST = "deliveredTxn_timestamp_DESC_NULLS_FIRST", - deliveredTxn_timestamp_DESC_NULLS_LAST = "deliveredTxn_timestamp_DESC_NULLS_LAST", - deliveredTxn_to_ASC = "deliveredTxn_to_ASC", - deliveredTxn_to_ASC_NULLS_FIRST = "deliveredTxn_to_ASC_NULLS_FIRST", - deliveredTxn_to_ASC_NULLS_LAST = "deliveredTxn_to_ASC_NULLS_LAST", - deliveredTxn_to_DESC = "deliveredTxn_to_DESC", - deliveredTxn_to_DESC_NULLS_FIRST = "deliveredTxn_to_DESC_NULLS_FIRST", - deliveredTxn_to_DESC_NULLS_LAST = "deliveredTxn_to_DESC_NULLS_LAST", - deliveredTxn_transactionIndex_ASC = "deliveredTxn_transactionIndex_ASC", - deliveredTxn_transactionIndex_ASC_NULLS_FIRST = "deliveredTxn_transactionIndex_ASC_NULLS_FIRST", - deliveredTxn_transactionIndex_ASC_NULLS_LAST = "deliveredTxn_transactionIndex_ASC_NULLS_LAST", - deliveredTxn_transactionIndex_DESC = "deliveredTxn_transactionIndex_DESC", - deliveredTxn_transactionIndex_DESC_NULLS_FIRST = "deliveredTxn_transactionIndex_DESC_NULLS_FIRST", - deliveredTxn_transactionIndex_DESC_NULLS_LAST = "deliveredTxn_transactionIndex_DESC_NULLS_LAST", + deliveredTimestamp_ASC = "deliveredTimestamp_ASC", + deliveredTimestamp_ASC_NULLS_FIRST = "deliveredTimestamp_ASC_NULLS_FIRST", + deliveredTimestamp_ASC_NULLS_LAST = "deliveredTimestamp_ASC_NULLS_LAST", + deliveredTimestamp_DESC = "deliveredTimestamp_DESC", + deliveredTimestamp_DESC_NULLS_FIRST = "deliveredTimestamp_DESC_NULLS_FIRST", + deliveredTimestamp_DESC_NULLS_LAST = "deliveredTimestamp_DESC_NULLS_LAST", + deliveredTxn_ASC = "deliveredTxn_ASC", + deliveredTxn_ASC_NULLS_FIRST = "deliveredTxn_ASC_NULLS_FIRST", + deliveredTxn_ASC_NULLS_LAST = "deliveredTxn_ASC_NULLS_LAST", + deliveredTxn_DESC = "deliveredTxn_DESC", + deliveredTxn_DESC_NULLS_FIRST = "deliveredTxn_DESC_NULLS_FIRST", + deliveredTxn_DESC_NULLS_LAST = "deliveredTxn_DESC_NULLS_LAST", id_ASC = "id_ASC", id_ASC_NULLS_FIRST = "id_ASC_NULLS_FIRST", id_ASC_NULLS_LAST = "id_ASC_NULLS_LAST", @@ -4149,54 +4254,18 @@ export enum MultichainFundingReceiveEventOrderByInput { receivedAmount_DESC = "receivedAmount_DESC", receivedAmount_DESC_NULLS_FIRST = "receivedAmount_DESC_NULLS_FIRST", receivedAmount_DESC_NULLS_LAST = "receivedAmount_DESC_NULLS_LAST", - receivedTxn_blockNumber_ASC = "receivedTxn_blockNumber_ASC", - receivedTxn_blockNumber_ASC_NULLS_FIRST = "receivedTxn_blockNumber_ASC_NULLS_FIRST", - receivedTxn_blockNumber_ASC_NULLS_LAST = "receivedTxn_blockNumber_ASC_NULLS_LAST", - receivedTxn_blockNumber_DESC = "receivedTxn_blockNumber_DESC", - receivedTxn_blockNumber_DESC_NULLS_FIRST = "receivedTxn_blockNumber_DESC_NULLS_FIRST", - receivedTxn_blockNumber_DESC_NULLS_LAST = "receivedTxn_blockNumber_DESC_NULLS_LAST", - receivedTxn_chainId_ASC = "receivedTxn_chainId_ASC", - receivedTxn_chainId_ASC_NULLS_FIRST = "receivedTxn_chainId_ASC_NULLS_FIRST", - receivedTxn_chainId_ASC_NULLS_LAST = "receivedTxn_chainId_ASC_NULLS_LAST", - receivedTxn_chainId_DESC = "receivedTxn_chainId_DESC", - receivedTxn_chainId_DESC_NULLS_FIRST = "receivedTxn_chainId_DESC_NULLS_FIRST", - receivedTxn_chainId_DESC_NULLS_LAST = "receivedTxn_chainId_DESC_NULLS_LAST", - receivedTxn_from_ASC = "receivedTxn_from_ASC", - receivedTxn_from_ASC_NULLS_FIRST = "receivedTxn_from_ASC_NULLS_FIRST", - receivedTxn_from_ASC_NULLS_LAST = "receivedTxn_from_ASC_NULLS_LAST", - receivedTxn_from_DESC = "receivedTxn_from_DESC", - receivedTxn_from_DESC_NULLS_FIRST = "receivedTxn_from_DESC_NULLS_FIRST", - receivedTxn_from_DESC_NULLS_LAST = "receivedTxn_from_DESC_NULLS_LAST", - receivedTxn_hash_ASC = "receivedTxn_hash_ASC", - receivedTxn_hash_ASC_NULLS_FIRST = "receivedTxn_hash_ASC_NULLS_FIRST", - receivedTxn_hash_ASC_NULLS_LAST = "receivedTxn_hash_ASC_NULLS_LAST", - receivedTxn_hash_DESC = "receivedTxn_hash_DESC", - receivedTxn_hash_DESC_NULLS_FIRST = "receivedTxn_hash_DESC_NULLS_FIRST", - receivedTxn_hash_DESC_NULLS_LAST = "receivedTxn_hash_DESC_NULLS_LAST", - receivedTxn_id_ASC = "receivedTxn_id_ASC", - receivedTxn_id_ASC_NULLS_FIRST = "receivedTxn_id_ASC_NULLS_FIRST", - receivedTxn_id_ASC_NULLS_LAST = "receivedTxn_id_ASC_NULLS_LAST", - receivedTxn_id_DESC = "receivedTxn_id_DESC", - receivedTxn_id_DESC_NULLS_FIRST = "receivedTxn_id_DESC_NULLS_FIRST", - receivedTxn_id_DESC_NULLS_LAST = "receivedTxn_id_DESC_NULLS_LAST", - receivedTxn_timestamp_ASC = "receivedTxn_timestamp_ASC", - receivedTxn_timestamp_ASC_NULLS_FIRST = "receivedTxn_timestamp_ASC_NULLS_FIRST", - receivedTxn_timestamp_ASC_NULLS_LAST = "receivedTxn_timestamp_ASC_NULLS_LAST", - receivedTxn_timestamp_DESC = "receivedTxn_timestamp_DESC", - receivedTxn_timestamp_DESC_NULLS_FIRST = "receivedTxn_timestamp_DESC_NULLS_FIRST", - receivedTxn_timestamp_DESC_NULLS_LAST = "receivedTxn_timestamp_DESC_NULLS_LAST", - receivedTxn_to_ASC = "receivedTxn_to_ASC", - receivedTxn_to_ASC_NULLS_FIRST = "receivedTxn_to_ASC_NULLS_FIRST", - receivedTxn_to_ASC_NULLS_LAST = "receivedTxn_to_ASC_NULLS_LAST", - receivedTxn_to_DESC = "receivedTxn_to_DESC", - receivedTxn_to_DESC_NULLS_FIRST = "receivedTxn_to_DESC_NULLS_FIRST", - receivedTxn_to_DESC_NULLS_LAST = "receivedTxn_to_DESC_NULLS_LAST", - receivedTxn_transactionIndex_ASC = "receivedTxn_transactionIndex_ASC", - receivedTxn_transactionIndex_ASC_NULLS_FIRST = "receivedTxn_transactionIndex_ASC_NULLS_FIRST", - receivedTxn_transactionIndex_ASC_NULLS_LAST = "receivedTxn_transactionIndex_ASC_NULLS_LAST", - receivedTxn_transactionIndex_DESC = "receivedTxn_transactionIndex_DESC", - receivedTxn_transactionIndex_DESC_NULLS_FIRST = "receivedTxn_transactionIndex_DESC_NULLS_FIRST", - receivedTxn_transactionIndex_DESC_NULLS_LAST = "receivedTxn_transactionIndex_DESC_NULLS_LAST", + receivedTimestamp_ASC = "receivedTimestamp_ASC", + receivedTimestamp_ASC_NULLS_FIRST = "receivedTimestamp_ASC_NULLS_FIRST", + receivedTimestamp_ASC_NULLS_LAST = "receivedTimestamp_ASC_NULLS_LAST", + receivedTimestamp_DESC = "receivedTimestamp_DESC", + receivedTimestamp_DESC_NULLS_FIRST = "receivedTimestamp_DESC_NULLS_FIRST", + receivedTimestamp_DESC_NULLS_LAST = "receivedTimestamp_DESC_NULLS_LAST", + receivedTxn_ASC = "receivedTxn_ASC", + receivedTxn_ASC_NULLS_FIRST = "receivedTxn_ASC_NULLS_FIRST", + receivedTxn_ASC_NULLS_LAST = "receivedTxn_ASC_NULLS_LAST", + receivedTxn_DESC = "receivedTxn_DESC", + receivedTxn_DESC_NULLS_FIRST = "receivedTxn_DESC_NULLS_FIRST", + receivedTxn_DESC_NULLS_LAST = "receivedTxn_DESC_NULLS_LAST", sourceChainId_ASC = "sourceChainId_ASC", sourceChainId_ASC_NULLS_FIRST = "sourceChainId_ASC_NULLS_FIRST", sourceChainId_ASC_NULLS_LAST = "sourceChainId_ASC_NULLS_LAST", @@ -4208,8 +4277,32 @@ export enum MultichainFundingReceiveEventOrderByInput { export interface MultichainFundingReceiveEventWhereInput { AND?: InputMaybe>; OR?: InputMaybe>; - deliveredTxn?: InputMaybe; + deliveredTimestamp_eq?: InputMaybe; + deliveredTimestamp_gt?: InputMaybe; + deliveredTimestamp_gte?: InputMaybe; + deliveredTimestamp_in?: InputMaybe>; + deliveredTimestamp_isNull?: InputMaybe; + deliveredTimestamp_lt?: InputMaybe; + deliveredTimestamp_lte?: InputMaybe; + deliveredTimestamp_not_eq?: InputMaybe; + deliveredTimestamp_not_in?: InputMaybe>; + deliveredTxn_contains?: InputMaybe; + deliveredTxn_containsInsensitive?: InputMaybe; + deliveredTxn_endsWith?: InputMaybe; + deliveredTxn_eq?: InputMaybe; + deliveredTxn_gt?: InputMaybe; + deliveredTxn_gte?: InputMaybe; + deliveredTxn_in?: InputMaybe>; deliveredTxn_isNull?: InputMaybe; + deliveredTxn_lt?: InputMaybe; + deliveredTxn_lte?: InputMaybe; + deliveredTxn_not_contains?: InputMaybe; + deliveredTxn_not_containsInsensitive?: InputMaybe; + deliveredTxn_not_endsWith?: InputMaybe; + deliveredTxn_not_eq?: InputMaybe; + deliveredTxn_not_in?: InputMaybe>; + deliveredTxn_not_startsWith?: InputMaybe; + deliveredTxn_startsWith?: InputMaybe; id_contains?: InputMaybe; id_containsInsensitive?: InputMaybe; id_endsWith?: InputMaybe; @@ -4247,8 +4340,32 @@ export interface MultichainFundingReceiveEventWhereInput { receivedAmount_lte?: InputMaybe; receivedAmount_not_eq?: InputMaybe; receivedAmount_not_in?: InputMaybe>; - receivedTxn?: InputMaybe; + receivedTimestamp_eq?: InputMaybe; + receivedTimestamp_gt?: InputMaybe; + receivedTimestamp_gte?: InputMaybe; + receivedTimestamp_in?: InputMaybe>; + receivedTimestamp_isNull?: InputMaybe; + receivedTimestamp_lt?: InputMaybe; + receivedTimestamp_lte?: InputMaybe; + receivedTimestamp_not_eq?: InputMaybe; + receivedTimestamp_not_in?: InputMaybe>; + receivedTxn_contains?: InputMaybe; + receivedTxn_containsInsensitive?: InputMaybe; + receivedTxn_endsWith?: InputMaybe; + receivedTxn_eq?: InputMaybe; + receivedTxn_gt?: InputMaybe; + receivedTxn_gte?: InputMaybe; + receivedTxn_in?: InputMaybe>; receivedTxn_isNull?: InputMaybe; + receivedTxn_lt?: InputMaybe; + receivedTxn_lte?: InputMaybe; + receivedTxn_not_contains?: InputMaybe; + receivedTxn_not_containsInsensitive?: InputMaybe; + receivedTxn_not_endsWith?: InputMaybe; + receivedTxn_not_eq?: InputMaybe; + receivedTxn_not_in?: InputMaybe>; + receivedTxn_not_startsWith?: InputMaybe; + receivedTxn_startsWith?: InputMaybe; sourceChainId_eq?: InputMaybe; sourceChainId_gt?: InputMaybe; sourceChainId_gte?: InputMaybe; @@ -4276,8 +4393,9 @@ export interface MultichainFundingSendEvent { sentAmount: Scalars["BigInt"]["output"]; settlementChainId: Scalars["Int"]["output"]; sourceChainId: Scalars["Int"]["output"]; + timestamp: Scalars["Int"]["output"]; token: Scalars["String"]["output"]; - txn: Transaction; + txn: Scalars["String"]["output"]; } export interface MultichainFundingSendEventEdge { @@ -4329,60 +4447,24 @@ export enum MultichainFundingSendEventOrderByInput { sourceChainId_DESC = "sourceChainId_DESC", sourceChainId_DESC_NULLS_FIRST = "sourceChainId_DESC_NULLS_FIRST", sourceChainId_DESC_NULLS_LAST = "sourceChainId_DESC_NULLS_LAST", + timestamp_ASC = "timestamp_ASC", + timestamp_ASC_NULLS_FIRST = "timestamp_ASC_NULLS_FIRST", + timestamp_ASC_NULLS_LAST = "timestamp_ASC_NULLS_LAST", + timestamp_DESC = "timestamp_DESC", + timestamp_DESC_NULLS_FIRST = "timestamp_DESC_NULLS_FIRST", + timestamp_DESC_NULLS_LAST = "timestamp_DESC_NULLS_LAST", token_ASC = "token_ASC", token_ASC_NULLS_FIRST = "token_ASC_NULLS_FIRST", token_ASC_NULLS_LAST = "token_ASC_NULLS_LAST", token_DESC = "token_DESC", token_DESC_NULLS_FIRST = "token_DESC_NULLS_FIRST", token_DESC_NULLS_LAST = "token_DESC_NULLS_LAST", - txn_blockNumber_ASC = "txn_blockNumber_ASC", - txn_blockNumber_ASC_NULLS_FIRST = "txn_blockNumber_ASC_NULLS_FIRST", - txn_blockNumber_ASC_NULLS_LAST = "txn_blockNumber_ASC_NULLS_LAST", - txn_blockNumber_DESC = "txn_blockNumber_DESC", - txn_blockNumber_DESC_NULLS_FIRST = "txn_blockNumber_DESC_NULLS_FIRST", - txn_blockNumber_DESC_NULLS_LAST = "txn_blockNumber_DESC_NULLS_LAST", - txn_chainId_ASC = "txn_chainId_ASC", - txn_chainId_ASC_NULLS_FIRST = "txn_chainId_ASC_NULLS_FIRST", - txn_chainId_ASC_NULLS_LAST = "txn_chainId_ASC_NULLS_LAST", - txn_chainId_DESC = "txn_chainId_DESC", - txn_chainId_DESC_NULLS_FIRST = "txn_chainId_DESC_NULLS_FIRST", - txn_chainId_DESC_NULLS_LAST = "txn_chainId_DESC_NULLS_LAST", - txn_from_ASC = "txn_from_ASC", - txn_from_ASC_NULLS_FIRST = "txn_from_ASC_NULLS_FIRST", - txn_from_ASC_NULLS_LAST = "txn_from_ASC_NULLS_LAST", - txn_from_DESC = "txn_from_DESC", - txn_from_DESC_NULLS_FIRST = "txn_from_DESC_NULLS_FIRST", - txn_from_DESC_NULLS_LAST = "txn_from_DESC_NULLS_LAST", - txn_hash_ASC = "txn_hash_ASC", - txn_hash_ASC_NULLS_FIRST = "txn_hash_ASC_NULLS_FIRST", - txn_hash_ASC_NULLS_LAST = "txn_hash_ASC_NULLS_LAST", - txn_hash_DESC = "txn_hash_DESC", - txn_hash_DESC_NULLS_FIRST = "txn_hash_DESC_NULLS_FIRST", - txn_hash_DESC_NULLS_LAST = "txn_hash_DESC_NULLS_LAST", - txn_id_ASC = "txn_id_ASC", - txn_id_ASC_NULLS_FIRST = "txn_id_ASC_NULLS_FIRST", - txn_id_ASC_NULLS_LAST = "txn_id_ASC_NULLS_LAST", - txn_id_DESC = "txn_id_DESC", - txn_id_DESC_NULLS_FIRST = "txn_id_DESC_NULLS_FIRST", - txn_id_DESC_NULLS_LAST = "txn_id_DESC_NULLS_LAST", - txn_timestamp_ASC = "txn_timestamp_ASC", - txn_timestamp_ASC_NULLS_FIRST = "txn_timestamp_ASC_NULLS_FIRST", - txn_timestamp_ASC_NULLS_LAST = "txn_timestamp_ASC_NULLS_LAST", - txn_timestamp_DESC = "txn_timestamp_DESC", - txn_timestamp_DESC_NULLS_FIRST = "txn_timestamp_DESC_NULLS_FIRST", - txn_timestamp_DESC_NULLS_LAST = "txn_timestamp_DESC_NULLS_LAST", - txn_to_ASC = "txn_to_ASC", - txn_to_ASC_NULLS_FIRST = "txn_to_ASC_NULLS_FIRST", - txn_to_ASC_NULLS_LAST = "txn_to_ASC_NULLS_LAST", - txn_to_DESC = "txn_to_DESC", - txn_to_DESC_NULLS_FIRST = "txn_to_DESC_NULLS_FIRST", - txn_to_DESC_NULLS_LAST = "txn_to_DESC_NULLS_LAST", - txn_transactionIndex_ASC = "txn_transactionIndex_ASC", - txn_transactionIndex_ASC_NULLS_FIRST = "txn_transactionIndex_ASC_NULLS_FIRST", - txn_transactionIndex_ASC_NULLS_LAST = "txn_transactionIndex_ASC_NULLS_LAST", - txn_transactionIndex_DESC = "txn_transactionIndex_DESC", - txn_transactionIndex_DESC_NULLS_FIRST = "txn_transactionIndex_DESC_NULLS_FIRST", - txn_transactionIndex_DESC_NULLS_LAST = "txn_transactionIndex_DESC_NULLS_LAST", + txn_ASC = "txn_ASC", + txn_ASC_NULLS_FIRST = "txn_ASC_NULLS_FIRST", + txn_ASC_NULLS_LAST = "txn_ASC_NULLS_LAST", + txn_DESC = "txn_DESC", + txn_DESC_NULLS_FIRST = "txn_DESC_NULLS_FIRST", + txn_DESC_NULLS_LAST = "txn_DESC_NULLS_LAST", } export interface MultichainFundingSendEventWhereInput { @@ -4463,6 +4545,15 @@ export interface MultichainFundingSendEventWhereInput { sourceChainId_lte?: InputMaybe; sourceChainId_not_eq?: InputMaybe; sourceChainId_not_in?: InputMaybe>; + timestamp_eq?: InputMaybe; + timestamp_gt?: InputMaybe; + timestamp_gte?: InputMaybe; + timestamp_in?: InputMaybe>; + timestamp_isNull?: InputMaybe; + timestamp_lt?: InputMaybe; + timestamp_lte?: InputMaybe; + timestamp_not_eq?: InputMaybe; + timestamp_not_in?: InputMaybe>; token_contains?: InputMaybe; token_containsInsensitive?: InputMaybe; token_endsWith?: InputMaybe; @@ -4480,8 +4571,23 @@ export interface MultichainFundingSendEventWhereInput { token_not_in?: InputMaybe>; token_not_startsWith?: InputMaybe; token_startsWith?: InputMaybe; - txn?: InputMaybe; + txn_contains?: InputMaybe; + txn_containsInsensitive?: InputMaybe; + txn_endsWith?: InputMaybe; + txn_eq?: InputMaybe; + txn_gt?: InputMaybe; + txn_gte?: InputMaybe; + txn_in?: InputMaybe>; txn_isNull?: InputMaybe; + txn_lt?: InputMaybe; + txn_lte?: InputMaybe; + txn_not_contains?: InputMaybe; + txn_not_containsInsensitive?: InputMaybe; + txn_not_endsWith?: InputMaybe; + txn_not_eq?: InputMaybe; + txn_not_in?: InputMaybe>; + txn_not_startsWith?: InputMaybe; + txn_startsWith?: InputMaybe; } export interface MultichainFundingSendEventsConnection { @@ -4494,6 +4600,7 @@ export interface MultichainFundingSendEventsConnection { export interface MultichainFundingWhereInput { account?: InputMaybe; id?: InputMaybe; + sourceChainId?: InputMaybe; } export interface MultichainMetadata { @@ -4703,6 +4810,7 @@ export interface Order { cancelledReasonBytes?: Maybe; cancelledTxn?: Maybe; createdTxn: Transaction; + decreasePositionSwapType: Scalars["Int"]["output"]; executedTxn?: Maybe; executionFee: Scalars["BigInt"]["output"]; frozenReason?: Maybe; @@ -4776,12 +4884,6 @@ export enum OrderOrderByInput { cancelledTxn_blockNumber_DESC = "cancelledTxn_blockNumber_DESC", cancelledTxn_blockNumber_DESC_NULLS_FIRST = "cancelledTxn_blockNumber_DESC_NULLS_FIRST", cancelledTxn_blockNumber_DESC_NULLS_LAST = "cancelledTxn_blockNumber_DESC_NULLS_LAST", - cancelledTxn_chainId_ASC = "cancelledTxn_chainId_ASC", - cancelledTxn_chainId_ASC_NULLS_FIRST = "cancelledTxn_chainId_ASC_NULLS_FIRST", - cancelledTxn_chainId_ASC_NULLS_LAST = "cancelledTxn_chainId_ASC_NULLS_LAST", - cancelledTxn_chainId_DESC = "cancelledTxn_chainId_DESC", - cancelledTxn_chainId_DESC_NULLS_FIRST = "cancelledTxn_chainId_DESC_NULLS_FIRST", - cancelledTxn_chainId_DESC_NULLS_LAST = "cancelledTxn_chainId_DESC_NULLS_LAST", cancelledTxn_from_ASC = "cancelledTxn_from_ASC", cancelledTxn_from_ASC_NULLS_FIRST = "cancelledTxn_from_ASC_NULLS_FIRST", cancelledTxn_from_ASC_NULLS_LAST = "cancelledTxn_from_ASC_NULLS_LAST", @@ -4824,12 +4926,6 @@ export enum OrderOrderByInput { createdTxn_blockNumber_DESC = "createdTxn_blockNumber_DESC", createdTxn_blockNumber_DESC_NULLS_FIRST = "createdTxn_blockNumber_DESC_NULLS_FIRST", createdTxn_blockNumber_DESC_NULLS_LAST = "createdTxn_blockNumber_DESC_NULLS_LAST", - createdTxn_chainId_ASC = "createdTxn_chainId_ASC", - createdTxn_chainId_ASC_NULLS_FIRST = "createdTxn_chainId_ASC_NULLS_FIRST", - createdTxn_chainId_ASC_NULLS_LAST = "createdTxn_chainId_ASC_NULLS_LAST", - createdTxn_chainId_DESC = "createdTxn_chainId_DESC", - createdTxn_chainId_DESC_NULLS_FIRST = "createdTxn_chainId_DESC_NULLS_FIRST", - createdTxn_chainId_DESC_NULLS_LAST = "createdTxn_chainId_DESC_NULLS_LAST", createdTxn_from_ASC = "createdTxn_from_ASC", createdTxn_from_ASC_NULLS_FIRST = "createdTxn_from_ASC_NULLS_FIRST", createdTxn_from_ASC_NULLS_LAST = "createdTxn_from_ASC_NULLS_LAST", @@ -4866,18 +4962,18 @@ export enum OrderOrderByInput { createdTxn_transactionIndex_DESC = "createdTxn_transactionIndex_DESC", createdTxn_transactionIndex_DESC_NULLS_FIRST = "createdTxn_transactionIndex_DESC_NULLS_FIRST", createdTxn_transactionIndex_DESC_NULLS_LAST = "createdTxn_transactionIndex_DESC_NULLS_LAST", + decreasePositionSwapType_ASC = "decreasePositionSwapType_ASC", + decreasePositionSwapType_ASC_NULLS_FIRST = "decreasePositionSwapType_ASC_NULLS_FIRST", + decreasePositionSwapType_ASC_NULLS_LAST = "decreasePositionSwapType_ASC_NULLS_LAST", + decreasePositionSwapType_DESC = "decreasePositionSwapType_DESC", + decreasePositionSwapType_DESC_NULLS_FIRST = "decreasePositionSwapType_DESC_NULLS_FIRST", + decreasePositionSwapType_DESC_NULLS_LAST = "decreasePositionSwapType_DESC_NULLS_LAST", executedTxn_blockNumber_ASC = "executedTxn_blockNumber_ASC", executedTxn_blockNumber_ASC_NULLS_FIRST = "executedTxn_blockNumber_ASC_NULLS_FIRST", executedTxn_blockNumber_ASC_NULLS_LAST = "executedTxn_blockNumber_ASC_NULLS_LAST", executedTxn_blockNumber_DESC = "executedTxn_blockNumber_DESC", executedTxn_blockNumber_DESC_NULLS_FIRST = "executedTxn_blockNumber_DESC_NULLS_FIRST", executedTxn_blockNumber_DESC_NULLS_LAST = "executedTxn_blockNumber_DESC_NULLS_LAST", - executedTxn_chainId_ASC = "executedTxn_chainId_ASC", - executedTxn_chainId_ASC_NULLS_FIRST = "executedTxn_chainId_ASC_NULLS_FIRST", - executedTxn_chainId_ASC_NULLS_LAST = "executedTxn_chainId_ASC_NULLS_LAST", - executedTxn_chainId_DESC = "executedTxn_chainId_DESC", - executedTxn_chainId_DESC_NULLS_FIRST = "executedTxn_chainId_DESC_NULLS_FIRST", - executedTxn_chainId_DESC_NULLS_LAST = "executedTxn_chainId_DESC_NULLS_LAST", executedTxn_from_ASC = "executedTxn_from_ASC", executedTxn_from_ASC_NULLS_FIRST = "executedTxn_from_ASC_NULLS_FIRST", executedTxn_from_ASC_NULLS_LAST = "executedTxn_from_ASC_NULLS_LAST", @@ -5136,6 +5232,15 @@ export interface OrderWhereInput { cancelledTxn_isNull?: InputMaybe; createdTxn?: InputMaybe; createdTxn_isNull?: InputMaybe; + decreasePositionSwapType_eq?: InputMaybe; + decreasePositionSwapType_gt?: InputMaybe; + decreasePositionSwapType_gte?: InputMaybe; + decreasePositionSwapType_in?: InputMaybe>; + decreasePositionSwapType_isNull?: InputMaybe; + decreasePositionSwapType_lt?: InputMaybe; + decreasePositionSwapType_lte?: InputMaybe; + decreasePositionSwapType_not_eq?: InputMaybe; + decreasePositionSwapType_not_in?: InputMaybe>; executedTxn?: InputMaybe; executedTxn_isNull?: InputMaybe; executionFee_eq?: InputMaybe; @@ -5417,6 +5522,7 @@ export interface PeriodAccountStatObject { realizedFees: Scalars["BigInt"]["output"]; realizedPnl: Scalars["BigInt"]["output"]; realizedPriceImpact: Scalars["BigInt"]["output"]; + realizedSwapImpact: Scalars["BigInt"]["output"]; startUnrealizedFees: Scalars["BigInt"]["output"]; startUnrealizedPnl: Scalars["BigInt"]["output"]; startUnrealizedPriceImpact: Scalars["BigInt"]["output"]; @@ -5425,6 +5531,103 @@ export interface PeriodAccountStatObject { wins: Scalars["Float"]["output"]; } +export interface PlatformStats { + __typename?: "PlatformStats"; + depositedUsers: Scalars["Int"]["output"]; + id: Scalars["String"]["output"]; + tradedUsers: Scalars["Int"]["output"]; + volume: Scalars["BigInt"]["output"]; +} + +export interface PlatformStatsConnection { + __typename?: "PlatformStatsConnection"; + edges: Array; + pageInfo: PageInfo; + totalCount: Scalars["Int"]["output"]; +} + +export interface PlatformStatsEdge { + __typename?: "PlatformStatsEdge"; + cursor: Scalars["String"]["output"]; + node: PlatformStats; +} + +export enum PlatformStatsOrderByInput { + depositedUsers_ASC = "depositedUsers_ASC", + depositedUsers_ASC_NULLS_FIRST = "depositedUsers_ASC_NULLS_FIRST", + depositedUsers_ASC_NULLS_LAST = "depositedUsers_ASC_NULLS_LAST", + depositedUsers_DESC = "depositedUsers_DESC", + depositedUsers_DESC_NULLS_FIRST = "depositedUsers_DESC_NULLS_FIRST", + depositedUsers_DESC_NULLS_LAST = "depositedUsers_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", + tradedUsers_ASC = "tradedUsers_ASC", + tradedUsers_ASC_NULLS_FIRST = "tradedUsers_ASC_NULLS_FIRST", + tradedUsers_ASC_NULLS_LAST = "tradedUsers_ASC_NULLS_LAST", + tradedUsers_DESC = "tradedUsers_DESC", + tradedUsers_DESC_NULLS_FIRST = "tradedUsers_DESC_NULLS_FIRST", + tradedUsers_DESC_NULLS_LAST = "tradedUsers_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", +} + +export interface PlatformStatsWhereInput { + AND?: InputMaybe>; + OR?: InputMaybe>; + depositedUsers_eq?: InputMaybe; + depositedUsers_gt?: InputMaybe; + depositedUsers_gte?: InputMaybe; + depositedUsers_in?: InputMaybe>; + depositedUsers_isNull?: InputMaybe; + depositedUsers_lt?: InputMaybe; + depositedUsers_lte?: InputMaybe; + depositedUsers_not_eq?: InputMaybe; + depositedUsers_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; + tradedUsers_eq?: InputMaybe; + tradedUsers_gt?: InputMaybe; + tradedUsers_gte?: InputMaybe; + tradedUsers_in?: InputMaybe>; + tradedUsers_isNull?: InputMaybe; + tradedUsers_lt?: InputMaybe; + tradedUsers_lte?: InputMaybe; + tradedUsers_not_eq?: InputMaybe; + tradedUsers_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>; +} + export interface PnlAprSnapshot { __typename?: "PnlAprSnapshot"; address: Scalars["String"]["output"]; @@ -5552,10 +5755,12 @@ export interface Position { id: Scalars["String"]["output"]; isLong: Scalars["Boolean"]["output"]; isSnapshot: Scalars["Boolean"]["output"]; + leverage: Scalars["BigInt"]["output"]; market: Scalars["String"]["output"]; maxSize: Scalars["BigInt"]["output"]; openedAt: Scalars["Int"]["output"]; positionKey: Scalars["String"]["output"]; + qualifyingPnl: Scalars["BigInt"]["output"]; realizedFees: Scalars["BigInt"]["output"]; realizedPnl: Scalars["BigInt"]["output"]; realizedPriceImpact: Scalars["BigInt"]["output"]; @@ -5587,8 +5792,10 @@ export interface PositionChange { priceImpactDiffUsd?: Maybe; priceImpactUsd: Scalars["BigInt"]["output"]; proportionalPendingImpactUsd?: Maybe; + sizeDeltaInTokens: Scalars["BigInt"]["output"]; sizeDeltaUsd: Scalars["BigInt"]["output"]; sizeInUsd: Scalars["BigInt"]["output"]; + swapImpactUsd?: Maybe; timestamp: Scalars["Int"]["output"]; totalImpactUsd?: Maybe; type: PositionChangeType; @@ -5709,6 +5916,12 @@ export enum PositionChangeOrderByInput { proportionalPendingImpactUsd_DESC = "proportionalPendingImpactUsd_DESC", proportionalPendingImpactUsd_DESC_NULLS_FIRST = "proportionalPendingImpactUsd_DESC_NULLS_FIRST", proportionalPendingImpactUsd_DESC_NULLS_LAST = "proportionalPendingImpactUsd_DESC_NULLS_LAST", + sizeDeltaInTokens_ASC = "sizeDeltaInTokens_ASC", + sizeDeltaInTokens_ASC_NULLS_FIRST = "sizeDeltaInTokens_ASC_NULLS_FIRST", + sizeDeltaInTokens_ASC_NULLS_LAST = "sizeDeltaInTokens_ASC_NULLS_LAST", + sizeDeltaInTokens_DESC = "sizeDeltaInTokens_DESC", + sizeDeltaInTokens_DESC_NULLS_FIRST = "sizeDeltaInTokens_DESC_NULLS_FIRST", + sizeDeltaInTokens_DESC_NULLS_LAST = "sizeDeltaInTokens_DESC_NULLS_LAST", sizeDeltaUsd_ASC = "sizeDeltaUsd_ASC", sizeDeltaUsd_ASC_NULLS_FIRST = "sizeDeltaUsd_ASC_NULLS_FIRST", sizeDeltaUsd_ASC_NULLS_LAST = "sizeDeltaUsd_ASC_NULLS_LAST", @@ -5721,6 +5934,12 @@ export enum PositionChangeOrderByInput { sizeInUsd_DESC = "sizeInUsd_DESC", sizeInUsd_DESC_NULLS_FIRST = "sizeInUsd_DESC_NULLS_FIRST", sizeInUsd_DESC_NULLS_LAST = "sizeInUsd_DESC_NULLS_LAST", + swapImpactUsd_ASC = "swapImpactUsd_ASC", + swapImpactUsd_ASC_NULLS_FIRST = "swapImpactUsd_ASC_NULLS_FIRST", + swapImpactUsd_ASC_NULLS_LAST = "swapImpactUsd_ASC_NULLS_LAST", + swapImpactUsd_DESC = "swapImpactUsd_DESC", + swapImpactUsd_DESC_NULLS_FIRST = "swapImpactUsd_DESC_NULLS_FIRST", + swapImpactUsd_DESC_NULLS_LAST = "swapImpactUsd_DESC_NULLS_LAST", timestamp_ASC = "timestamp_ASC", timestamp_ASC_NULLS_FIRST = "timestamp_ASC_NULLS_FIRST", timestamp_ASC_NULLS_LAST = "timestamp_ASC_NULLS_LAST", @@ -5931,6 +6150,15 @@ export interface PositionChangeWhereInput { proportionalPendingImpactUsd_lte?: InputMaybe; proportionalPendingImpactUsd_not_eq?: InputMaybe; proportionalPendingImpactUsd_not_in?: InputMaybe>; + sizeDeltaInTokens_eq?: InputMaybe; + sizeDeltaInTokens_gt?: InputMaybe; + sizeDeltaInTokens_gte?: InputMaybe; + sizeDeltaInTokens_in?: InputMaybe>; + sizeDeltaInTokens_isNull?: InputMaybe; + sizeDeltaInTokens_lt?: InputMaybe; + sizeDeltaInTokens_lte?: InputMaybe; + sizeDeltaInTokens_not_eq?: InputMaybe; + sizeDeltaInTokens_not_in?: InputMaybe>; sizeDeltaUsd_eq?: InputMaybe; sizeDeltaUsd_gt?: InputMaybe; sizeDeltaUsd_gte?: InputMaybe; @@ -5949,6 +6177,15 @@ export interface PositionChangeWhereInput { sizeInUsd_lte?: InputMaybe; sizeInUsd_not_eq?: InputMaybe; sizeInUsd_not_in?: InputMaybe>; + swapImpactUsd_eq?: InputMaybe; + swapImpactUsd_gt?: InputMaybe; + swapImpactUsd_gte?: InputMaybe; + swapImpactUsd_in?: InputMaybe>; + swapImpactUsd_isNull?: InputMaybe; + swapImpactUsd_lt?: InputMaybe; + swapImpactUsd_lte?: InputMaybe; + swapImpactUsd_not_eq?: InputMaybe; + swapImpactUsd_not_in?: InputMaybe>; timestamp_eq?: InputMaybe; timestamp_gt?: InputMaybe; timestamp_gte?: InputMaybe; @@ -6139,12 +6376,6 @@ export enum PositionFeesEntityOrderByInput { 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_chainId_ASC = "transaction_chainId_ASC", - transaction_chainId_ASC_NULLS_FIRST = "transaction_chainId_ASC_NULLS_FIRST", - transaction_chainId_ASC_NULLS_LAST = "transaction_chainId_ASC_NULLS_LAST", - transaction_chainId_DESC = "transaction_chainId_DESC", - transaction_chainId_DESC_NULLS_FIRST = "transaction_chainId_DESC_NULLS_FIRST", - transaction_chainId_DESC_NULLS_LAST = "transaction_chainId_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", @@ -6449,6 +6680,12 @@ export enum PositionOrderByInput { accountStat_cumsumSize_DESC = "accountStat_cumsumSize_DESC", accountStat_cumsumSize_DESC_NULLS_FIRST = "accountStat_cumsumSize_DESC_NULLS_FIRST", accountStat_cumsumSize_DESC_NULLS_LAST = "accountStat_cumsumSize_DESC_NULLS_LAST", + accountStat_deposits_ASC = "accountStat_deposits_ASC", + accountStat_deposits_ASC_NULLS_FIRST = "accountStat_deposits_ASC_NULLS_FIRST", + accountStat_deposits_ASC_NULLS_LAST = "accountStat_deposits_ASC_NULLS_LAST", + accountStat_deposits_DESC = "accountStat_deposits_DESC", + accountStat_deposits_DESC_NULLS_FIRST = "accountStat_deposits_DESC_NULLS_FIRST", + accountStat_deposits_DESC_NULLS_LAST = "accountStat_deposits_DESC_NULLS_LAST", accountStat_id_ASC = "accountStat_id_ASC", accountStat_id_ASC_NULLS_FIRST = "accountStat_id_ASC_NULLS_FIRST", accountStat_id_ASC_NULLS_LAST = "accountStat_id_ASC_NULLS_LAST", @@ -6491,6 +6728,12 @@ export enum PositionOrderByInput { accountStat_realizedPriceImpact_DESC = "accountStat_realizedPriceImpact_DESC", accountStat_realizedPriceImpact_DESC_NULLS_FIRST = "accountStat_realizedPriceImpact_DESC_NULLS_FIRST", accountStat_realizedPriceImpact_DESC_NULLS_LAST = "accountStat_realizedPriceImpact_DESC_NULLS_LAST", + accountStat_realizedSwapImpact_ASC = "accountStat_realizedSwapImpact_ASC", + accountStat_realizedSwapImpact_ASC_NULLS_FIRST = "accountStat_realizedSwapImpact_ASC_NULLS_FIRST", + accountStat_realizedSwapImpact_ASC_NULLS_LAST = "accountStat_realizedSwapImpact_ASC_NULLS_LAST", + accountStat_realizedSwapImpact_DESC = "accountStat_realizedSwapImpact_DESC", + accountStat_realizedSwapImpact_DESC_NULLS_FIRST = "accountStat_realizedSwapImpact_DESC_NULLS_FIRST", + accountStat_realizedSwapImpact_DESC_NULLS_LAST = "accountStat_realizedSwapImpact_DESC_NULLS_LAST", accountStat_sumMaxSize_ASC = "accountStat_sumMaxSize_ASC", accountStat_sumMaxSize_ASC_NULLS_FIRST = "accountStat_sumMaxSize_ASC_NULLS_FIRST", accountStat_sumMaxSize_ASC_NULLS_LAST = "accountStat_sumMaxSize_ASC_NULLS_LAST", @@ -6551,6 +6794,12 @@ export enum PositionOrderByInput { isSnapshot_DESC = "isSnapshot_DESC", isSnapshot_DESC_NULLS_FIRST = "isSnapshot_DESC_NULLS_FIRST", isSnapshot_DESC_NULLS_LAST = "isSnapshot_DESC_NULLS_LAST", + leverage_ASC = "leverage_ASC", + leverage_ASC_NULLS_FIRST = "leverage_ASC_NULLS_FIRST", + leverage_ASC_NULLS_LAST = "leverage_ASC_NULLS_LAST", + leverage_DESC = "leverage_DESC", + leverage_DESC_NULLS_FIRST = "leverage_DESC_NULLS_FIRST", + leverage_DESC_NULLS_LAST = "leverage_DESC_NULLS_LAST", market_ASC = "market_ASC", market_ASC_NULLS_FIRST = "market_ASC_NULLS_FIRST", market_ASC_NULLS_LAST = "market_ASC_NULLS_LAST", @@ -6575,6 +6824,12 @@ export enum PositionOrderByInput { positionKey_DESC = "positionKey_DESC", positionKey_DESC_NULLS_FIRST = "positionKey_DESC_NULLS_FIRST", positionKey_DESC_NULLS_LAST = "positionKey_DESC_NULLS_LAST", + qualifyingPnl_ASC = "qualifyingPnl_ASC", + qualifyingPnl_ASC_NULLS_FIRST = "qualifyingPnl_ASC_NULLS_FIRST", + qualifyingPnl_ASC_NULLS_LAST = "qualifyingPnl_ASC_NULLS_LAST", + qualifyingPnl_DESC = "qualifyingPnl_DESC", + qualifyingPnl_DESC_NULLS_FIRST = "qualifyingPnl_DESC_NULLS_FIRST", + qualifyingPnl_DESC_NULLS_LAST = "qualifyingPnl_DESC_NULLS_LAST", realizedFees_ASC = "realizedFees_ASC", realizedFees_ASC_NULLS_FIRST = "realizedFees_ASC_NULLS_FIRST", realizedFees_ASC_NULLS_LAST = "realizedFees_ASC_NULLS_LAST", @@ -6642,12 +6897,8 @@ export interface PositionTotalCollateralAmountWhereInput { } export interface PositionVolumeByAllMarketsWhereInput { - timestamp: Scalars["Float"]["input"]; -} - -export interface PositionVolumeWhereInput { - marketAddress?: InputMaybe; - timestamp: Scalars["Float"]["input"]; + period?: InputMaybe; + timestamp?: InputMaybe; } export interface PositionWhereInput { @@ -6730,6 +6981,15 @@ export interface PositionWhereInput { isSnapshot_eq?: InputMaybe; isSnapshot_isNull?: InputMaybe; isSnapshot_not_eq?: InputMaybe; + leverage_eq?: InputMaybe; + leverage_gt?: InputMaybe; + leverage_gte?: InputMaybe; + leverage_in?: InputMaybe>; + leverage_isNull?: InputMaybe; + leverage_lt?: InputMaybe; + leverage_lte?: InputMaybe; + leverage_not_eq?: InputMaybe; + leverage_not_in?: InputMaybe>; market_contains?: InputMaybe; market_containsInsensitive?: InputMaybe; market_endsWith?: InputMaybe; @@ -6782,6 +7042,15 @@ export interface PositionWhereInput { positionKey_not_in?: InputMaybe>; positionKey_not_startsWith?: InputMaybe; positionKey_startsWith?: InputMaybe; + qualifyingPnl_eq?: InputMaybe; + qualifyingPnl_gt?: InputMaybe; + qualifyingPnl_gte?: InputMaybe; + qualifyingPnl_in?: InputMaybe>; + qualifyingPnl_isNull?: InputMaybe; + qualifyingPnl_lt?: InputMaybe; + qualifyingPnl_lte?: InputMaybe; + qualifyingPnl_not_eq?: InputMaybe; + qualifyingPnl_not_in?: InputMaybe>; realizedFees_eq?: InputMaybe; realizedFees_gt?: InputMaybe; realizedFees_gte?: InputMaybe; @@ -7155,6 +7424,9 @@ export interface Query { claimRefById?: Maybe; claimRefs: Array; claimRefsConnection: ClaimRefsConnection; + claimableAmountById?: Maybe; + claimableAmounts: Array; + claimableAmountsConnection: ClaimableAmountsConnection; claimableCollateralById?: Maybe; claimableCollateralGroupById?: Maybe; claimableCollateralGroups: Array; @@ -7207,6 +7479,9 @@ export interface Query { ordersConnection: OrdersConnection; performanceSnapshots: Array; periodAccountStats: Array; + platformStats: Array; + platformStatsById?: Maybe; + platformStatsConnection: PlatformStatsConnection; pnlAprSnapshotById?: Maybe; pnlAprSnapshots: Array; pnlAprSnapshotsConnection: PnlAprSnapshotsConnection; @@ -7221,7 +7496,6 @@ export interface Query { positions: Array; positionsConnection: PositionsConnection; positionsVolume: Array; - positionsVolume24hByMarket: Scalars["BigInt"]["output"]; priceById?: Maybe; prices: Array; pricesConnection: PricesConnection; @@ -7344,6 +7618,24 @@ export interface QueryclaimRefsConnectionArgs { where?: InputMaybe; } +export interface QueryclaimableAmountByIdArgs { + id: Scalars["String"]["input"]; +} + +export interface QueryclaimableAmountsArgs { + limit?: InputMaybe; + offset?: InputMaybe; + orderBy?: InputMaybe>; + where?: InputMaybe; +} + +export interface QueryclaimableAmountsConnectionArgs { + after?: InputMaybe; + first?: InputMaybe; + orderBy: Array; + where?: InputMaybe; +} + export interface QueryclaimableCollateralByIdArgs { id: Scalars["String"]["input"]; } @@ -7644,6 +7936,24 @@ export interface QueryperiodAccountStatsArgs { where?: InputMaybe; } +export interface QueryplatformStatsArgs { + limit?: InputMaybe; + offset?: InputMaybe; + orderBy?: InputMaybe>; + where?: InputMaybe; +} + +export interface QueryplatformStatsByIdArgs { + id: Scalars["String"]["input"]; +} + +export interface QueryplatformStatsConnectionArgs { + after?: InputMaybe; + first?: InputMaybe; + orderBy: Array; + where?: InputMaybe; +} + export interface QuerypnlAprSnapshotByIdArgs { id: Scalars["String"]["input"]; } @@ -7724,10 +8034,6 @@ export interface QuerypositionsVolumeArgs { where?: InputMaybe; } -export interface QuerypositionsVolume24hByMarketArgs { - where?: InputMaybe; -} - export interface QuerypriceByIdArgs { id: Scalars["String"]["input"]; } @@ -7926,12 +8232,6 @@ export enum SwapInfoOrderByInput { 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_chainId_ASC = "transaction_chainId_ASC", - transaction_chainId_ASC_NULLS_FIRST = "transaction_chainId_ASC_NULLS_FIRST", - transaction_chainId_ASC_NULLS_LAST = "transaction_chainId_ASC_NULLS_LAST", - transaction_chainId_DESC = "transaction_chainId_DESC", - transaction_chainId_DESC_NULLS_FIRST = "transaction_chainId_DESC_NULLS_FIRST", - transaction_chainId_DESC_NULLS_LAST = "transaction_chainId_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", @@ -8148,7 +8448,9 @@ export interface TradeAction { borrowingFeeAmount?: Maybe; collateralTokenPriceMax?: Maybe; collateralTokenPriceMin?: Maybe; + collateralTotalCostAmount?: Maybe; contractTriggerPrice?: Maybe; + decreasePositionSwapType?: Maybe; eventName: Scalars["String"]["output"]; executionAmountOut?: Maybe; executionPrice?: Maybe; @@ -8174,8 +8476,10 @@ export interface TradeAction { reason?: Maybe; reasonBytes?: Maybe; shouldUnwrapNativeToken?: Maybe; + sizeDeltaInTokens?: Maybe; sizeDeltaUsd?: Maybe; srcChainId?: Maybe; + swapImpactUsd?: Maybe; swapPath: Array; timestamp: Scalars["Int"]["output"]; totalImpactUsd?: Maybe; @@ -8228,12 +8532,24 @@ export enum TradeActionOrderByInput { collateralTokenPriceMin_DESC = "collateralTokenPriceMin_DESC", collateralTokenPriceMin_DESC_NULLS_FIRST = "collateralTokenPriceMin_DESC_NULLS_FIRST", collateralTokenPriceMin_DESC_NULLS_LAST = "collateralTokenPriceMin_DESC_NULLS_LAST", + collateralTotalCostAmount_ASC = "collateralTotalCostAmount_ASC", + collateralTotalCostAmount_ASC_NULLS_FIRST = "collateralTotalCostAmount_ASC_NULLS_FIRST", + collateralTotalCostAmount_ASC_NULLS_LAST = "collateralTotalCostAmount_ASC_NULLS_LAST", + collateralTotalCostAmount_DESC = "collateralTotalCostAmount_DESC", + collateralTotalCostAmount_DESC_NULLS_FIRST = "collateralTotalCostAmount_DESC_NULLS_FIRST", + collateralTotalCostAmount_DESC_NULLS_LAST = "collateralTotalCostAmount_DESC_NULLS_LAST", contractTriggerPrice_ASC = "contractTriggerPrice_ASC", contractTriggerPrice_ASC_NULLS_FIRST = "contractTriggerPrice_ASC_NULLS_FIRST", contractTriggerPrice_ASC_NULLS_LAST = "contractTriggerPrice_ASC_NULLS_LAST", contractTriggerPrice_DESC = "contractTriggerPrice_DESC", contractTriggerPrice_DESC_NULLS_FIRST = "contractTriggerPrice_DESC_NULLS_FIRST", contractTriggerPrice_DESC_NULLS_LAST = "contractTriggerPrice_DESC_NULLS_LAST", + decreasePositionSwapType_ASC = "decreasePositionSwapType_ASC", + decreasePositionSwapType_ASC_NULLS_FIRST = "decreasePositionSwapType_ASC_NULLS_FIRST", + decreasePositionSwapType_ASC_NULLS_LAST = "decreasePositionSwapType_ASC_NULLS_LAST", + decreasePositionSwapType_DESC = "decreasePositionSwapType_DESC", + decreasePositionSwapType_DESC_NULLS_FIRST = "decreasePositionSwapType_DESC_NULLS_FIRST", + decreasePositionSwapType_DESC_NULLS_LAST = "decreasePositionSwapType_DESC_NULLS_LAST", eventName_ASC = "eventName_ASC", eventName_ASC_NULLS_FIRST = "eventName_ASC_NULLS_FIRST", eventName_ASC_NULLS_LAST = "eventName_ASC_NULLS_LAST", @@ -8384,6 +8700,12 @@ export enum TradeActionOrderByInput { shouldUnwrapNativeToken_DESC = "shouldUnwrapNativeToken_DESC", shouldUnwrapNativeToken_DESC_NULLS_FIRST = "shouldUnwrapNativeToken_DESC_NULLS_FIRST", shouldUnwrapNativeToken_DESC_NULLS_LAST = "shouldUnwrapNativeToken_DESC_NULLS_LAST", + sizeDeltaInTokens_ASC = "sizeDeltaInTokens_ASC", + sizeDeltaInTokens_ASC_NULLS_FIRST = "sizeDeltaInTokens_ASC_NULLS_FIRST", + sizeDeltaInTokens_ASC_NULLS_LAST = "sizeDeltaInTokens_ASC_NULLS_LAST", + sizeDeltaInTokens_DESC = "sizeDeltaInTokens_DESC", + sizeDeltaInTokens_DESC_NULLS_FIRST = "sizeDeltaInTokens_DESC_NULLS_FIRST", + sizeDeltaInTokens_DESC_NULLS_LAST = "sizeDeltaInTokens_DESC_NULLS_LAST", sizeDeltaUsd_ASC = "sizeDeltaUsd_ASC", sizeDeltaUsd_ASC_NULLS_FIRST = "sizeDeltaUsd_ASC_NULLS_FIRST", sizeDeltaUsd_ASC_NULLS_LAST = "sizeDeltaUsd_ASC_NULLS_LAST", @@ -8396,6 +8718,12 @@ export enum TradeActionOrderByInput { srcChainId_DESC = "srcChainId_DESC", srcChainId_DESC_NULLS_FIRST = "srcChainId_DESC_NULLS_FIRST", srcChainId_DESC_NULLS_LAST = "srcChainId_DESC_NULLS_LAST", + swapImpactUsd_ASC = "swapImpactUsd_ASC", + swapImpactUsd_ASC_NULLS_FIRST = "swapImpactUsd_ASC_NULLS_FIRST", + swapImpactUsd_ASC_NULLS_LAST = "swapImpactUsd_ASC_NULLS_LAST", + swapImpactUsd_DESC = "swapImpactUsd_DESC", + swapImpactUsd_DESC_NULLS_FIRST = "swapImpactUsd_DESC_NULLS_FIRST", + swapImpactUsd_DESC_NULLS_LAST = "swapImpactUsd_DESC_NULLS_LAST", timestamp_ASC = "timestamp_ASC", timestamp_ASC_NULLS_FIRST = "timestamp_ASC_NULLS_FIRST", timestamp_ASC_NULLS_LAST = "timestamp_ASC_NULLS_LAST", @@ -8414,12 +8742,6 @@ export enum TradeActionOrderByInput { 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_chainId_ASC = "transaction_chainId_ASC", - transaction_chainId_ASC_NULLS_FIRST = "transaction_chainId_ASC_NULLS_FIRST", - transaction_chainId_ASC_NULLS_LAST = "transaction_chainId_ASC_NULLS_LAST", - transaction_chainId_DESC = "transaction_chainId_DESC", - transaction_chainId_DESC_NULLS_FIRST = "transaction_chainId_DESC_NULLS_FIRST", - transaction_chainId_DESC_NULLS_LAST = "transaction_chainId_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", @@ -8541,6 +8863,15 @@ export interface TradeActionWhereInput { collateralTokenPriceMin_lte?: InputMaybe; collateralTokenPriceMin_not_eq?: InputMaybe; collateralTokenPriceMin_not_in?: InputMaybe>; + collateralTotalCostAmount_eq?: InputMaybe; + collateralTotalCostAmount_gt?: InputMaybe; + collateralTotalCostAmount_gte?: InputMaybe; + collateralTotalCostAmount_in?: InputMaybe>; + collateralTotalCostAmount_isNull?: InputMaybe; + collateralTotalCostAmount_lt?: InputMaybe; + collateralTotalCostAmount_lte?: InputMaybe; + collateralTotalCostAmount_not_eq?: InputMaybe; + collateralTotalCostAmount_not_in?: InputMaybe>; contractTriggerPrice_eq?: InputMaybe; contractTriggerPrice_gt?: InputMaybe; contractTriggerPrice_gte?: InputMaybe; @@ -8550,6 +8881,15 @@ export interface TradeActionWhereInput { contractTriggerPrice_lte?: InputMaybe; contractTriggerPrice_not_eq?: InputMaybe; contractTriggerPrice_not_in?: InputMaybe>; + decreasePositionSwapType_eq?: InputMaybe; + decreasePositionSwapType_gt?: InputMaybe; + decreasePositionSwapType_gte?: InputMaybe; + decreasePositionSwapType_in?: InputMaybe>; + decreasePositionSwapType_isNull?: InputMaybe; + decreasePositionSwapType_lt?: InputMaybe; + decreasePositionSwapType_lte?: InputMaybe; + decreasePositionSwapType_not_eq?: InputMaybe; + decreasePositionSwapType_not_in?: InputMaybe>; eventName_contains?: InputMaybe; eventName_containsInsensitive?: InputMaybe; eventName_endsWith?: InputMaybe; @@ -8819,6 +9159,15 @@ export interface TradeActionWhereInput { shouldUnwrapNativeToken_eq?: InputMaybe; shouldUnwrapNativeToken_isNull?: InputMaybe; shouldUnwrapNativeToken_not_eq?: InputMaybe; + sizeDeltaInTokens_eq?: InputMaybe; + sizeDeltaInTokens_gt?: InputMaybe; + sizeDeltaInTokens_gte?: InputMaybe; + sizeDeltaInTokens_in?: InputMaybe>; + sizeDeltaInTokens_isNull?: InputMaybe; + sizeDeltaInTokens_lt?: InputMaybe; + sizeDeltaInTokens_lte?: InputMaybe; + sizeDeltaInTokens_not_eq?: InputMaybe; + sizeDeltaInTokens_not_in?: InputMaybe>; sizeDeltaUsd_eq?: InputMaybe; sizeDeltaUsd_gt?: InputMaybe; sizeDeltaUsd_gte?: InputMaybe; @@ -8837,6 +9186,15 @@ export interface TradeActionWhereInput { srcChainId_lte?: InputMaybe; srcChainId_not_eq?: InputMaybe; srcChainId_not_in?: InputMaybe>; + swapImpactUsd_eq?: InputMaybe; + swapImpactUsd_gt?: InputMaybe; + swapImpactUsd_gte?: InputMaybe; + swapImpactUsd_in?: InputMaybe>; + swapImpactUsd_isNull?: InputMaybe; + swapImpactUsd_lt?: InputMaybe; + swapImpactUsd_lte?: InputMaybe; + swapImpactUsd_not_eq?: InputMaybe; + swapImpactUsd_not_in?: InputMaybe>; swapPath_containsAll?: InputMaybe>; swapPath_containsAny?: InputMaybe>; swapPath_containsNone?: InputMaybe>; @@ -8916,7 +9274,6 @@ export interface TradeActionsConnection { export interface Transaction { __typename?: "Transaction"; blockNumber: Scalars["Int"]["output"]; - chainId: Scalars["Int"]["output"]; from: Scalars["String"]["output"]; hash: Scalars["String"]["output"]; id: Scalars["String"]["output"]; @@ -8938,12 +9295,6 @@ export enum TransactionOrderByInput { blockNumber_DESC = "blockNumber_DESC", blockNumber_DESC_NULLS_FIRST = "blockNumber_DESC_NULLS_FIRST", blockNumber_DESC_NULLS_LAST = "blockNumber_DESC_NULLS_LAST", - chainId_ASC = "chainId_ASC", - chainId_ASC_NULLS_FIRST = "chainId_ASC_NULLS_FIRST", - chainId_ASC_NULLS_LAST = "chainId_ASC_NULLS_LAST", - chainId_DESC = "chainId_DESC", - chainId_DESC_NULLS_FIRST = "chainId_DESC_NULLS_FIRST", - chainId_DESC_NULLS_LAST = "chainId_DESC_NULLS_LAST", from_ASC = "from_ASC", from_ASC_NULLS_FIRST = "from_ASC_NULLS_FIRST", from_ASC_NULLS_LAST = "from_ASC_NULLS_LAST", @@ -8994,15 +9345,6 @@ export interface TransactionWhereInput { blockNumber_lte?: InputMaybe; blockNumber_not_eq?: InputMaybe; blockNumber_not_in?: InputMaybe>; - chainId_eq?: InputMaybe; - chainId_gt?: InputMaybe; - chainId_gte?: InputMaybe; - chainId_in?: InputMaybe>; - chainId_isNull?: InputMaybe; - chainId_lt?: InputMaybe; - chainId_lte?: InputMaybe; - chainId_not_eq?: InputMaybe; - chainId_not_in?: InputMaybe>; from_contains?: InputMaybe; from_containsInsensitive?: InputMaybe; from_endsWith?: InputMaybe; diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/types/swapStrategy.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/types/swapStrategy.ts index 7802a5c9..867e53dc 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/types/swapStrategy.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/types/swapStrategy.ts @@ -1,44 +1,43 @@ -import {ExternalSwapQuote, SwapPathStats} from "./trade"; +import { ExternalSwapQuote, SwapPathStats } from "./trade.js"; type BaseSwapStrategy = { - amountIn: bigint; - amountOut: bigint; - usdIn: bigint; - usdOut: bigint; - priceIn: bigint; - priceOut: bigint; - feesUsd: bigint; - }; - - export type NoSwapStrategy = BaseSwapStrategy & { - type: "noSwap"; - externalSwapQuote: undefined; - swapPathStats: undefined; - }; - - export type ExternalSwapStrategy = BaseSwapStrategy & { - type: "externalSwap"; - externalSwapQuote: ExternalSwapQuote; - swapPathStats: undefined; - }; - - export type InternalSwapStrategy = BaseSwapStrategy & { - type: "internalSwap"; - swapPathStats: SwapPathStats; - externalSwapQuote: undefined; - }; - - export type CombinedSwapStrategy = BaseSwapStrategy & { - type: "combinedSwap"; - externalSwapQuote: ExternalSwapQuote; - swapPathStats: SwapPathStats; - }; - - export type SwapStrategyForIncreaseOrders = - | NoSwapStrategy - | ExternalSwapStrategy - | InternalSwapStrategy - | CombinedSwapStrategy; - - export type SwapStrategyForSwapOrders = NoSwapStrategy | InternalSwapStrategy | CombinedSwapStrategy; - \ No newline at end of file + amountIn: bigint; + amountOut: bigint; + usdIn: bigint; + usdOut: bigint; + priceIn: bigint; + priceOut: bigint; + feesUsd: bigint; +}; + +export type NoSwapStrategy = BaseSwapStrategy & { + type: "noSwap"; + externalSwapQuote: undefined; + swapPathStats: undefined; +}; + +export type ExternalSwapStrategy = BaseSwapStrategy & { + type: "externalSwap"; + externalSwapQuote: ExternalSwapQuote; + swapPathStats: undefined; +}; + +export type InternalSwapStrategy = BaseSwapStrategy & { + type: "internalSwap"; + swapPathStats: SwapPathStats; + externalSwapQuote: undefined; +}; + +export type CombinedSwapStrategy = BaseSwapStrategy & { + type: "combinedSwap"; + externalSwapQuote: ExternalSwapQuote; + swapPathStats: SwapPathStats; +}; + +export type SwapStrategyForIncreaseOrders = + | NoSwapStrategy + | ExternalSwapStrategy + | InternalSwapStrategy + | CombinedSwapStrategy; + +export type SwapStrategyForSwapOrders = NoSwapStrategy | InternalSwapStrategy | CombinedSwapStrategy; diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/types/tokens.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/types/tokens.ts index 3db9aa05..4e154e2f 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/types/tokens.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/types/tokens.ts @@ -10,6 +10,7 @@ export type ContractPrice = bigint & { __brand: "contractPrice" }; export type TokenCategory = "meme" | "layer1" | "layer2" | "defi"; +// Static token data export type Token = { name: string; symbol: string; @@ -48,6 +49,9 @@ export type Token = { shouldResetAllowance?: boolean; }; +/** + * @deprecated V1 TokenInfo struct + */ export type TokenInfo = Token & { hasMaxAvailableLong?: boolean; hasMaxAvailableShort?: boolean; @@ -116,29 +120,38 @@ export type SignedTokenPermit = { }; }; -export type InfoTokens = { - [key: string]: TokenInfo; -}; - export type TokenPrices = { minPrice: bigint; maxPrice: bigint; }; -export type TokenData = Token & { +export enum TokenBalanceType { + Wallet = 0, + GmxAccount = 1, + SourceChain = 2, +} + +export type TokenAsyncData = { prices: TokenPrices; - isGmxAccount?: boolean; walletBalance?: bigint; gmxAccountBalance?: bigint; /** - * If isGmxAccount is true, then this is the gmx account balance - * If isGmxAccount is false, then this is the wallet balance + * In source chain decimals, use `getMappedTokenId` to get the decimals + */ + sourceChainBalance?: bigint; + balanceType?: TokenBalanceType; + /** + * Balance according to the balanceType */ balance?: bigint; totalSupply?: bigint; hasPriceFeedProvider?: boolean; }; +export type TokenData = Token & TokenAsyncData; + +export type ProgressiveTokenData = Token & Partial; + export type TokensRatio = { ratio: bigint; largestToken: Token; @@ -150,6 +163,13 @@ export type TokensRatioAndSlippage = TokensRatio & { acceptablePrice: bigint; }; +/** + * @deprecated V1 InfoTokens struct + */ +export type InfoTokens = { + [key: string]: TokenInfo; +}; + export type TokenBalancesData = { [tokenAddress: string]: bigint; }; @@ -165,3 +185,7 @@ export type TokensAllowanceData = { export type TokensData = { [address: string]: TokenData; }; + +export type ProgressiveTokensData = { + [address: string]: ProgressiveTokenData; +}; diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/types/trade.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/types/trade.ts index 0020ab82..376bc566 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/types/trade.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/types/trade.ts @@ -1,7 +1,7 @@ -import {ExternalSwapFeeItem, FeeItem, SwapFeeItem} from "./fees.js"; -import {DecreasePositionSwapType, OrderType} from "./orders.js"; -import {TokensData} from "./tokens.js"; -import {SwapStrategyForIncreaseOrders} from "./swapStrategy.js"; +import { ExternalSwapFeeItem, FeeItem, SwapFeeItem } from "./fees.js"; +import { DecreasePositionSwapType, OrderType } from "./orders.js"; +import { SwapStrategyForIncreaseOrders } from "./swapStrategy.js"; +import { TokensData } from "./tokens.js"; export enum TradeType { Long = "Long", @@ -83,6 +83,7 @@ export type IncreasePositionAmounts = { borrowingFeeUsd: bigint; fundingFeeUsd: bigint; positionPriceImpactDeltaUsd: bigint; + potentialPriceImpactDiffUsd: bigint; }; export type DecreasePositionAmounts = { @@ -124,7 +125,7 @@ export type DecreasePositionAmounts = { receiveTokenAmount: bigint; receiveUsd: bigint; - triggerOrderType?: OrderType.LimitDecrease | OrderType.StopLossDecrease | OrderType.MarketDecrease; + triggerOrderType?: OrderType.MarketDecrease | OrderType.LimitDecrease | OrderType.StopLossDecrease; triggerThresholdType?: TriggerThresholdType; decreaseSwapType: DecreasePositionSwapType; }; @@ -146,10 +147,14 @@ export type DepositAmounts = { export type WithdrawalAmounts = { marketTokenAmount: bigint; marketTokenUsd: bigint; + longTokenBeforeSwapAmount: bigint; longTokenAmount: bigint; + longTokenSwapPathStats: SwapPathStats | undefined; shortTokenAmount: bigint; + shortTokenBeforeSwapAmount: bigint; longTokenUsd: bigint; shortTokenUsd: bigint; + shortTokenSwapPathStats: SwapPathStats | undefined; glvTokenAmount: bigint; glvTokenUsd: bigint; swapFeeUsd: bigint; @@ -345,6 +350,7 @@ export type GmSwapFees = { swapPriceImpact?: FeeItem; uiFee?: FeeItem; shiftFee?: FeeItem; + logicalNetworkFee?: FeeItem; }; export type TradeSearchParams = { diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/types/tradeHistory.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/types/tradeHistory.ts index 641f6849..5242223d 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/types/tradeHistory.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/types/tradeHistory.ts @@ -1,6 +1,6 @@ -import {MarketInfo} from "./markets"; -import {OrderType} from "./orders"; -import {TokenData} from "./tokens"; +import { MarketInfo } from "./markets.js"; +import { OrderType } from "./orders.js"; +import { TokenData } from "./tokens.js"; export enum TradeActionType { OrderCreated = "OrderCreated", @@ -11,6 +11,7 @@ export enum TradeActionType { } export type PositionTradeAction = { + type: "position"; id: string; srcChainId?: number; eventName: TradeActionType; @@ -24,6 +25,7 @@ export type PositionTradeAction = { swapPath: string[]; initialCollateralDeltaAmount: bigint; sizeDeltaUsd: bigint; + sizeDeltaInTokens?: bigint; indexTokenPriceMin?: bigint; indexTokenPriceMax?: bigint; triggerPrice?: bigint; @@ -60,6 +62,7 @@ export type PositionTradeAction = { }; export type SwapTradeAction = { + type: "swap"; id: string; srcChainId?: number; account: string; @@ -90,3 +93,11 @@ export type SwapTradeAction = { }; export type TradeAction = PositionTradeAction | SwapTradeAction; + +export function isPositionTradeAction(tradeAction: TradeAction): tradeAction is PositionTradeAction { + return tradeAction.type === "position"; +} + +export function isSwapTradeAction(tradeAction: TradeAction): tradeAction is SwapTradeAction { + return tradeAction.type === "swap"; +} diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/types/twap.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/types/twap.ts new file mode 100644 index 00000000..82143baa --- /dev/null +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/types/twap.ts @@ -0,0 +1,13 @@ +export type TwapDuration = { + minutes: number; + hours: number; +}; + +export type TwapOrderParams = { + duration: TwapDuration; + numberOfParts: number; +}; + +export type TwapPartParams = TwapOrderParams & { + partIndex: number; +}; diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/LruCache.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/LruCache.ts index c6010d32..69c8d2d2 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/LruCache.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/LruCache.ts @@ -1,12 +1,10 @@ export class LRUCache { private capacity: number; private cache: Map; - private recentKeys: string[]; constructor(capacity: number) { this.capacity = capacity; this.cache = new Map(); - this.recentKeys = []; } has(key: string): boolean { @@ -15,9 +13,11 @@ export class LRUCache { get(key: string): T | undefined { if (this.cache.has(key)) { - // Update recentKeys to reflect the usage - this.updateRecentKeys(key); - return this.cache.get(key); + // Move to end (most recently used) by deleting and re-inserting + const value = this.cache.get(key)!; + this.cache.delete(key); + this.cache.set(key, value); + return value; } return undefined; } @@ -27,27 +27,36 @@ export class LRUCache { throw new Error("Key must be a string"); } - // If key exists, update its value and move it to the front of recentKeys if (this.cache.has(key)) { + // Update existing key: delete and re-insert to move to end (most recently used) + this.cache.delete(key); this.cache.set(key, value); - this.updateRecentKeys(key); } else { - // If capacity is reached, remove least recently used item + // If capacity is 0, don't store anything + if (this.capacity === 0) { + return; + } + // If capacity is reached, remove least recently used (first entry) if (this.cache.size === this.capacity) { - const lruKey = this.recentKeys.shift(); - if (lruKey) { - this.cache.delete(lruKey); + const firstKey = this.cache.keys().next().value; + if (firstKey !== undefined) { + this.cache.delete(firstKey); } } - // Add the new key-value pair to the cache and recentKeys + // Add the new key-value pair (inserted at end = most recently used) this.cache.set(key, value); - this.recentKeys.push(key); } } - private updateRecentKeys(key: string): void { - // Move the key to the end (most recently used) of recentKeys - this.recentKeys = this.recentKeys.filter((k) => k !== key); - this.recentKeys.push(key); + delete(key: string): void { + this.cache.delete(key); + } + + getKeys(): string[] { + return Array.from(this.cache.keys()); + } + + clean(): void { + this.cache.clear(); } } diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/__tests__/LruCache.spec.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/__tests__/LruCache.spec.ts index b7b3ccdd..b0e4b85b 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/__tests__/LruCache.spec.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/__tests__/LruCache.spec.ts @@ -46,4 +46,36 @@ describe("LruCache", () => { const cache = new LRUCache(2); expect(() => cache.set(123 as any, 1)).toThrow("Key must be a string"); }); + + it("should delete a key and remove it from recent keys", () => { + const cache = new LRUCache(2); + cache.set("a", 1); + cache.set("b", 2); + cache.delete("a"); + expect(cache.has("a")).toBe(false); + expect(cache.get("a")).toBeUndefined(); + cache.set("c", 3); + expect(cache.has("b")).toBe(true); + expect(cache.has("c")).toBe(true); + }); + + it("should handle deletion of non-existent key", () => { + const cache = new LRUCache(2); + cache.set("a", 1); + cache.delete("x"); + expect(cache.has("a")).toBe(true); + expect(cache.get("a")).toBe(1); + }); + + it("should clear all entries when clean is called", () => { + const cache = new LRUCache(2); + cache.set("a", 1); + cache.set("b", 2); + expect(cache.has("a")).toBe(true); + expect(cache.has("b")).toBe(true); + cache.clean(); + expect(cache.has("a")).toBe(false); + expect(cache.has("b")).toBe(false); + expect(cache.getKeys().length).toBe(0); + }); }); diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/__tests__/subgraph.spec.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/__tests__/indexers.spec.ts similarity index 97% rename from src/Managing.Web3Proxy/src/generated/gmxsdk/utils/__tests__/subgraph.spec.ts rename to src/Managing.Web3Proxy/src/generated/gmxsdk/utils/__tests__/indexers.spec.ts index 11676085..a16cf5ed 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/__tests__/subgraph.spec.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/__tests__/indexers.spec.ts @@ -1,6 +1,6 @@ -import {describe, expect, it} from "vitest"; +import { describe, expect, it } from "vitest"; -import {buildFiltersBody, GraphQlFilters} from "../subgraph.js"; +import { buildFiltersBody, GraphQlFilters } from "../indexers"; describe("buildFiltersBody", () => { it("should return empty object if no filters", () => { diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/__tests__/markets.spec.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/__tests__/markets.spec.ts index e315d338..24f786a5 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/__tests__/markets.spec.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/__tests__/markets.spec.ts @@ -1,29 +1,30 @@ -import {describe, expect, it} from "vitest"; +import { describe, expect, it } from "vitest"; +import { ARBITRUM } from "../../configs/chains.js"; +import { TOKENS } from "../../configs/tokens.js"; + +import { MarketInfo } from "../../types/markets.js"; +import { Token, TokensData } from "../../types/tokens.js"; import { - getAvailableUsdLiquidityForCollateral, - getCappedPoolPnl, - getContractMarketPrices, - getMarketDivisor, getMarketFullName, getMarketIndexName, - getMarketPnl, getMarketPoolName, + getContractMarketPrices, + getTokenPoolType, + getPoolUsdWithoutPnl, + getCappedPoolPnl, + getMaxLeverageByMinCollateralFactor, getMaxAllowedLeverageByMinCollateralFactor, - getMaxLeverageByMinCollateralFactor, + getOppositeCollateral, + getAvailableUsdLiquidityForCollateral, + getReservedUsd, + getMarketDivisor, + getMarketPnl, + getOpenInterestUsd, getOpenInterestInTokens, - getOpenInterestUsd, - getOppositeCollateral, - getPoolUsdWithoutPnl, getPriceForPnl, - getReservedUsd, - getTokenPoolType, } from "../markets.js"; -import {MarketInfo} from "../../types/markets.js"; -import {Token, TokensData} from "../../types/tokens.js"; -import {TOKENS} from "../../configs/tokens.js"; -import {ARBITRUM} from "../../configs/chains.js"; -import {expandDecimals} from "../numbers.js"; +import { expandDecimals } from "../numbers.js"; function getToken(symbol: string) { return TOKENS[ARBITRUM].find((token) => token.symbol === symbol) as Token; diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/__tests__/numbers.spec.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/__tests__/numbers.spec.ts index a777278f..eae545ee 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/__tests__/numbers.spec.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/__tests__/numbers.spec.ts @@ -1,18 +1,32 @@ -import {describe, expect, it} from "vitest"; +import { describe, expect, it } from "vitest"; + +import { BASIS_POINTS_DIVISOR_BIGINT, USD_DECIMALS } from "../../configs/factors.js"; + +const ONE_USD = 1000000000000000000000000000000n; -import {BASIS_POINTS_DIVISOR_BIGINT} from "../../configs/factors.js"; import { - applyFactor, - basisPointsToFloat, - bigintToNumber, - BN_NEGATIVE_ONE, - BN_ONE, - BN_ZERO, - expandDecimals, - getBasisPoints, - numberToBigint, - PRECISION, - roundUpMagnitudeDivision, + applyFactor, + basisPointsToFloat, + bigintToNumber, + BN_NEGATIVE_ONE, + BN_ONE, + BN_ZERO, + expandDecimals, + formatAmount, + formatAmountHuman, + formatBalanceAmount, + formatFactor, + formatPercentage, + formatTokenAmount, + formatUsdPrice, + getBasisPoints, + numberToBigint, + PERCENT_PRECISION_DECIMALS, + PRECISION, + PRECISION_DECIMALS, + roundWithDecimals, + roundUpMagnitudeDivision, + toBigNumberWithDecimals, } from "../numbers.js"; describe("numbers utils", () => { @@ -105,3 +119,404 @@ describe("numbers utils", () => { expect(numberToBigint(-1.123456789, 6)).toEqual(-1123456n); }); }); + +describe("toBigNumberWithDecimals", () => { + it("should convert string to big number with decimals", () => { + expect(toBigNumberWithDecimals("0", PRECISION_DECIMALS)).toBe(0n); + expect(toBigNumberWithDecimals("1", PRECISION_DECIMALS)).toBe(1000000000000000000000000000000n); + expect(toBigNumberWithDecimals("123.456", PRECISION_DECIMALS)).toBe(123456000000000000000000000000000n); + expect(toBigNumberWithDecimals("123.456789", PRECISION_DECIMALS)).toBe(123456789000000000000000000000000n); + expect(toBigNumberWithDecimals("-1.5", PRECISION_DECIMALS)).toBe(-1500000000000000000000000000000n); + expect(toBigNumberWithDecimals("0.000001", PRECISION_DECIMALS)).toBe(1000000000000000000000000n); + }); + + it("should handle strings with more decimals than token decimals parameter", () => { + expect(toBigNumberWithDecimals("0.123456789012345678901234567890", 5)).toBe(12345n); + }); + + it("should handle cases with different token decimals ", () => { + expect(toBigNumberWithDecimals("0.1234567890123456789012345678901", 18)).toBe(123456789012345678n); + expect(toBigNumberWithDecimals("0.12345", 5)).toBe(12345n); + expect(toBigNumberWithDecimals("0.1", 1)).toBe(1n); + }); + + it("should be compatible with formatAmount", () => { + expect(formatAmount(toBigNumberWithDecimals("123.456", PRECISION_DECIMALS), USD_DECIMALS, 3)).toBe("123.456"); + expect(formatAmount(toBigNumberWithDecimals("0.789", PRECISION_DECIMALS), USD_DECIMALS, 2)).toBe("0.79"); + }); +}); + +describe("roundWithDecimals", () => { + it("should round small numbers correctly", () => { + expect( + roundWithDecimals(toBigNumberWithDecimals("0.0000001", PRECISION_DECIMALS), { + decimals: PRECISION_DECIMALS, + displayDecimals: 0, + }) + ).toBe(0n); + expect( + roundWithDecimals(toBigNumberWithDecimals("0.5", PRECISION_DECIMALS), { + decimals: PRECISION_DECIMALS, + displayDecimals: 0, + }) + ).toBe(toBigNumberWithDecimals("1", PRECISION_DECIMALS)); + expect( + roundWithDecimals(toBigNumberWithDecimals("0.499", PRECISION_DECIMALS), { + decimals: PRECISION_DECIMALS, + displayDecimals: 0, + }) + ).toBe(0n); + expect( + roundWithDecimals(toBigNumberWithDecimals("1", PRECISION_DECIMALS), { + decimals: PRECISION_DECIMALS, + displayDecimals: 1, + }) + ).toBe(toBigNumberWithDecimals("1", PRECISION_DECIMALS)); + }); + + it("should round numbers at specific decimal places", () => { + expect( + roundWithDecimals(toBigNumberWithDecimals("1.49", PRECISION_DECIMALS), { + decimals: PRECISION_DECIMALS, + displayDecimals: 1, + }) + ).toBe(toBigNumberWithDecimals("1.5", PRECISION_DECIMALS)); + expect( + roundWithDecimals(toBigNumberWithDecimals("1.44", PRECISION_DECIMALS), { + decimals: PRECISION_DECIMALS, + displayDecimals: 1, + }) + ).toBe(toBigNumberWithDecimals("1.4", PRECISION_DECIMALS)); + expect( + roundWithDecimals(toBigNumberWithDecimals("1.499", PRECISION_DECIMALS), { + decimals: PRECISION_DECIMALS, + displayDecimals: 2, + }) + ).toBe(toBigNumberWithDecimals("1.50", PRECISION_DECIMALS)); + expect( + roundWithDecimals(toBigNumberWithDecimals("1.495", PRECISION_DECIMALS), { + decimals: PRECISION_DECIMALS, + displayDecimals: 2, + }) + ).toBe(toBigNumberWithDecimals("1.50", PRECISION_DECIMALS)); + }); + + it("should round large numbers correctly", () => { + expect( + roundWithDecimals(toBigNumberWithDecimals("499.999999", PRECISION_DECIMALS), { + decimals: PRECISION_DECIMALS, + displayDecimals: 5, + }) + ).toBe(toBigNumberWithDecimals("500.00000", PRECISION_DECIMALS)); + }); + + it("should handle complex rounding cases", () => { + expect( + roundWithDecimals(toBigNumberWithDecimals("0.0000000000000000000000000001", PRECISION_DECIMALS), { + decimals: PRECISION_DECIMALS, + displayDecimals: 25, + }) + ).toBe(0n); + expect( + roundWithDecimals(toBigNumberWithDecimals("0.4999999999999999999999999999", PRECISION_DECIMALS), { + decimals: PRECISION_DECIMALS, + displayDecimals: 25, + }) + ).toBe(toBigNumberWithDecimals("0.5", PRECISION_DECIMALS)); + expect( + roundWithDecimals(toBigNumberWithDecimals("123.456789", PRECISION_DECIMALS), { + decimals: PRECISION_DECIMALS, + displayDecimals: 4, + }) + ).toBe(toBigNumberWithDecimals("123.4568", PRECISION_DECIMALS)); + }); + + it("should round numbers with different token decimals correctly", () => { + const differentTokenDecimals = [18, 5, 1, 22]; + for (const tokenDecimals of differentTokenDecimals) { + expect( + roundWithDecimals(toBigNumberWithDecimals("123.456789", tokenDecimals), { + decimals: tokenDecimals, + displayDecimals: 4, + }) + ).toBe(toBigNumberWithDecimals("123.4568", tokenDecimals)); + } + }); + + it("should handle edge cases", () => { + expect(roundWithDecimals(0n, { decimals: PRECISION_DECIMALS, displayDecimals: 10 })).toBe(0n); + expect( + roundWithDecimals(toBigNumberWithDecimals("-1.5", PRECISION_DECIMALS), { + decimals: PRECISION_DECIMALS, + displayDecimals: 0, + }) + ).toBe(toBigNumberWithDecimals("-2", PRECISION_DECIMALS)); + expect( + roundWithDecimals(toBigNumberWithDecimals("-1.4", PRECISION_DECIMALS), { + decimals: PRECISION_DECIMALS, + displayDecimals: 0, + }) + ).toBe(toBigNumberWithDecimals("-1", PRECISION_DECIMALS)); + expect( + roundWithDecimals(toBigNumberWithDecimals("0.0000001", PRECISION_DECIMALS), { + decimals: PRECISION_DECIMALS, + displayDecimals: 5, + }) + ).toBe(0n); + }); +}); + +describe("formatUsdPrice", () => { + it("should tolerate undefined", () => { + expect(formatUsdPrice()).toBeUndefined(); + }); + + it("should return NA if negative", () => { + expect(formatUsdPrice(-1n)).toBe("NA"); + }); + + it("should calculate correct decimals if displayDecimals not passed", () => + // prettier-ignore + { + expect(formatUsdPrice(ONE_USD * 10000n)).toBe( "$\u200a10,000.00"); + expect(formatUsdPrice(ONE_USD * 1000n)).toBe( "$\u200a1,000.00"); + expect(formatUsdPrice(ONE_USD * 100n)).toBe( "$\u200a100.000"); + expect(formatUsdPrice(ONE_USD * 10n)).toBe( "$\u200a10.0000"); + expect(formatUsdPrice(ONE_USD)).toBe( "$\u200a1.0000"); + expect(formatUsdPrice(ONE_USD / 10n)).toBe( "$\u200a0.10000"); + expect(formatUsdPrice(ONE_USD / 100n)).toBe( "$\u200a0.010000"); + expect(formatUsdPrice(ONE_USD / 1000n)).toBe( "$\u200a0.0010000"); + expect(formatUsdPrice(ONE_USD / 10_000n)).toBe( "$\u200a0.0001000"); + expect(formatUsdPrice(ONE_USD / 100_000n)).toBe( "$\u200a0.00001000"); + expect(formatUsdPrice(ONE_USD / 1_000_000_000n)).toBe( "$\u200a0.000000001"); + expect(formatUsdPrice(ONE_USD / 10_000_000_000n)).toBe( "<\u00a0$\u200a0.000000001"); + }); +}); + +describe("formatAmountHuman", () => { + it("positive", () => { + expect(formatAmountHuman(ONE_USD, USD_DECIMALS)).toBe("1.0"); + expect(formatAmountHuman(ONE_USD * 1000n, USD_DECIMALS)).toBe("1.0k"); + expect(formatAmountHuman(ONE_USD * 1000000n, USD_DECIMALS)).toBe("1.0m"); + }); + + it("negative", () => { + expect(formatAmountHuman(-1n * ONE_USD, USD_DECIMALS)).toBe("-1.0"); + expect(formatAmountHuman(-1n * ONE_USD * 1000n, USD_DECIMALS)).toBe("-1.0k"); + expect(formatAmountHuman(-1n * ONE_USD * 1000000n, USD_DECIMALS)).toBe("-1.0m"); + }); + + it("should display dollar sign", () => { + expect(formatAmountHuman(ONE_USD, USD_DECIMALS, true)).toBe("$\u200a1.0"); + expect(formatAmountHuman(-1n * ONE_USD, USD_DECIMALS, true)).toBe("-$\u200a1.0"); + }); + + it("should display decimals", () => { + expect(formatAmountHuman(ONE_USD * 1000n, USD_DECIMALS, false, 2)).toBe("1.00k"); + expect(formatAmountHuman(ONE_USD * 1500000n, USD_DECIMALS, false, 2)).toBe("1.50m"); + expect(formatAmountHuman(ONE_USD * 1000n, USD_DECIMALS, false, 0)).toBe("1k"); + expect(formatAmountHuman(ONE_USD * 1500000n, USD_DECIMALS, false, 0)).toBe("2m"); + }); +}); + +describe("formatBalanceAmount", () => { + const NBSP = "\u00a0"; + + it("should display balance amount", () => + // prettier-ignore + { + expect(formatBalanceAmount(ONE_USD * 1000n, USD_DECIMALS)).toBe( "1,000.00"); + expect(formatBalanceAmount(0n, USD_DECIMALS)).toBe( "-"); + expect(formatBalanceAmount(0n, USD_DECIMALS, undefined, {showZero: true})).toBe("0.0000"); + expect(formatBalanceAmount(ONE_USD * 1n, USD_DECIMALS)).toBe( "1.0000"); + expect(formatBalanceAmount(ONE_USD / 10n, USD_DECIMALS)).toBe( "0.10000"); + expect(formatBalanceAmount(ONE_USD / 100n, USD_DECIMALS)).toBe( "0.010000"); + expect(formatBalanceAmount(ONE_USD / 1_000n, USD_DECIMALS)).toBe( "0.0010000"); + expect(formatBalanceAmount(ONE_USD / 10_000n, USD_DECIMALS)).toBe( "0.0001000"); + expect(formatBalanceAmount(ONE_USD / 100_000n, USD_DECIMALS)).toBe( "0.00001000"); + expect(formatBalanceAmount(ONE_USD / 1_000_000n, USD_DECIMALS)).toBe( "0.000001000"); + expect(formatBalanceAmount(ONE_USD / 10_000_000n, USD_DECIMALS)).toBe( "0.000000100"); + expect(formatBalanceAmount(ONE_USD / 100_000_000n, USD_DECIMALS)).toBe( "0.000000010"); + expect(formatBalanceAmount(ONE_USD / 1_000_000_000n, USD_DECIMALS)).toBe( "1.00e-9"); + expect(formatBalanceAmount(ONE_USD / 1_000_000_000_000n, USD_DECIMALS)).toBe( "1.00e-12"); + expect(formatBalanceAmount(ONE_USD * -1n, USD_DECIMALS)).toBe( "-1.0000"); + }); + + it("should display balance amount with symbol", () => { + expect(formatBalanceAmount(ONE_USD, USD_DECIMALS, "USDC")).toBe(`1.0000${NBSP}USDC`); + + expect(formatBalanceAmount(0n, USD_DECIMALS, "USDC", { showZero: true })).toBe(`0.0000${NBSP}USDC`); + expect(formatBalanceAmount(0n, USD_DECIMALS, "USDC", { showZero: false })).toBe("-"); + }); + + it("should display balance of stable token correctly", () => + // prettier-ignore + { + expect(formatBalanceAmount(ONE_USD, USD_DECIMALS, undefined, { isStable: true })).toBe( "1.00"); + expect(formatBalanceAmount(ONE_USD / 10n, USD_DECIMALS, undefined, { isStable: true })).toBe( "0.10"); + expect(formatBalanceAmount(ONE_USD / 100n, USD_DECIMALS, undefined, { isStable: true })).toBe( "0.010"); + expect(formatBalanceAmount(ONE_USD / 1_000n, USD_DECIMALS, undefined, { isStable: true })).toBe( "0.0010"); + expect(formatBalanceAmount(ONE_USD / 10_000n, USD_DECIMALS, undefined, { isStable: true })).toBe( "0.00010"); + expect(formatBalanceAmount(ONE_USD / 100_000n, USD_DECIMALS, undefined, { isStable: true })).toBe( "0.000010"); + expect(formatBalanceAmount(ONE_USD / 1_000_000n, USD_DECIMALS, undefined, { isStable: true })).toBe( "0.0000010"); + expect(formatBalanceAmount(ONE_USD / 10_000_000n, USD_DECIMALS, undefined, { isStable: true })).toBe( "0.00000010"); + expect(formatBalanceAmount(ONE_USD / 100_000_000n, USD_DECIMALS, undefined, { isStable: true })).toBe( "0.000000010"); + expect(formatBalanceAmount(ONE_USD / 1_000_000_000n, USD_DECIMALS, undefined, { isStable: true })).toBe("1.00e-9"); + expect(formatBalanceAmount(0n, USD_DECIMALS, undefined, { isStable: true, showZero: true })).toBe( "0.00"); + expect(formatBalanceAmount(ONE_USD, USD_DECIMALS, undefined, { isStable: true, signed: true })).toBe( "+1.00"); + expect(formatBalanceAmount(-ONE_USD, USD_DECIMALS, undefined, { isStable: true, signed: true })).toBe( "-1.00"); + expect(formatBalanceAmount(0n, USD_DECIMALS, undefined, { isStable: true, showZero: false })).toBe( "-"); + }); +}); + +describe("formatFactor", () => { + it("should format factor", () => { + expect(formatFactor(0n)).toBe("0"); + expect(formatFactor(1n)).toBe("0.000000000000000000000000000001"); + expect(formatFactor(1000n)).toBe("0.000000000000000000000000001"); + expect(formatFactor(1000000n)).toBe("0.000000000000000000000001"); + expect(formatFactor(1000000000n)).toBe("0.000000000000000000001"); + expect(formatFactor(1000000000000n)).toBe("0.000000000000000001"); + expect(formatFactor(1000000000000000n)).toBe("0.000000000000001"); + expect(formatFactor(1000000000000000000n)).toBe("0.000000000001"); + expect(formatFactor(1000000000000000000000n)).toBe("0.000000001"); + expect(formatFactor(1000000000000000000000000n)).toBe("0.000001"); + expect(formatFactor(1000000000000000000000000000n)).toBe("0.001"); + expect(formatFactor(1000000000000000000000000000000n)).toBe("1"); + }); +}); + +describe("formatPercentage", () => { + it("should format a basic percentage", () => { + expect(formatPercentage(100n, { displayDecimals: 4 })).toBe("1.0000%"); + expect(formatPercentage(2500n)).toBe("25.00%"); + expect(formatPercentage(123456n)).toBe("1234.56%"); + }); + + it("should handle undefined input with fallbackToZero", () => { + expect(formatPercentage(undefined, { fallbackToZero: true })).toBe("0.00%"); + }); + + it("should display signed percentage", () => { + expect(formatPercentage(100n, { signed: true })).toBe("+\u200a1.00%"); + expect(formatPercentage(-100n, { signed: true })).toBe("-\u200a1.00%"); + }); + + it("should format with different displayDecimals", () => { + expect(formatPercentage(100n, { displayDecimals: 2 })).toBe("1.00%"); + expect(formatPercentage(123456n, { displayDecimals: 1 })).toBe("1234.6%"); + }); + + it("should handle basis points (bps) formatting", () => { + expect( + formatPercentage(toBigNumberWithDecimals("1", PERCENT_PRECISION_DECIMALS), { bps: false, displayDecimals: 4 }) + ).toBe("1.0000%"); + expect( + formatPercentage(toBigNumberWithDecimals("0.999", PERCENT_PRECISION_DECIMALS), { bps: false, displayDecimals: 5 }) + ).toBe("0.99900%"); + }); +}); + +describe("formatTokenAmount", () => { + const TOKEN_DECIMALS = 18; + const ONE_TOKEN = expandDecimals(1, TOKEN_DECIMALS); + const NBSP = "\u00a0"; + + it("should return undefined for undefined amount without fallbackToZero", () => { + expect(formatTokenAmount(undefined, TOKEN_DECIMALS)).toBeUndefined(); + expect(formatTokenAmount(undefined, TOKEN_DECIMALS, "ETH")).toBeUndefined(); + }); + + it("should return zero with fallbackToZero", () => { + expect(formatTokenAmount(undefined, TOKEN_DECIMALS, undefined, { fallbackToZero: true })).toBe("0.0000"); + expect(formatTokenAmount(undefined, TOKEN_DECIMALS, "ETH", { fallbackToZero: true })).toBe(`0.0000${NBSP}ETH`); + }); + + it("should format token amount with symbol", () => { + expect(formatTokenAmount(ONE_TOKEN, TOKEN_DECIMALS, "ETH")).toBe(`1.0000${NBSP}ETH`); + expect(formatTokenAmount(ONE_TOKEN * 100n, TOKEN_DECIMALS, "ETH")).toBe(`100.000${NBSP}ETH`); + }); + + it("should format token amount without symbol", () => { + expect(formatTokenAmount(ONE_TOKEN, TOKEN_DECIMALS)).toBe("1.0000"); + expect(formatTokenAmount(ONE_TOKEN * 1000n, TOKEN_DECIMALS)).toBe("1000.00"); + }); + + it("should adjust decimals based on amount magnitude (non-stable)", () => + // prettier-ignore + { + expect(formatTokenAmount(ONE_TOKEN * 1000n, TOKEN_DECIMALS)).toBe( "1000.00"); + expect(formatTokenAmount(ONE_TOKEN * 100n, TOKEN_DECIMALS)).toBe( "100.000"); + expect(formatTokenAmount(ONE_TOKEN * 10n, TOKEN_DECIMALS)).toBe( "10.0000"); + expect(formatTokenAmount(ONE_TOKEN, TOKEN_DECIMALS)).toBe( "1.0000"); + expect(formatTokenAmount(ONE_TOKEN / 10n, TOKEN_DECIMALS)).toBe( "0.10000"); + expect(formatTokenAmount(ONE_TOKEN / 100n, TOKEN_DECIMALS)).toBe( "0.010000"); + expect(formatTokenAmount(ONE_TOKEN / 1000n, TOKEN_DECIMALS)).toBe( "0.0010000"); + expect(formatTokenAmount(ONE_TOKEN / 10000n, TOKEN_DECIMALS)).toBe( "0.0001000"); + }); + + it("should adjust decimals based on amount magnitude (stable)", () => + // prettier-ignore + { + expect(formatTokenAmount(ONE_TOKEN * 1000n, TOKEN_DECIMALS, undefined, { isStable: true })).toBe( "1000.00"); + expect(formatTokenAmount(ONE_TOKEN * 100n, TOKEN_DECIMALS, undefined, { isStable: true })).toBe( "100.00"); + expect(formatTokenAmount(ONE_TOKEN * 10n, TOKEN_DECIMALS, undefined, { isStable: true })).toBe( "10.00"); + expect(formatTokenAmount(ONE_TOKEN, TOKEN_DECIMALS, undefined, { isStable: true })).toBe( "1.00"); + expect(formatTokenAmount(ONE_TOKEN / 10n, TOKEN_DECIMALS, undefined, { isStable: true })).toBe( "0.10"); + expect(formatTokenAmount(ONE_TOKEN / 100n, TOKEN_DECIMALS, undefined, { isStable: true })).toBe( "0.010"); + expect(formatTokenAmount(ONE_TOKEN / 1000n, TOKEN_DECIMALS, undefined, { isStable: true })).toBe( "0.0010"); + expect(formatTokenAmount(ONE_TOKEN / 10000n, TOKEN_DECIMALS, undefined, { isStable: true })).toBe( "0.00010"); + }); + + it("should respect explicit displayDecimals override", () => { + expect(formatTokenAmount(ONE_TOKEN, TOKEN_DECIMALS, undefined, { displayDecimals: 2 })).toBe("1.00"); + expect(formatTokenAmount(ONE_TOKEN, TOKEN_DECIMALS, undefined, { displayDecimals: 6 })).toBe("1.000000"); + expect(formatTokenAmount(ONE_TOKEN / 10n, TOKEN_DECIMALS, undefined, { displayDecimals: 2 })).toBe("0.10"); + }); + + it("should format with commas when useCommas is true", () => { + expect(formatTokenAmount(ONE_TOKEN * 1000000n, TOKEN_DECIMALS, undefined, { useCommas: true })).toBe( + "1,000,000.00" + ); + expect(formatTokenAmount(ONE_TOKEN * 123456n, TOKEN_DECIMALS, "ETH", { useCommas: true })).toBe( + `123,456.00${NBSP}ETH` + ); + }); + + it("should show all significant digits with showAllSignificant", () => { + const preciseAmount = ONE_TOKEN + ONE_TOKEN / 123456789n; + expect(formatTokenAmount(preciseAmount, TOKEN_DECIMALS, undefined, { showAllSignificant: true })).not.toContain( + "..." + ); + }); + + it("should display plus sign for positive values with displayPlus", () => { + expect(formatTokenAmount(ONE_TOKEN, TOKEN_DECIMALS, undefined, { displayPlus: true })).toBe("+1.0000"); + expect(formatTokenAmount(-ONE_TOKEN, TOKEN_DECIMALS, undefined, { displayPlus: true })).toBe("-1.0000"); + }); + + it("should handle negative amounts", () => { + expect(formatTokenAmount(-ONE_TOKEN, TOKEN_DECIMALS)).toBe("-1.0000"); + expect(formatTokenAmount(-ONE_TOKEN * 100n, TOKEN_DECIMALS, "ETH")).toBe(`-100.000${NBSP}ETH`); + }); + + it("should handle zero amount", () => { + expect(formatTokenAmount(0n, TOKEN_DECIMALS)).toBe("0.00"); + expect(formatTokenAmount(0n, TOKEN_DECIMALS, "ETH")).toBe(`0.00${NBSP}ETH`); + expect(formatTokenAmount(0n, TOKEN_DECIMALS, undefined, { isStable: true })).toBe("0.00"); + }); + + it("should handle maxThreshold", () => { + const result = formatTokenAmount(ONE_TOKEN * 10000000000n, TOKEN_DECIMALS, undefined, { + maxThreshold: "1000000000", + }); + expect(result).toContain(">"); + }); + + it("should handle minThreshold", () => { + const result = formatTokenAmount(ONE_TOKEN / 1000000000n, TOKEN_DECIMALS, undefined, { + minThreshold: "0.00000001", + }); + expect(result).toContain("<"); + }); +}); diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/__tests__/objects.spec.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/__tests__/objects.spec.ts index 6feaefdc..12f66c7b 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/__tests__/objects.spec.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/__tests__/objects.spec.ts @@ -1,7 +1,6 @@ -import {describe, expect, it} from "vitest"; - -import {getByKey, setByKey, updateByKey} from "../objects.js"; +import { describe, expect, it } from "vitest"; +import { setByKey, updateByKey, getByKey, objectKeysDeep } from "../objects.js"; describe("setByKey", () => { it("should set a key in an object", () => { const obj = { a: 1, b: 2 }; @@ -76,3 +75,88 @@ describe("getByKey", () => { expect(getByKey(obj, key)).toEqual(undefined); }); }); + +describe("objectKeysDeep", () => { + it("should get all keys from a flat object", () => { + const obj = { a: 1, b: 2, c: 3 }; + const keys = objectKeysDeep(obj); + expect(keys).toEqual(["a", "b", "c"]); + }); + + it("should get all keys from a nested object with default depth", () => { + const obj = { + a: 1, + b: { + x: 2, + y: 3, + }, + c: 4, + }; + const keys = objectKeysDeep(obj); + expect(keys).toEqual(["a", "b", "c", "x", "y"]); + }); + + it("should get all keys from a deeply nested object with custom depth", () => { + const obj = { + a: 1, + b: { + x: 2, + y: { + m: 3, + n: 4, + }, + }, + c: 5, + }; + const keys = objectKeysDeep(obj, 2); + expect(keys).toEqual(["a", "b", "c", "x", "y", "m", "n"]); + }); + + it("should respect depth limit when specified", () => { + const obj = { + a: 1, + b: { + x: 2, + y: { + m: 3, + n: 4, + }, + }, + c: 5, + }; + const keys = objectKeysDeep(obj, 1); + expect(keys).toEqual(["a", "b", "c", "x", "y"]); + }); + + it("should handle empty objects", () => { + const obj = {}; + const keys = objectKeysDeep(obj); + expect(keys).toEqual([]); + }); + + it("should handle objects with arrays", () => { + const obj = { + a: 1, + b: [2, 3], + c: { + x: 4, + y: [5, 6], + }, + }; + const keys = objectKeysDeep(obj); + expect(keys).toEqual(["a", "b", "c", "x", "y"]); + }); + + it("should handle objects with null values", () => { + const obj = { + a: 1, + b: null, + c: { + x: 2, + y: null, + }, + }; + const keys = objectKeysDeep(obj); + expect(keys).toEqual(["a", "b", "c", "x", "y"]); + }); +}); diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/__tests__/parseError.spec.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/__tests__/parseError.spec.ts new file mode 100644 index 00000000..a3cd0e23 --- /dev/null +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/__tests__/parseError.spec.ts @@ -0,0 +1,340 @@ +import { describe, expect, it } from "vitest"; + +import { parseError, ErrorLike } from "../errors/parseError.js"; +import { TxErrorType } from "../errors/transactionsErrors.js"; + +describe("parseError", () => { + describe("general errors", () => { + it("should handle basic Error objects", () => { + const error = new Error("Something went wrong"); + const result = parseError(error); + + expect(result).toEqual( + expect.objectContaining({ + errorMessage: "Something went wrong", + errorName: "Error", + errorGroup: "Something went wrong", + errorStack: error.stack, + errorStackHash: expect.any(String), + errorDepth: 0, + }) + ); + }); + + it("should handle string errors", () => { + const result = parseError("API request failed"); + + expect(result).toEqual( + expect.objectContaining({ + errorMessage: "API request failed", + errorGroup: "API request failed", + errorStackGroup: "Unknown stack group", + errorDepth: 0, + }) + ); + }); + + it("should handle nested errors with context", () => { + const error = { + message: "Order execution failed", + errorContext: "simulation" as const, + info: { + error: { + message: "Price impact too high", + name: "ValidationError", + }, + }, + }; + + const result = parseError(error); + + expect(result).toEqual( + expect.objectContaining({ + errorMessage: "Price impact too high", + errorName: "ValidationError", + errorContext: "simulation", + errorDepth: 0, + }) + ); + }); + + it("should handle undefined errors", () => { + const result = parseError(undefined); + + expect(result).toEqual( + expect.objectContaining({ + errorMessage: "undefined", + errorGroup: "undefined", + errorDepth: 0, + }) + ); + }); + + describe("error masking", () => { + it("should mask URLs in error groups", () => { + const error = new Error("Failed to fetch data from https://api.example.com:8080/v1/data?param=123"); + const result = parseError(error); + + expect(result).toEqual( + expect.objectContaining({ + errorMessage: "Failed to fetch data from https://api.example.com:8080/v1/data?param=123", + errorGroup: "Failed to fetch data from https://api.example.com:", + errorDepth: 0, + }) + ); + }); + + it("should mask numbers in error groups", () => { + const error = new Error("Transaction failed with gas 123456 at block 789012"); + const result = parseError(error); + + expect(result).toEqual( + expect.objectContaining({ + errorMessage: "Transaction failed with gas 123456 at block 789012", + errorGroup: "Transaction failed with gas XXX at block XXX", + errorDepth: 0, + }) + ); + }); + + it("should mask both URLs and numbers in error groups", () => { + const error = new Error("Failed https://api.example.com/v1/tx/123456 with status 404 and error code E123"); + const result = parseError(error); + + expect(result).toEqual( + expect.objectContaining({ + errorMessage: "Failed https://api.example.com/v1/tx/123456 with status 404 and error code E123", + errorGroup: "Failed https://api.example.com with status XXX an", + errorDepth: 0, + }) + ); + }); + + it("should mask URLs in stack traces", () => { + const error = new Error("Processing failed"); + // Simulate a stack trace with URLs + error.stack = `Error: Processing failed + at processData (https://app.example.com/static/js/main.123456.js:12:34) + at handleRequest (https://app.example.com/static/js/vendor.789012.js:56:78)`; + + const result = parseError(error); + + expect(result?.errorStackGroup).toBe(`Error: Processing failed + at processData (https://app.example.com) + at handleRequest (https://app.example.com)`); + }); + }); + }); + + describe("transaction errors", () => { + it("should handle ethers v6 user rejected error", () => { + const error: ErrorLike = { + info: { + error: { + code: "ACTION_REJECTED", + message: "User denied transaction signature", + }, + }, + }; + + const result = parseError(error); + + expect(result).toEqual( + expect.objectContaining({ + errorMessage: "User denied transaction signature", + txErrorType: TxErrorType.UserDenied, + isUserError: true, + isUserRejectedError: true, + errorGroup: "Txn Error: USER_DENIED", + }) + ); + }); + + it("should handle ethers v6 insufficient funds error", () => { + const error: ErrorLike = { + info: { + error: { + message: "insufficient funds for gas", + }, + }, + }; + + const result = parseError(error); + + expect(result).toEqual( + expect.objectContaining({ + errorMessage: "insufficient funds for gas", + txErrorType: TxErrorType.NotEnoughFunds, + isUserError: true, + isUserRejectedError: false, + errorGroup: "Txn Error: NOT_ENOUGH_FUNDS", + }) + ); + }); + + it("should handle RPC errors with code", () => { + const error: ErrorLike = { + info: { + error: { + code: -32603, + message: "Internal JSON-RPC error", + }, + }, + }; + + const result = parseError(error); + + expect(result).toEqual( + expect.objectContaining({ + errorMessage: "Internal JSON-RPC error", + txErrorType: TxErrorType.RpcError, + isUserError: false, + isUserRejectedError: false, + errorGroup: "Txn Error: RPC_ERROR", + }) + ); + }); + + it("should handle nested error in error.body", () => { + const error: ErrorLike = { + info: { + error: { + message: JSON.stringify({ + error: { + code: -32000, + message: "Invalid input parameters", + }, + }), + }, + }, + }; + + const result = parseError(error); + + expect(result).toEqual( + expect.objectContaining({ + errorMessage: JSON.stringify({ + error: { + code: -32000, + message: "Invalid input parameters", + }, + }), + errorGroup: '{"error":{"code":-XXX,"message":"Invalid input par', + errorStackGroup: "Unknown stack group", + errorDepth: 0, + isUserError: false, + isUserRejectedError: false, + }) + ); + }); + + it("should handle contract errors with data", () => { + const error: ErrorLike = { + message: "execution reverted", + data: "0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001a4f726465724e6f7446756c66696c6c61626c6541744c696d697400000000000000", + }; + + const result = parseError(error); + + expect(result).toEqual( + expect.objectContaining({ + errorMessage: "execution reverted", + errorGroup: "execution reverted", + errorStackGroup: "Unknown stack group", + txErrorData: + "0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001a4f726465724e6f7446756c66696c6c61626c6541744c696d697400000000000000", + isUserError: false, + isUserRejectedError: false, + }) + ); + }); + + it("should handle parent errors", () => { + const error: ErrorLike = { + message: "Failed to execute transaction", + parentError: { + message: "User denied transaction signature", + info: { + error: { + code: "ACTION_REJECTED", + }, + }, + }, + }; + + const result = parseError(error); + + expect(result).toEqual( + expect.objectContaining({ + errorMessage: "Failed to execute transaction", + errorGroup: "Failed to execute transaction", + errorStackGroup: "Unknown stack group", + isUserError: false, + isUserRejectedError: false, + parentError: expect.objectContaining({ + errorMessage: undefined, + errorGroup: "Unknown group", + errorStackGroup: "Unknown stack group", + errorDepth: 1, + isUserError: false, + isUserRejectedError: false, + }), + }) + ); + }); + + it("should handle slippage errors", () => { + const error: ErrorLike = { + message: "Router: mark price lower than limit", + }; + + const result = parseError(error); + + expect(result).toEqual( + expect.objectContaining({ + errorMessage: "Router: mark price lower than limit", + txErrorType: TxErrorType.Slippage, + isUserError: false, + errorGroup: "Txn Error: SLIPPAGE", + }) + ); + }); + + it("should handle network change errors", () => { + const error: ErrorLike = { + message: "network changed", + }; + + const result = parseError(error); + + expect(result).toEqual( + expect.objectContaining({ + errorMessage: "network changed", + txErrorType: TxErrorType.NetworkChanged, + isUserError: true, + errorGroup: "Txn Error: NETWORK_CHANGED", + }) + ); + }); + + it("should handle additional validation info", () => { + const error: ErrorLike = { + message: "Transaction failed", + errorSource: "getCallStaticError", + isAdditionalValidationPassed: false, + additionalValidationType: "tryCallStatic", + }; + + const result = parseError(error); + + expect(result).toEqual( + expect.objectContaining({ + errorMessage: "Transaction failed", + errorSource: "getCallStaticError", + isAdditionalValidationPassed: false, + additionalValidationType: "tryCallStatic", + }) + ); + }); + }); +}); diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/__tests__/positions.spec.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/__tests__/positions.spec.ts index e0d012be..8b930569 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/__tests__/positions.spec.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/__tests__/positions.spec.ts @@ -1,21 +1,24 @@ -import {beforeEach, describe, expect, it, Mock, vi} from "vitest"; -import {MarketInfo} from "../../types/markets.js"; -import {Token} from "../../types/tokens.js"; -import {bigMath} from "../bigmath.js"; -import {getPositionFee, getPriceImpactForPosition} from "../fees/index.js"; -import {getCappedPoolPnl, getMarketPnl, getPoolUsdWithoutPnl} from "../markets.js"; +import { describe, expect, it, vi, beforeEach, Mock } from "vitest"; + +import { MarketInfo } from "../../types/markets.js"; +import { Token } from "../../types/tokens.js"; +import { expandDecimals, USD_DECIMALS } from "../numbers.js"; + +import { bigMath } from "../bigmath"; +import { getPositionFee, getPriceImpactForPosition } from "../fees/index.js"; +import { getCappedPoolPnl, getMarketPnl, getPoolUsdWithoutPnl } from "../markets"; import { - getEntryPrice, - getLeverage, - getLiquidationPrice, - getPositionKey, - getPositionNetValue, - getPositionPendingFeesUsd, - getPositionPnlUsd, - getPositionValueUsd, - parsePositionKey, -} from "../positions.js"; -import {convertToUsd, getIsEquivalentTokens} from "../tokens.js"; + getEntryPrice, + getLeverage, + getLiquidationPrice, + getPositionKey, + getPositionNetValue, + getPositionPendingFeesUsd, + getPositionPnlUsd, + getPositionValueUsd, + parsePositionKey, +} from "../positions"; +import { convertToUsd, getIsEquivalentTokens } from "../tokens.js"; vi.mock("../markets", () => ({ ...vi.importActual("../markets"), @@ -113,11 +116,11 @@ describe("getPositionNetValue", () => { closingFeeUsd: 5n, uiFeeUsd: 20n, pnl: 200n, - totalPendingImpactDeltaUsd: 10n, - priceImpactDiffUsd: 15n, + 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 + 200n -100n + 50n = 1100n + expect(result).toBe(1100n); }); }); @@ -151,12 +154,17 @@ describe("getLeverage", () => { describe("getLiquidationPrice", () => { beforeEach(() => { (getPositionFee as Mock).mockReturnValue({ positionFeeUsd: 50n }); - (getPriceImpactForPosition as Mock).mockReturnValue(-100n); + (getPriceImpactForPosition as Mock).mockReturnValue({ priceImpactDeltaUsd: -100n, balanceWasImproved: false }); (getIsEquivalentTokens as Mock).mockReturnValue(false); }); 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, @@ -167,10 +175,10 @@ describe("getLiquidationPrice", () => { marketInfo, pendingFundingFeesUsd: 0n, pendingBorrowingFeesUsd: 0n, + pendingImpactAmount: 0n, minCollateralUsd: 100n, isLong: true, userReferralInfo: undefined, - pendingImpactAmount: 0n, }) ).toBeUndefined(); expect( @@ -183,20 +191,26 @@ describe("getLiquidationPrice", () => { marketInfo, pendingFundingFeesUsd: 0n, pendingBorrowingFeesUsd: 0n, + pendingImpactAmount: 0n, minCollateralUsd: 100n, isLong: true, userReferralInfo: undefined, - pendingImpactAmount: 0n, }) ).toBeUndefined(); }); it("computes liquidation price for non-equivalent tokens and isLong=true", () => { (getIsEquivalentTokens as Mock).mockReturnValue(false); + (convertToUsd as Mock).mockReturnValue(1000n); const marketInfo = { - indexToken: { decimals: 8 }, - minCollateralFactor: 1000n, // 0.001 + indexToken: { + decimals: 8, + prices: { minPrice: expandDecimals(1, USD_DECIMALS), maxPrice: expandDecimals(1, USD_DECIMALS) }, + }, + minCollateralFactorForLiquidation: 1000n, // 0.001 maxPositionImpactFactorForLiquidations: 500n, // 0.005 + maxPositionImpactFactorPositive: 1000n, // 0.01 + maxPositionImpactFactorNegative: 1000n, // 0.01 } as unknown as MarketInfo; const result = getLiquidationPrice({ @@ -208,10 +222,10 @@ describe("getLiquidationPrice", () => { marketInfo, pendingFundingFeesUsd: 0n, pendingBorrowingFeesUsd: 0n, + pendingImpactAmount: 0n, minCollateralUsd: 200n, isLong: true, userReferralInfo: undefined, - pendingImpactAmount: 0n, }); expect(result).toBeDefined(); }); diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/__tests__/prices.spec.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/__tests__/prices.spec.ts index b4c0b57a..a68ae0a8 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/__tests__/prices.spec.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/__tests__/prices.spec.ts @@ -1,9 +1,10 @@ -import {describe, expect, it} from "vitest"; +import { describe, expect, it } from "vitest"; -import {getMarkPrice, getOrderThresholdType, getShouldUseMaxPrice} from "../prices.js"; -import {OrderType} from "../../types/orders.js"; -import {TokenPrices} from "../../types/tokens.js"; -import {TriggerThresholdType} from "../../types/trade.js"; +import { OrderType } from "../../types/orders.js"; +import { TokenPrices } from "../../types/tokens.js"; +import { TriggerThresholdType } from "../../types/trade.js"; + +import { getMarkPrice, getOrderThresholdType, getShouldUseMaxPrice } from "../prices.js"; describe("getMarkPrice", () => { it("returns maxPrice if getShouldUseMaxPrice => true", () => { @@ -76,9 +77,8 @@ describe("getTriggerThresholdType", () => { expect(result).toBe(TriggerThresholdType.Below); }); - it("throws error for invalid order type", () => { - expect(() => getOrderThresholdType("SomeInvalidType" as unknown as OrderType, true)).toThrow( - "Invalid trigger order type" - ); + it("returns undefined for invalid order type", () => { + const result = getOrderThresholdType("SomeInvalidType" as unknown as OrderType, true); + expect(result).toBeUndefined(); }); }); diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/__tests__/referrals.spec.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/__tests__/referrals.spec.ts index e31f80d9..531a5a06 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/__tests__/referrals.spec.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/__tests__/referrals.spec.ts @@ -1,7 +1,7 @@ -import {describe, expect, it} from "vitest"; +import { zeroHash } from "viem"; +import { describe, expect, it } from "vitest"; -import {decodeReferralCode, encodeReferralCode, MAX_REFERRAL_CODE_LENGTH} from "../referrals.js"; -import {zeroHash} from "viem"; +import { decodeReferralCode, encodeReferralCode, MAX_REFERRAL_CODE_LENGTH } from "../referrals.js"; describe("utils/referrals", () => { it("decode(encode(x)) === x", () => { diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/__tests__/trade.spec.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/__tests__/trade.spec.ts index 1b1f4a03..7a935225 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/__tests__/trade.spec.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/__tests__/trade.spec.ts @@ -1,6 +1,6 @@ -import {describe, expect, it} from "vitest"; +import { describe, expect, it } from "vitest"; -import {applySlippageToMinOut, applySlippageToPrice} from "../../utils/trade/index.js"; +import { applySlippageToMinOut, applySlippageToPrice } from "../trade/index.js"; describe("applySlippageToPrice", () => { it("applies positive slippage if getShouldUseMaxPrice is true", () => { diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/bigmath.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/bigmath.ts index 361303f5..74d8f247 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/bigmath.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/bigmath.ts @@ -42,4 +42,7 @@ export const bigMath = { mulmod(x: bigint, y: bigint, m: bigint): bigint { return (x * y) % m; }, + clamp(value: bigint, min: bigint, max: bigint): bigint { + return bigMath.max(min, bigMath.min(value, max)); + }, }; diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/buildUrl.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/buildUrl.ts index 77d5fa93..7d526a32 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/buildUrl.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/buildUrl.ts @@ -3,5 +3,7 @@ import queryString from "query-string"; export function buildUrl(baseUrl: string, path: string, query?: Record) { const qs = query ? `?${queryString.stringify(query)}` : ""; + baseUrl = baseUrl.replace(/\/$/, ""); + return `${baseUrl}${path}${qs}`; } diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/errors/index.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/errors/index.ts new file mode 100644 index 00000000..8d308827 --- /dev/null +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/errors/index.ts @@ -0,0 +1,2 @@ +export * from "./parseError.js"; +export * from "./transactionsErrors.js"; diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/errors/parseError.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/errors/parseError.ts new file mode 100644 index 00000000..93ab0309 --- /dev/null +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/errors/parseError.ts @@ -0,0 +1,271 @@ +import cryptoJs from "crypto-js"; +import { Abi, decodeErrorResult } from "viem"; + +import { abis } from "../../abis/index.js"; + +import { + CustomErrorName, + TxErrorType, + extractDataFromError, + extractTxnError, + getIsUserError, + getIsUserRejectedError, +} from "./transactionsErrors.js"; + +export type OrderErrorContext = + | "simulation" + | "gasLimit" + | "gasPrice" + | "bestNonce" + | "sending" + | "pending" + | "relayer" + | "minting" + | "execution" + | "unknown"; + +export type ErrorLike = { + message?: string; + stack?: string; + name?: string; + code?: number | string; + data?: any; + error?: ErrorLike; + errorSource?: string; + errorContext?: OrderErrorContext; + parentError?: ErrorLike; + tags?: string; + isAdditionalValidationPassed?: boolean; + additionalValidationType?: string; + info?: { + error?: ErrorLike; + }; +}; + +export type ErrorData = { + errorContext?: OrderErrorContext; + errorMessage?: string; + errorGroup?: string; + errorStack?: string; + errorStackHash?: string; + errorStackGroup?: string; + errorName?: string; + contractError?: string; + contractErrorArgs?: any; + isUserError?: boolean; + isUserRejectedError?: boolean; + reason?: string; + data?: any; + txErrorType?: TxErrorType; + txErrorData?: unknown; + errorSource?: string; + isAdditionalValidationPassed?: boolean; + additionalValidationType?: string; + parentError?: ErrorData; + errorDepth?: number; +}; + +const URL_REGEXP = + /((?:http[s]?:\/\/.)?(?:www\.)?[-a-zA-Z0-9@%._\\+~#=]{2,256}\.[a-z]{2,6}\b(?::\d+)?)(?:[-a-zA-Z0-9@:%_\\+.~#?&\\/\\/=]*)/gi; + +const MAX_ERRORS_DEPTH = 1; + +export function extendError( + error: ErrorLike, + params: { + errorContext?: OrderErrorContext; + errorSource?: string; + isAdditionalValidationPassed?: boolean; + additionalValidationType?: string; + data?: any; + } +): ErrorLike { + error.errorContext = params.errorContext; + error.errorSource = params.errorSource; + error.isAdditionalValidationPassed = params.isAdditionalValidationPassed; + error.additionalValidationType = params.additionalValidationType; + error.data = params.data; + + return error; +} + +export function parseError(error: ErrorLike | string | undefined, errorDepth = 0): ErrorData | undefined { + if (errorDepth > MAX_ERRORS_DEPTH) { + return undefined; + } + + // all human readable details are in info field + const errorInfo = typeof error === "string" ? undefined : error?.info?.error; + const errorSource = typeof error === "string" ? undefined : error?.errorSource; + const errorContext: OrderErrorContext | undefined = typeof error === "string" ? undefined : error?.errorContext; + const isAdditionalValidationPassed = typeof error === "string" ? undefined : error?.isAdditionalValidationPassed; + const additionalValidationType = typeof error === "string" ? undefined : error?.additionalValidationType; + const data = typeof error === "string" ? undefined : error?.data; + + let errorMessage = "Unknown error"; + let errorStack: string | undefined = undefined; + let errorStackHash: string | undefined = undefined; + let errorName: string | undefined = undefined; + let contractError: string | undefined = undefined; + let contractErrorArgs: any = undefined; + let txErrorType: TxErrorType | undefined = undefined; + let errorGroup: string | undefined = "Unknown group"; + let errorStackGroup = "Unknown stack group"; + let txErrorData: any = undefined; + let isUserError: boolean | undefined = undefined; + let isUserRejectedError: boolean | undefined = undefined; + let parentError: ErrorData | undefined = undefined; + + try { + errorMessage = hasMessage(errorInfo) + ? errorInfo.message ?? (hasMessage(error) ? error.message : String(error)) + : String(error); + + errorStack = hasStack(error) ? error.stack : undefined; + + if (hasName(errorInfo)) { + errorName = errorInfo.name; + } else if (hasName(error)) { + errorName = error.name; + } + + try { + let txError: ReturnType | undefined; + + if (errorInfo) { + txError = extractTxnError(errorInfo); + } else if (error && typeof error === "object") { + txError = extractTxnError(error); + } + + if (txError && txError.length) { + const [message, type, errorData] = txError; + errorMessage = message; + txErrorType = type || undefined; + txErrorData = errorData; + isUserError = type ? getIsUserError(type) : false; + isUserRejectedError = type ? getIsUserRejectedError(type) : false; + } + } catch (e) { + // + } + + if (errorMessage) { + const errorData = extractDataFromError(errorMessage) ?? extractDataFromError((error as any)?.message); + if (errorData) { + const parsedError = decodeErrorResult({ + abi: abis.CustomErrors as Abi, + data: errorData as `0x${string}`, + }); + + if (parsedError) { + contractError = parsedError.errorName; + contractErrorArgs = parsedError.args; + } + } + } + + if (typeof error !== "string" && error?.parentError) { + parentError = parseError(error.parentError, errorDepth + 1); + } + } catch (e) { + // + } + + if (errorStack) { + errorStackHash = cryptoJs.SHA256(errorStack).toString(cryptoJs.enc.Hex); + errorStackGroup = errorStack.slice(0, 300); + errorStackGroup = errorStackGroup.replace(URL_REGEXP, "$1"); + errorStackGroup = errorStackGroup.replace(/\d+/g, "XXX"); + } + + if (txErrorType) { + errorGroup = `Txn Error: ${txErrorType}`; + } else if (errorMessage) { + errorGroup = errorMessage.slice(0, 300); + errorGroup = errorGroup.replace(URL_REGEXP, "$1"); + errorGroup = errorGroup.replace(/\d+/g, "XXX"); + errorGroup = errorGroup.slice(0, 50); + } else if (errorName) { + errorGroup = errorName; + } + + return { + errorMessage, + errorGroup, + errorStackGroup, + errorStack, + errorStackHash, + errorName, + contractError, + contractErrorArgs, + errorContext, + isUserError, + data, + isUserRejectedError, + txErrorType, + txErrorData, + errorSource, + parentError, + isAdditionalValidationPassed, + additionalValidationType, + errorDepth, + }; +} + +export function isContractError(error: ErrorData, errorType: CustomErrorName) { + return error.contractError === errorType; +} + +function hasMessage(error: unknown): error is { message: string } { + return !!error && typeof error === "object" && typeof (error as { message: string }).message === "string"; +} + +function hasStack(error: unknown): error is { stack: string } { + return !!error && typeof error === "object" && typeof (error as { stack: string }).stack === "string"; +} + +function hasName(error: unknown): error is { name: string } { + return !!error && typeof error === "object" && typeof (error as { name: string }).name === "string"; +} + +export class CustomError extends Error { + isGmxCustomError = true; + args: any; + + constructor({ name, message, args }: { name: string; message: string; args: any }) { + super(message); + this.name = name; + this.args = args; + } +} + +export function isCustomError(error: Error | undefined): error is CustomError { + return (error as CustomError)?.isGmxCustomError === true; +} + +export function getCustomError(error: Error): CustomError | Error { + const data = (error as any)?.info?.error?.data ?? (error as any)?.data; + + let prettyErrorName = error.name; + let prettyErrorMessage = error.message; + let prettyErrorArgs: any = undefined; + + try { + const parsedError = decodeErrorResult({ + abi: abis.CustomErrors, + data: data, + }); + + prettyErrorArgs = parsedError.args; + + prettyErrorName = parsedError.errorName; + prettyErrorMessage = JSON.stringify(parsedError, null, 2); + } catch (decodeError) { + return error; + } + + const prettyError = new CustomError({ name: prettyErrorName, message: prettyErrorMessage, args: prettyErrorArgs }); + + return prettyError; +} diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/contracts.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/errors/transactionsErrors.ts similarity index 70% rename from src/Managing.Web3Proxy/src/generated/gmxsdk/utils/contracts.ts rename to src/Managing.Web3Proxy/src/generated/gmxsdk/utils/errors/transactionsErrors.ts index 48b4bbe9..fa3c9a00 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/contracts.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/errors/transactionsErrors.ts @@ -14,20 +14,28 @@ const TX_ERROR_PATTERNS: { [key in TxErrorType]: ErrorPattern[] } = { { msg: "insufficient funds for gas" }, { msg: "not enough funds for gas" }, { msg: "failed to execute call with revert code InsufficientGasFunds" }, + { msg: "insufficient funds for transfer" }, ], [TxErrorType.UserDenied]: [ { msg: "User denied transaction signature" }, { msg: "User rejected" }, + { msg: "User cancelled" }, + { msg: "Cancelled" }, + { msg: "Cancelled by user" }, { msg: "user rejected action" }, { msg: "ethers-user-denied" }, - { msg: "User canceled" }, + { msg: "Action cancelled by user" }, { msg: "Signing aborted by user" }, ], [TxErrorType.Slippage]: [ { msg: "Router: mark price lower than limit" }, { msg: "Router: mark price higher than limit" }, ], - [TxErrorType.NetworkChanged]: [{ msg: "network changed" }, { msg: "Invalid network" }], + [TxErrorType.NetworkChanged]: [ + { msg: "network changed" }, + { msg: "Invalid network" }, + { msg: "chainId should be same" }, + ], [TxErrorType.Expired]: [{ msg: "Request expired" }], [TxErrorType.RpcError]: [ // @see https://eips.ethereum.org/EIPS/eip-1474#error-codes @@ -52,14 +60,34 @@ const TX_ERROR_PATTERNS: { [key in TxErrorType]: ErrorPattern[] } = { ], }; +export enum CustomErrorName { + EndOfOracleSimulation = "EndOfOracleSimulation", + InsufficientExecutionFee = "InsufficientExecutionFee", + OrderNotFulfillableAtAcceptablePrice = "OrderNotFulfillableAtAcceptablePrice", + InsufficientSwapOutputAmount = "InsufficientSwapOutputAmount", +} + +export function getIsUserRejectedError(errorType: TxErrorType) { + return errorType === TxErrorType.UserDenied; +} + +export function getIsUserError(errorType: TxErrorType) { + return [TxErrorType.UserDenied, TxErrorType.NetworkChanged, TxErrorType.Expired, TxErrorType.NotEnoughFunds].includes( + errorType + ); +} + export type TxError = { message?: string; - code?: number; + code?: number | string; data?: any; error?: any; }; -export function extractError(ex: TxError): [string, TxErrorType | null, any] | [] { +/** + * @deprecated Use `parseError` instead. + */ +export function extractTxnError(ex: TxError): [string, TxErrorType | null, any] | [] { if (!ex) { return []; } @@ -102,3 +130,18 @@ export function extractError(ex: TxError): [string, TxErrorType | null, any] | [ return [message, null, ex.data]; } + +/** + * @deprecated Use `parseError` instead. + */ +export function extractDataFromError(errorMessage: unknown) { + if (typeof errorMessage !== "string") return null; + + const pattern = /data="([^"]+)"/; + const match = errorMessage.match(pattern); + + if (match && match[1]) { + return match[1]; + } + return null; +} diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/fees/estimateOraclePriceCount.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/fees/estimateOraclePriceCount.ts index b1d7c584..7a16e60b 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/fees/estimateOraclePriceCount.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/fees/estimateOraclePriceCount.ts @@ -1,9 +1,9 @@ // @see https://github.com/gmx-io/gmx-synthetics/blob/6ed9be061d8fcc0dc7bc5d34dee3bf091408a1bf/contracts/gas/GasUtils.sol#L218-L234 -export function estimateDepositOraclePriceCount(swapsCount: number): bigint { +export function estimateDepositOraclePriceCount(swapsCount: number | bigint): bigint { return 3n + BigInt(swapsCount); } -export function estimateWithdrawalOraclePriceCount(swapsCount: number): bigint { +export function estimateWithdrawalOraclePriceCount(swapsCount: bigint): bigint { return 3n + BigInt(swapsCount); } diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/fees/executionFee.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/fees/executionFee.ts index c83b70c5..4b90a60f 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/fees/executionFee.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/fees/executionFee.ts @@ -1,20 +1,23 @@ -import {getExcessiveExecutionFee, getHighExecutionFee} from "../../configs/chains.js"; +import {ContractsChainId, getExcessiveExecutionFee, getHighExecutionFee, MIN_EXECUTION_FEE_USD} from "../../configs/chains.js"; import {USD_DECIMALS} from "../../configs/factors.js"; import {NATIVE_TOKEN_ADDRESS} from "../../configs/tokens.js"; -import {ExecutionFee, GasLimitsConfig} from "../../types/fees.js"; +import {ExecutionFee, GasLimitsConfig, L1ExpressOrderGasReference} from "../../types/fees.js"; import {DecreasePositionSwapType} from "../../types/orders.js"; -import {TokensData} from "../../types/tokens.js"; +import {TokenData, TokensData} from "../../types/tokens.js"; +import { bigMath } from "../bigmath.js"; import {applyFactor, expandDecimals} from "../numbers.js"; -import {convertToUsd, getTokenData} from "../tokens.js"; +import {convertBetweenTokens, convertToTokenAmount, convertToUsd, getTokenData} from "../tokens.js"; export function getExecutionFee( chainId: number, gasLimits: GasLimitsConfig, + // TODO optimize we only need the native token data tokensData: TokensData, estimatedGasLimit: bigint, gasPrice: bigint, - oraclePriceCount: bigint + oraclePriceCount: bigint, + numberOfParts?: number ): ExecutionFee | undefined { const nativeToken = getTokenData(tokensData, NATIVE_TOKEN_ADDRESS); @@ -27,7 +30,17 @@ export function getExecutionFee( const gasLimit = baseGasLimit + applyFactor(estimatedGasLimit, multiplierFactor); // #endregion - const feeTokenAmount = gasLimit * gasPrice; + // avoid botanix gas spikes when chain is not actively used + const minGasCostUsd = MIN_EXECUTION_FEE_USD[chainId]; + const minGasCost = convertToTokenAmount(minGasCostUsd, nativeToken.decimals, nativeToken.prices.minPrice); + + let feeTokenAmountPerExecution = gasLimit * gasPrice; + + if (minGasCost) { + feeTokenAmountPerExecution = bigMath.max(feeTokenAmountPerExecution, minGasCost); + } + + const feeTokenAmount = feeTokenAmountPerExecution * BigInt(numberOfParts ?? 1); const feeUsd = convertToUsd(feeTokenAmount, nativeToken.decimals, nativeToken.prices.minPrice)!; @@ -44,6 +57,139 @@ export function getExecutionFee( }; } +export function estimateRelayerGasLimit({ + gasLimits, + tokenPermitsCount, + feeSwapsCount, + feeExternalCallsGasLimit, + oraclePriceCount, + transactionPayloadGasLimit, + l1GasLimit, +}: { + gasLimits: GasLimitsConfig; + tokenPermitsCount: number; + feeSwapsCount: number; + feeExternalCallsGasLimit: bigint; + oraclePriceCount: number; + transactionPayloadGasLimit: bigint; + l1GasLimit: bigint; +}) { + const feeSwapsGasLimit = gasLimits.singleSwap * BigInt(feeSwapsCount); + const oraclePricesGasLimit = gasLimits.estimatedGasFeePerOraclePrice * BigInt(oraclePriceCount); + const tokenPermitsGasLimit = gasLimits.tokenPermitGasLimit * BigInt(tokenPermitsCount); + + const relayParamsGasLimit = feeSwapsGasLimit + oraclePricesGasLimit + tokenPermitsGasLimit + feeExternalCallsGasLimit; + + return relayParamsGasLimit + transactionPayloadGasLimit + l1GasLimit; +} + +export function approximateL1GasBuffer({ + l1Reference, + sizeOfData, +}: { + l1Reference: L1ExpressOrderGasReference; + sizeOfData: bigint; +}) { + const evaluated = Math.round( + (Number(l1Reference.gasLimit) * Math.log(Number(sizeOfData))) / Math.log(Number(l1Reference.sizeOfData)) + ); + + const l1GasLimit = Math.abs(evaluated) < Infinity ? BigInt(evaluated) : l1Reference.gasLimit; + + return l1GasLimit; +} + +export function estimateBatchGasLimit({ + gasLimits, + createOrdersCount, + updateOrdersCount, + cancelOrdersCount, + externalCallsGasLimit, + isGmxAccount, +}: { + gasLimits: GasLimitsConfig; + createOrdersCount: number; + updateOrdersCount: number; + cancelOrdersCount: number; + externalCallsGasLimit: bigint; + isGmxAccount: boolean; +}) { + const createOrdersGasLimit = gasLimits.createOrderGasLimit * BigInt(createOrdersCount); + const updateOrdersGasLimit = gasLimits.updateOrderGasLimit * BigInt(updateOrdersCount); + const cancelOrdersGasLimit = gasLimits.cancelOrderGasLimit * BigInt(cancelOrdersCount); + const gmxAccountOverhead = isGmxAccount ? gasLimits.gmxAccountCollateralGasLimit : 0n; + + return ( + createOrdersGasLimit + updateOrdersGasLimit + cancelOrdersGasLimit + externalCallsGasLimit + gmxAccountOverhead + ); +} + +export function estimateBatchMinGasPaymentTokenAmount({ + chainId, + gasPaymentToken, + isGmxAccount, + relayFeeToken, + gasPrice, + gasLimits, + l1Reference, + tokensData, + createOrdersCount = 1, + updateOrdersCount = 0, + cancelOrdersCount = 0, + executionFeeAmount, +}: { + chainId: ContractsChainId; + isGmxAccount: boolean; + gasLimits: GasLimitsConfig; + gasPaymentToken: TokenData; + relayFeeToken: TokenData; + tokensData: TokensData; + gasPrice: bigint; + l1Reference: L1ExpressOrderGasReference | undefined; + createOrdersCount: number; + updateOrdersCount: number; + cancelOrdersCount: number; + executionFeeAmount: bigint | undefined; +}) { + const batchGasLimit = estimateBatchGasLimit({ + gasLimits, + createOrdersCount, + updateOrdersCount, + cancelOrdersCount, + externalCallsGasLimit: 0n, + isGmxAccount, + }); + + const relayerGasLimit = estimateRelayerGasLimit({ + gasLimits, + tokenPermitsCount: 0, + feeSwapsCount: relayFeeToken.address === gasPaymentToken.address ? 0 : 1, + feeExternalCallsGasLimit: 0n, + oraclePriceCount: 2, + transactionPayloadGasLimit: batchGasLimit, + l1GasLimit: l1Reference?.gasLimit ?? 0n, + }); + + const gasLimit = relayerGasLimit + batchGasLimit; + + const feeAmount = gasLimit * gasPrice; + + const executionGasLimit = estimateExecuteIncreaseOrderGasLimit(gasLimits, { + swapsCount: 2, + callbackGasLimit: 0n, + }); + + const executionFee = + executionFeeAmount ?? + getExecutionFee(chainId, gasLimits, tokensData, executionGasLimit, gasPrice, 4n)?.feeTokenAmount; + + let totalFee = feeAmount + (executionFee ?? 0n); + + const minGasPaymentTokenBalance = convertBetweenTokens(totalFee, relayFeeToken, gasPaymentToken, false)!; + + return minGasPaymentTokenBalance; +} + /** * Copy from contract: `estimateExecuteIncreaseOrderGasLimit` */ @@ -92,15 +238,12 @@ export function estimateExecuteSwapOrderGasLimit( export function estimateExecuteDepositGasLimit( gasLimits: GasLimitsConfig, deposit: { - // We do not use this yet - longTokenSwapsCount?: number; - // We do not use this yet - shortTokenSwapsCount?: number; + swapsCount?: number | bigint; callbackGasLimit?: bigint; } ) { const gasPerSwap = gasLimits.singleSwap; - const swapsCount = BigInt((deposit.longTokenSwapsCount ?? 0) + (deposit.shortTokenSwapsCount ?? 0)); + const swapsCount = BigInt(deposit.swapsCount ?? 0); const gasForSwaps = swapsCount * gasPerSwap; return gasLimits.depositToken + (deposit.callbackGasLimit ?? 0n) + gasForSwaps; @@ -111,11 +254,11 @@ export function estimateExecuteGlvDepositGasLimit( { marketsCount, isMarketTokenDeposit, + swapsCount, }: { - isMarketTokenDeposit; + isMarketTokenDeposit: boolean; marketsCount: bigint; - initialLongTokenAmount: bigint; - initialShortTokenAmount: bigint; + swapsCount: bigint; } ) { const gasPerGlvPerMarket = gasLimits.glvPerMarketGasLimit; @@ -127,15 +270,20 @@ export function estimateExecuteGlvDepositGasLimit( return gasLimit; } - return gasLimit + gasLimits.depositToken; + const gasPerSwap = gasLimits.singleSwap; + const gasForSwaps = swapsCount * gasPerSwap; + + return gasLimit + gasLimits.depositToken + gasForSwaps; } export function estimateExecuteGlvWithdrawalGasLimit( gasLimits: GasLimitsConfig, { marketsCount, + swapsCount, }: { marketsCount: bigint; + swapsCount: bigint; } ) { const gasPerGlvPerMarket = gasLimits.glvPerMarketGasLimit; @@ -143,7 +291,10 @@ export function estimateExecuteGlvWithdrawalGasLimit( const glvWithdrawalGasLimit = gasLimits.glvWithdrawalGasLimit; const gasLimit = glvWithdrawalGasLimit + gasForGlvMarkets; - return gasLimit + gasLimits.withdrawalMultiToken; + const gasPerSwap = gasLimits.singleSwap; + const gasForSwaps = swapsCount * gasPerSwap; + + return gasLimit + gasLimits.withdrawalMultiToken + gasForSwaps; } /** @@ -153,14 +304,13 @@ export function estimateExecuteGlvWithdrawalGasLimit( */ export function estimateExecuteWithdrawalGasLimit( gasLimits: GasLimitsConfig, - withdrawal: { callbackGasLimit?: bigint } + withdrawal: { callbackGasLimit?: bigint; swapsCount?: bigint } ) { - // Swap is not used but supported in the contract. - // const gasPerSwap = gasLimits.singleSwap; - // const swapsCount = 0n; - // const gasForSwaps = swapsCount * gasPerSwap; + const gasPerSwap = gasLimits.singleSwap; + const swapsCount = withdrawal.swapsCount ?? 0n; + const gasForSwaps = swapsCount * gasPerSwap; - return gasLimits.withdrawalMultiToken + (withdrawal.callbackGasLimit ?? 0n); + return gasLimits.withdrawalMultiToken + (withdrawal.callbackGasLimit ?? 0n) + gasForSwaps; } /** diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/fees/index.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/fees/index.ts index b19af487..f10f39e6 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/fees/index.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/fees/index.ts @@ -1,29 +1,34 @@ -import {HIGH_PRICE_IMPACT_BPS} from "../../configs/factors.js"; -import {FeeItem} from "../../types/fees.js"; -import {MarketInfo} from "../../types/markets.js"; -import {SwapStats} from "../../types/trade.js"; -import {bigMath} from "../bigmath.js"; -import {applyFactor, getBasisPoints, PRECISION} from "../numbers.js"; +import { HIGH_PRICE_IMPACT_BPS } from "../../configs/factors.js"; +import { FeeItem } from "../../types/fees.js"; +import { MarketInfo } from "../../types/markets.js"; +import { SwapPricingType } from "../../types/orders.js"; +import { SwapStats } from "../../types/trade.js"; +import { bigMath } from "../../utils/bigmath.js"; +import { getOpenInterestForBalance } from "../markets.js"; +import { applyFactor, getBasisPoints, PRECISION } from "../../utils/numbers.js"; export * from "./estimateOraclePriceCount.js"; export * from "./executionFee.js"; export * from "./priceImpact.js"; - export function getSwapFee( marketInfo: MarketInfo, swapAmount: bigint, balanceWasImproved: boolean, - isAtomicSwap: boolean + swapPricingType: SwapPricingType ) { let factor: bigint; - if (isAtomicSwap) { - factor = BigInt(marketInfo.atomicSwapFeeFactor ?? 0); + if (swapPricingType === SwapPricingType.AtomicSwap) { + factor = marketInfo.atomicSwapFeeFactor; + } else if (swapPricingType === SwapPricingType.Withdrawal) { + factor = balanceWasImproved + ? marketInfo.withdrawalFeeFactorBalanceWasImproved ?? marketInfo.swapFeeFactorForBalanceWasImproved + : marketInfo.withdrawalFeeFactorBalanceWasNotImproved ?? marketInfo.swapFeeFactorForBalanceWasNotImproved; } else { - factor = BigInt(balanceWasImproved - ? (marketInfo.swapFeeFactorForBalanceWasImproved ?? 0) - : (marketInfo.swapFeeFactorForBalanceWasNotImproved ?? 0)); + factor = balanceWasImproved + ? marketInfo.swapFeeFactorForBalanceWasImproved + : marketInfo.swapFeeFactorForBalanceWasNotImproved; } return applyFactor(swapAmount, factor); @@ -36,9 +41,9 @@ export function getPositionFee( referralInfo: { totalRebateFactor: bigint; discountFactor: bigint } | undefined, uiFeeFactor?: bigint ) { - const factor = BigInt(balanceWasImproved - ? (marketInfo.positionFeeFactorForBalanceWasImproved ?? 0) - : (marketInfo.positionFeeFactorForBalanceWasNotImproved ?? 0)); + const factor = balanceWasImproved + ? marketInfo.positionFeeFactorForBalanceWasImproved + : marketInfo.positionFeeFactorForBalanceWasNotImproved; let positionFeeUsd = applyFactor(sizeDeltaUsd, factor); const uiFeeUsd = applyFactor(sizeDeltaUsd, uiFeeFactor ?? 0n); @@ -61,17 +66,15 @@ export function getPositionFee( } export function getFundingFactorPerPeriod(marketInfo: MarketInfo, isLong: boolean, periodInSeconds: number) { - const { fundingFactorPerSecond, longsPayShorts, longInterestUsd, shortInterestUsd } = marketInfo; + const { fundingFactorPerSecond, longsPayShorts } = marketInfo; - const largerInterestUsd = bigMath.max(longInterestUsd, shortInterestUsd); + const longInterestUsd = getOpenInterestForBalance(marketInfo, true); + const shortInterestUsd = getOpenInterestForBalance(marketInfo, false); const payingInterestUsd = longsPayShorts ? longInterestUsd : shortInterestUsd; const receivingInterestUsd = longsPayShorts ? shortInterestUsd : longInterestUsd; - let fundingForPayingSide = 0n; - if (payingInterestUsd !== 0n) { - fundingForPayingSide = bigMath.mulDiv(BigInt(fundingFactorPerSecond ?? 0), largerInterestUsd, payingInterestUsd); - } + const fundingForPayingSide = fundingFactorPerSecond; let fundingForReceivingSide = 0n; if (receivingInterestUsd !== 0n) { fundingForReceivingSide = bigMath.mulDiv(fundingForPayingSide, payingInterestUsd, receivingInterestUsd); @@ -98,9 +101,9 @@ export function getFundingFeeRateUsd( } export function getBorrowingFactorPerPeriod(marketInfo: MarketInfo, isLong: boolean, periodInSeconds: number) { - const factorPerSecond = BigInt(isLong - ? (marketInfo.borrowingFactorPerSecondForLongs ?? 0) - : (marketInfo.borrowingFactorPerSecondForShorts ?? 0)); + const factorPerSecond = isLong + ? marketInfo.borrowingFactorPerSecondForLongs + : marketInfo.borrowingFactorPerSecondForShorts; return factorPerSecond * BigInt(periodInSeconds || 1); } diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/fees/priceImpact.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/fees/priceImpact.ts index ae269096..2595baa3 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/fees/priceImpact.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/fees/priceImpact.ts @@ -1,10 +1,11 @@ -import {bigNumberify} from "../tradeHistory.js"; -import {MarketInfo} from "../../types/markets.js"; -import {TokenData} from "../../types/tokens.js"; -import {bigMath} from "../bigmath.js"; -import {getTokenPoolType} from "../markets.js"; -import {applyFactor, expandDecimals, getBasisPoints, roundUpMagnitudeDivision} from "../numbers.js"; -import {convertToTokenAmount, convertToUsd, getMidPrice} from "../tokens.js"; +import { MarketInfo } from "../../types/markets.js"; +import { TokenData } from "../../types/tokens.js"; +import { TradeFees } from "../../types/trade.js"; +import { bigMath } from "../bigmath.js"; +import { getOpenInterestForBalance, getTokenPoolType } from "../../utils/markets.js"; +import { applyFactor, expandDecimals, getBasisPoints, roundUpMagnitudeDivision } from "../../utils/numbers.js"; +import { convertToTokenAmount, convertToUsd, getMidPrice } from "../../utils/tokens.js"; +import { bigNumberify } from "../../utils/tradeHistory.js"; export function getPriceImpactByAcceptablePrice(p: { sizeDeltaUsd: bigint; @@ -143,7 +144,8 @@ export function getPriceImpactForPosition( isLong: boolean, opts: { fallbackToZero?: boolean } = {} ) { - const { longInterestUsd, shortInterestUsd } = marketInfo; + const longInterestUsd = getOpenInterestForBalance(marketInfo, true); + const shortInterestUsd = getOpenInterestForBalance(marketInfo, false); const { currentLongUsd, currentShortUsd, nextLongUsd, nextShortUsd } = getNextOpenInterestParams({ currentLongUsd: longInterestUsd, @@ -159,7 +161,8 @@ export function getPriceImpactForPosition( nextShortUsd, factorPositive: marketInfo.positionImpactFactorPositive, factorNegative: marketInfo.positionImpactFactorNegative, - exponentFactor: marketInfo.positionImpactExponentFactor, + exponentFactorPositive: marketInfo.positionImpactExponentFactorPositive, + exponentFactorNegative: marketInfo.positionImpactExponentFactorNegative, fallbackToZero: opts.fallbackToZero, }); @@ -190,7 +193,8 @@ export function getPriceImpactForPosition( nextShortUsd: virtualInventoryParams.nextShortUsd, factorPositive: marketInfo.positionImpactFactorPositive, factorNegative: marketInfo.positionImpactFactorNegative, - exponentFactor: marketInfo.positionImpactExponentFactor, + exponentFactorPositive: marketInfo.positionImpactExponentFactorPositive, + exponentFactorNegative: marketInfo.positionImpactExponentFactorNegative, fallbackToZero: opts.fallbackToZero, }); @@ -252,7 +256,6 @@ export function getPriceImpactForSwap( tokenAPoolType === "long" ? [usdDeltaTokenA, usdDeltaTokenB] : [usdDeltaTokenB, usdDeltaTokenA]; const { longPoolUsd, shortPoolUsd, nextLongPoolUsd, nextShortPoolUsd } = getNextPoolAmountsParams({ - marketInfo, longToken, shortToken, longPoolAmount: marketInfo.longPoolAmount, @@ -268,7 +271,8 @@ export function getPriceImpactForSwap( nextShortUsd: nextShortPoolUsd, factorPositive: marketInfo.swapImpactFactorPositive, factorNegative: marketInfo.swapImpactFactorNegative, - exponentFactor: marketInfo.swapImpactExponentFactor, + exponentFactorPositive: marketInfo.swapImpactExponentFactor, + exponentFactorNegative: marketInfo.swapImpactExponentFactor, fallbackToZero: opts.fallbackToZero, }); @@ -290,7 +294,6 @@ export function getPriceImpactForSwap( } const virtualInventoryParams = getNextPoolAmountsParams({ - marketInfo, longToken, shortToken, longPoolAmount: virtualInventoryLong, @@ -306,7 +309,8 @@ export function getPriceImpactForSwap( nextShortUsd: virtualInventoryParams.nextShortPoolUsd, factorPositive: marketInfo.swapImpactFactorPositive, factorNegative: marketInfo.swapImpactFactorNegative, - exponentFactor: marketInfo.swapImpactExponentFactor, + exponentFactorPositive: marketInfo.swapImpactExponentFactor, + exponentFactorNegative: marketInfo.swapImpactExponentFactor, fallbackToZero: opts.fallbackToZero, }); @@ -371,7 +375,6 @@ function getNextOpenInterestParams(p: { } export function getNextPoolAmountsParams(p: { - marketInfo: MarketInfo; longToken: TokenData; shortToken: TokenData; longPoolAmount: bigint; @@ -379,7 +382,7 @@ export function getNextPoolAmountsParams(p: { longDeltaUsd: bigint; shortDeltaUsd: bigint; }) { - const { marketInfo, longToken, shortToken, longPoolAmount, shortPoolAmount, longDeltaUsd, shortDeltaUsd } = p; + const { longToken, shortToken, longPoolAmount, shortPoolAmount, longDeltaUsd, shortDeltaUsd } = p; const longPrice = getMidPrice(longToken.prices); const shortPrice = getMidPrice(shortToken.prices); @@ -387,11 +390,8 @@ export function getNextPoolAmountsParams(p: { const longPoolUsd = convertToUsd(longPoolAmount, longToken.decimals, longPrice)!; const shortPoolUsd = convertToUsd(shortPoolAmount, shortToken.decimals, shortPrice)!; - const longPoolUsdAdjustment = convertToUsd(marketInfo.longPoolAmountAdjustment, longToken.decimals, longPrice)!; - const shortPoolUsdAdjustment = convertToUsd(marketInfo.shortPoolAmountAdjustment, shortToken.decimals, shortPrice)!; - - const nextLongPoolUsd = longPoolUsd + longDeltaUsd + longPoolUsdAdjustment; - const nextShortPoolUsd = shortPoolUsd + shortDeltaUsd + shortPoolUsdAdjustment; + const nextLongPoolUsd = longPoolUsd + longDeltaUsd; + const nextShortPoolUsd = shortPoolUsd + shortDeltaUsd; return { longPoolUsd, @@ -411,7 +411,8 @@ export function getPriceImpactUsd(p: { nextShortUsd: bigint; factorPositive: bigint; factorNegative: bigint; - exponentFactor: bigint; + exponentFactorPositive: bigint; + exponentFactorNegative: bigint; fallbackToZero?: boolean; }) { const { nextLongUsd, nextShortUsd } = p; @@ -429,22 +430,22 @@ export function getPriceImpactUsd(p: { const currentDiff = bigMath.abs(p.currentLongUsd - p.currentShortUsd); const nextDiff = bigMath.abs(nextLongUsd - nextShortUsd); - const isSameSideRebalance = p.currentLongUsd < p.currentShortUsd === nextLongUsd < nextShortUsd; + const balanceWasImproved = nextDiff < currentDiff; let priceImpactDeltaUsd: bigint; - const balanceWasImproved = nextDiff < currentDiff; if (isSameSideRebalance) { const hasPositiveImpact = nextDiff < currentDiff; const factor = hasPositiveImpact ? p.factorPositive : p.factorNegative; + const exponentFactor = hasPositiveImpact ? p.exponentFactorPositive : p.exponentFactorNegative; priceImpactDeltaUsd = calculateImpactForSameSideRebalance({ currentDiff, nextDiff, hasPositiveImpact, factor, - exponentFactor: p.exponentFactor, + exponentFactor, }); } else { priceImpactDeltaUsd = calculateImpactForCrossoverRebalance({ @@ -452,7 +453,8 @@ export function getPriceImpactUsd(p: { nextDiff, factorPositive: p.factorPositive, factorNegative: p.factorNegative, - exponentFactor: p.exponentFactor, + exponentFactorPositive: p.exponentFactorPositive, + exponentFactorNegative: p.exponentFactorNegative, }); } @@ -490,12 +492,13 @@ export function calculateImpactForCrossoverRebalance(p: { nextDiff: bigint; factorPositive: bigint; factorNegative: bigint; - exponentFactor: bigint; + exponentFactorPositive: bigint; + exponentFactorNegative: bigint; }) { - const { currentDiff, nextDiff, factorNegative, factorPositive, exponentFactor } = p; + const { currentDiff, nextDiff, factorNegative, factorPositive, exponentFactorPositive, exponentFactorNegative } = p; - const positiveImpact = applyImpactFactor(currentDiff, factorPositive, exponentFactor); - const negativeImpactUsd = applyImpactFactor(nextDiff, factorNegative, exponentFactor); + const positiveImpact = applyImpactFactor(currentDiff, factorPositive, exponentFactorPositive); + const negativeImpactUsd = applyImpactFactor(nextDiff, factorNegative, exponentFactorNegative); const deltaDiffUsd = bigMath.abs(positiveImpact - negativeImpactUsd); @@ -514,3 +517,17 @@ export function applyImpactFactor(diff: bigint, factor: bigint, exponent: bigint return result; } + +export function getCappedPriceImpactPercentageFromFees({ + fees, + isSwap, +}: { + fees: TradeFees | undefined; + isSwap: boolean; +}): bigint | undefined { + if (isSwap) { + return fees?.swapPriceImpact?.precisePercentage ?? 0n; + } + + return fees?.positionNetPriceImpact?.precisePercentage ?? 0n; +} diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/gelatoRelay.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/gelatoRelay.ts new file mode 100644 index 00000000..aecc33bb --- /dev/null +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/gelatoRelay.ts @@ -0,0 +1,5 @@ +import { GelatoRelay } from "@gelatonetwork/relay-sdk"; +import noop from "lodash/noop"; + +export const gelatoRelay = new GelatoRelay(); +gelatoRelay.onError(noop); diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/subgraph.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/indexers.ts similarity index 65% rename from src/Managing.Web3Proxy/src/generated/gmxsdk/utils/subgraph.ts rename to src/Managing.Web3Proxy/src/generated/gmxsdk/utils/indexers.ts index c1b8aae9..8e622d9e 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/subgraph.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/indexers.ts @@ -1,19 +1,21 @@ +import { SUBSQUID_PAGINATION_LIMIT } from "../configs/batch.js"; + export type GraphQlFilters = | { - or: GraphQlFilters[]; + OR: GraphQlFilters[]; } | { - and: GraphQlFilters[]; + AND: GraphQlFilters[]; } | { /** * `or` must be a single key-value pair in the object. */ - or?: never; + OR?: never; /** * `and` must be a single key-value pair in the object. */ - and?: never; + AND?: never; /** * Key must not start with an `_`. If you want to use nested filtering add `_` to the parent key itself if possible. * Otherwise, if for some reason the field name itself starts with an `_`, change these types. @@ -31,8 +33,8 @@ export type GraphQlFilters = | null; }; -export function buildFiltersBody(filters: GraphQlFilters): string { - const res = {}; +export function buildFiltersBody(filters: GraphQlFilters, options?: { enums?: Record }): string { + const res: Record = {}; let hadOr = false; let hadAnd = false; @@ -43,7 +45,11 @@ export function buildFiltersBody(filters: GraphQlFilters): string { } if (typeof value === "string") { - res[key] = `"${value}"`; + if (options?.enums?.[value]) { + res[key] = value; + } else { + res[key] = `"${value}"`; + } } else if (typeof value === "number") { res[key] = `${value}`; } else if (typeof value === "boolean") { @@ -54,11 +60,15 @@ export function buildFiltersBody(filters: GraphQlFilters): string { value .map((el: string | number | GraphQlFilters) => { if (typeof el === "string") { - return `"${el}"`; + if (options?.enums?.[el]) { + return el; + } else { + return `"${el}"`; + } } else if (typeof el === "number") { return `${el}`; } else { - const elemStr = buildFiltersBody(el); + const elemStr = buildFiltersBody(el, options); if (elemStr === "{}") { return ""; @@ -77,9 +87,9 @@ export function buildFiltersBody(filters: GraphQlFilters): string { } else if (value === null) { res[key] = null; } else { - const valueStr = buildFiltersBody(value); + const valueStr = buildFiltersBody(value, options); if (valueStr !== "{}") { - res[key + "_"] = buildFiltersBody(value); + res[key + "_"] = buildFiltersBody(value, options); } } @@ -107,3 +117,26 @@ export function buildFiltersBody(filters: GraphQlFilters): string { return `{${str}}`; } + +export async function queryPaginated( + fetcher: (limit: number, offset: number) => Promise, + limit = SUBSQUID_PAGINATION_LIMIT +): Promise { + let offset = 0; + + const results: T[] = []; + + // eslint-disable-next-line no-constant-condition + while (true) { + const page = await fetcher(limit, offset); + results.push(...page); + + if (page.length < limit) { + break; + } + + offset += limit; + } + + return results; +} diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/marketKeysAndConfigs.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/marketKeysAndConfigs.ts index 33615b29..fbf556f0 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/marketKeysAndConfigs.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/marketKeysAndConfigs.ts @@ -1,52 +1,51 @@ -import {hashDataMap} from "./hash.js"; - import { - ATOMIC_SWAP_FEE_FACTOR_KEY, - BORROWING_EXPONENT_FACTOR_KEY, - BORROWING_FACTOR_KEY, - FUNDING_DECREASE_FACTOR_PER_SECOND, - FUNDING_EXPONENT_FACTOR_KEY, - 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, - MAX_LENDABLE_IMPACT_USD_KEY, - MAX_OPEN_INTEREST_KEY, - MAX_PNL_FACTOR_FOR_TRADERS_KEY, - MAX_PNL_FACTOR_KEY, - MAX_POOL_AMOUNT_KEY, - MAX_POOL_USD_FOR_DEPOSIT_KEY, - MAX_POSITION_IMPACT_FACTOR_FOR_LIQUIDATIONS_KEY, - MAX_POSITION_IMPACT_FACTOR_KEY, - MIN_COLLATERAL_FACTOR_FOR_LIQUIDATION_KEY, - MIN_COLLATERAL_FACTOR_FOR_OPEN_INTEREST_MULTIPLIER_KEY, - MIN_COLLATERAL_FACTOR_KEY, - MIN_FUNDING_FACTOR_PER_SECOND, - MIN_POSITION_IMPACT_POOL_AMOUNT_KEY, - OPEN_INTEREST_IN_TOKENS_KEY, - OPEN_INTEREST_KEY, - OPEN_INTEREST_RESERVE_FACTOR_KEY, - POOL_AMOUNT_ADJUSTMENT_KEY, - POOL_AMOUNT_KEY, - POSITION_FEE_FACTOR_KEY, - POSITION_IMPACT_EXPONENT_FACTOR_KEY, - POSITION_IMPACT_FACTOR_KEY, - POSITION_IMPACT_POOL_AMOUNT_KEY, - POSITION_IMPACT_POOL_DISTRIBUTION_RATE_KEY, - RESERVE_FACTOR_KEY, - SWAP_FEE_FACTOR_KEY, - SWAP_IMPACT_EXPONENT_FACTOR_KEY, - SWAP_IMPACT_FACTOR_KEY, - SWAP_IMPACT_POOL_AMOUNT_KEY, - THRESHOLD_FOR_DECREASE_FUNDING, - THRESHOLD_FOR_STABLE_FUNDING, - VIRTUAL_MARKET_ID_KEY, - VIRTUAL_TOKEN_ID_KEY, + ATOMIC_SWAP_FEE_FACTOR_KEY, + BORROWING_EXPONENT_FACTOR_KEY, + BORROWING_FACTOR_KEY, + FUNDING_DECREASE_FACTOR_PER_SECOND, + FUNDING_EXPONENT_FACTOR_KEY, + 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, + MAX_LENDABLE_IMPACT_USD_KEY, + MAX_OPEN_INTEREST_KEY, + MAX_PNL_FACTOR_FOR_TRADERS_KEY, + MAX_PNL_FACTOR_KEY, + MAX_POOL_AMOUNT_KEY, + MAX_POOL_USD_FOR_DEPOSIT_KEY, + MAX_POSITION_IMPACT_FACTOR_FOR_LIQUIDATIONS_KEY, + MAX_POSITION_IMPACT_FACTOR_KEY, + MIN_COLLATERAL_FACTOR_FOR_LIQUIDATION_KEY, + MIN_COLLATERAL_FACTOR_FOR_OPEN_INTEREST_MULTIPLIER_KEY, + MIN_COLLATERAL_FACTOR_KEY, + MIN_FUNDING_FACTOR_PER_SECOND, + MIN_POSITION_IMPACT_POOL_AMOUNT_KEY, + OPEN_INTEREST_IN_TOKENS_KEY, + OPEN_INTEREST_KEY, + OPEN_INTEREST_RESERVE_FACTOR_KEY, + POOL_AMOUNT_KEY, + POSITION_FEE_FACTOR_KEY, + POSITION_IMPACT_EXPONENT_FACTOR_KEY, + POSITION_IMPACT_FACTOR_KEY, + POSITION_IMPACT_POOL_AMOUNT_KEY, + POSITION_IMPACT_POOL_DISTRIBUTION_RATE_KEY, + RESERVE_FACTOR_KEY, + SWAP_FEE_FACTOR_KEY, + SWAP_IMPACT_EXPONENT_FACTOR_KEY, + SWAP_IMPACT_FACTOR_KEY, + SWAP_IMPACT_POOL_AMOUNT_KEY, + THRESHOLD_FOR_DECREASE_FUNDING, + THRESHOLD_FOR_STABLE_FUNDING, + VIRTUAL_MARKET_ID_KEY, + VIRTUAL_TOKEN_ID_KEY, + WITHDRAWAL_FEE_FACTOR_KEY, } from "../configs/dataStore.js"; -import {MarketConfig} from "../configs/markets.js"; +import { MarketConfig } from "../configs/markets.js"; +import { hashDataMap } from "../utils/hash.js"; export function hashMarketConfigKeys(market: MarketConfig) { const marketAddress = market.marketTokenAddress; @@ -71,14 +70,6 @@ export function hashMarketConfigKeys(market: MarketConfig) { ["bytes32", "address", "address"], [MAX_POOL_USD_FOR_DEPOSIT_KEY, marketAddress, market.shortTokenAddress], ], - longPoolAmountAdjustment: [ - ["bytes32", "address", "address"], - [POOL_AMOUNT_ADJUSTMENT_KEY, marketAddress, market.longTokenAddress], - ], - shortPoolAmountAdjustment: [ - ["bytes32", "address", "address"], - [POOL_AMOUNT_ADJUSTMENT_KEY, marketAddress, market.shortTokenAddress], - ], reserveFactorLong: [ ["bytes32", "address", "bool"], [RESERVE_FACTOR_KEY, marketAddress, true], @@ -175,14 +166,6 @@ export function hashMarketConfigKeys(market: MarketConfig) { ["bytes32", "address", "bool"], [POSITION_FEE_FACTOR_KEY, marketAddress, false], ], - positionFeeFactorForPositiveImpact: [ - ["bytes32", "address", "bool"], - [POSITION_FEE_FACTOR_KEY, marketAddress, true], - ], - positionFeeFactorForNegativeImpact: [ - ["bytes32", "address", "bool"], - [POSITION_FEE_FACTOR_KEY, marketAddress, false], - ], positionImpactFactorPositive: [ ["bytes32", "address", "bool"], [POSITION_IMPACT_FACTOR_KEY, marketAddress, true], @@ -235,9 +218,13 @@ export function hashMarketConfigKeys(market: MarketConfig) { ["bytes32", "address", "bool"], [MIN_COLLATERAL_FACTOR_FOR_OPEN_INTEREST_MULTIPLIER_KEY, marketAddress, false], ], - positionImpactExponentFactor: [ - ["bytes32", "address"], - [POSITION_IMPACT_EXPONENT_FACTOR_KEY, marketAddress], + positionImpactExponentFactorPositive: [ + ["bytes32", "address", "bool"], + [POSITION_IMPACT_EXPONENT_FACTOR_KEY, marketAddress, true], + ], + positionImpactExponentFactorNegative: [ + ["bytes32", "address", "bool"], + [POSITION_IMPACT_EXPONENT_FACTOR_KEY, marketAddress, false], ], swapFeeFactorForBalanceWasImproved: [ ["bytes32", "address", "bool"], @@ -247,14 +234,6 @@ export function hashMarketConfigKeys(market: MarketConfig) { ["bytes32", "address", "bool"], [SWAP_FEE_FACTOR_KEY, marketAddress, false], ], - swapFeeFactorForPositiveImpact: [ - ["bytes32", "address", "bool"], - [SWAP_FEE_FACTOR_KEY, marketAddress, true], - ], - swapFeeFactorForNegativeImpact: [ - ["bytes32", "address", "bool"], - [SWAP_FEE_FACTOR_KEY, marketAddress, false], - ], atomicSwapFeeFactor: [ ["bytes32", "address"], [ATOMIC_SWAP_FEE_FACTOR_KEY, marketAddress], @@ -271,6 +250,14 @@ export function hashMarketConfigKeys(market: MarketConfig) { ["bytes32", "address"], [SWAP_IMPACT_EXPONENT_FACTOR_KEY, marketAddress], ], + withdrawalFeeFactorBalanceWasImproved: [ + ["bytes32", "address", "bool"], + [WITHDRAWAL_FEE_FACTOR_KEY, marketAddress, true], + ], + withdrawalFeeFactorBalanceWasNotImproved: [ + ["bytes32", "address", "bool"], + [WITHDRAWAL_FEE_FACTOR_KEY, marketAddress, false], + ], virtualMarketId: [ ["bytes32", "address"], [VIRTUAL_MARKET_ID_KEY, marketAddress], diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/markets.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/markets.ts index be93a2d5..381e0f90 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/markets.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/markets.ts @@ -1,4 +1,5 @@ import {BASIS_POINTS_DIVISOR} from "../configs/factors.js"; +import { MarketConfig } from "../configs/markets.js"; import {getTokenVisualMultiplier, NATIVE_TOKEN_ADDRESS} from "../configs/tokens.js"; import {ContractMarketPrices, Market, MarketInfo} from "../types/markets.js"; @@ -146,6 +147,12 @@ export function getOppositeCollateral(marketInfo: MarketInfo, tokenAddress: stri return undefined; } +export function getOppositeCollateralFromConfig(marketConfig: MarketConfig, tokenAddress: string) { + return marketConfig.shortTokenAddress === tokenAddress + ? marketConfig.longTokenAddress + : marketConfig.shortTokenAddress; +} + export function getAvailableUsdLiquidityForCollateral(marketInfo: MarketInfo, isLong: boolean) { const poolUsd = getPoolUsdWithoutPnl(marketInfo, isLong, "minPrice"); @@ -212,6 +219,17 @@ export function getOpenInterestInTokens(marketInfo: MarketInfo, isLong: boolean) return isLong ? marketInfo.longInterestInTokens : marketInfo.shortInterestInTokens; } +export function getOpenInterestForBalance(marketInfo: MarketInfo, isLong: boolean): bigint { + if (marketInfo.useOpenInterestInTokensForBalance) { + const interestInTokens = isLong ? marketInfo.longInterestInTokens : marketInfo.shortInterestInTokens; + const indexTokenPrice = getMidPrice(marketInfo.indexToken.prices); + + return convertToUsd(interestInTokens, marketInfo.indexToken.decimals, indexTokenPrice)!; + } + + return isLong ? marketInfo.longInterestUsd : marketInfo.shortInterestUsd; +} + export function getPriceForPnl(prices: TokenPrices, isLong: boolean, maximize: boolean) { // for long positions, pick the larger price to maximize pnl // for short positions, pick the smaller price to maximize pnl diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/multicall.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/multicall.ts index 752c2efb..d314c3a9 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/multicall.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/multicall.ts @@ -2,7 +2,7 @@ import {AbiId, abis as allAbis} from "../abis/index.js"; import {GmxSdk} from "../index.js"; import {sleep} from "./common.js"; -export const MAX_TIMEOUT = 60000; // Increased from 20s to 60s +export const MAX_TIMEOUT = 20000; export type MulticallProviderUrls = { primary: string; @@ -67,7 +67,7 @@ export class Multicall { const abis: any = {}; - const encodedPayload: { address: `0x${string}`; abi: any; functionName: string; args: any }[] = []; + const encodedPayload: { address: string; abi: any; functionName: string; args: any }[] = []; const contractKeys = Object.keys(request); @@ -87,8 +87,8 @@ export class Multicall { // Add Errors ABI to each contract ABI to correctly parse errors abis[contractCallConfig.contractAddress] = abis[contractCallConfig.contractAddress] || [ - ...allAbis[contractCallConfig.abiId], - ...allAbis.CustomErrors, + ...(allAbis[contractCallConfig.abiId] as any), + ...(allAbis.CustomErrors as any), ]; const abi = abis[contractCallConfig.contractAddress]; @@ -98,7 +98,7 @@ export class Multicall { }); encodedPayload.push({ - address: contractCallConfig.contractAddress as `0x${string}`, + address: contractCallConfig.contractAddress, functionName: call.methodName, args: call.params, abi, @@ -159,19 +159,28 @@ export class Multicall { try { const result = await Promise.race([multicallPromise, timeoutPromise]) - .then((response) => { - timeoutController.abort(); - return processResponse(response); - }); + .then((response) => { + timeoutController.abort(); + return processResponse(response); + }) + .catch((_viemError) => { + timeoutController.abort(); + const e = new Error(_viemError.message.slice(0, 150)); - if (result.success) { - return result; - } + /* eslint-disable-next-line */ + console.error(e); - /* eslint-disable-next-line */ - console.error(result.errors); + throw e; + }); + if (result.success) { return result; + } + + /* eslint-disable-next-line */ + console.error(result.errors); + + return result; } catch (error) { timeoutController.abort(); diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/numbers.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/numbers.ts index 7c307dc6..15887c36 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/numbers.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/numbers.ts @@ -1,5 +1,6 @@ -import {formatUnits, parseUnits} from "viem/utils"; -import {bigMath} from "./bigmath.js"; +import { formatUnits, parseUnits } from "viem"; + +import { bigMath } from "./bigmath.js"; export type Numeric = number | bigint; export type BigNumberish = string | Numeric; @@ -18,6 +19,7 @@ export const BN_ONE = 1n; export const BN_NEGATIVE_ONE = -1n; export const MaxUint256 = BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); +export const MaxInt256 = BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); export const PERCENT_PRECISION_DECIMALS = PRECISION_DECIMALS - 2; @@ -138,11 +140,15 @@ export function formatUsd( const maybePlus = opts.displayPlus ? "+" : ""; const sign = usd < 0n ? "-" : maybePlus; - const symbol = exceedingInfo.symbol ? `${exceedingInfo.symbol} ` : ""; + const symbol = exceedingInfo.symbol ? `${exceedingInfo.symbol}\u00a0` : ""; const displayUsd = formatAmount(exceedingInfo.value, USD_DECIMALS, displayDecimals, true); return `${symbol}${sign}$\u200a${displayUsd}`; } +export function formatBigUsd(amount: bigint, opts: { displayDecimals?: number } = {}) { + return formatUsd(amount, { maxThreshold: "9999999999999999999999999", displayDecimals: opts.displayDecimals ?? 0 }); +} + export function formatDeltaUsd( deltaUsd?: bigint, percentage?: bigint, @@ -168,9 +174,9 @@ export function formatDeltaUsd( export function formatPercentage( percentage?: bigint, - opts: { fallbackToZero?: boolean; signed?: boolean; displayDecimals?: number; bps?: boolean } = {} + opts: { fallbackToZero?: boolean; signed?: boolean; displayDecimals?: number; bps?: boolean; showPlus?: boolean } = {} ) { - const { fallbackToZero = false, signed = false, displayDecimals = 2, bps = true } = opts; + const { fallbackToZero = false, signed = false, displayDecimals = 2, bps = true, showPlus = true } = opts; if (percentage === undefined) { if (fallbackToZero) { @@ -180,9 +186,10 @@ export function formatPercentage( return undefined; } - const sign = signed ? `${getPlusOrMinusSymbol(percentage)}\u200a` : ""; + const sign = signed ? `${getPlusOrMinusSymbol(percentage)}` : ""; + const displaySign = !showPlus && sign === "+" ? "" : `${sign}`; - return `${sign}${formatAmount(bigMath.abs(percentage), bps ? 2 : PERCENT_PRECISION_DECIMALS, displayDecimals)}%`; + return `${displaySign}${displaySign ? "\u200a" : ""}${formatAmount(bigMath.abs(percentage), bps ? 2 : PERCENT_PRECISION_DECIMALS, displayDecimals)}%`; } export function formatTokenAmount( @@ -208,7 +215,14 @@ export function formatTokenAmount( maxThreshold, } = opts; - const displayDecimals = opts.displayDecimals ?? (opts.isStable ? 2 : 4); + let displayDecimals: number; + if (opts.displayDecimals !== undefined) { + displayDecimals = opts.displayDecimals; + } else if (typeof amount === "bigint" && tokenDecimals) { + displayDecimals = calculateDisplayDecimals(amount, tokenDecimals, 1, opts.isStable); + } else { + displayDecimals = opts.isStable ? 2 : 4; + } const symbolStr = symbol ? ` ${symbol}` : ""; @@ -385,13 +399,10 @@ export function formatBalanceAmount( let value = ""; - const baseDecimals = isStable ? 2 : 4; - if (absAmountFloat >= 1) value = formatAmount(absAmount, tokenDecimals, baseDecimals, true); - else if (absAmountFloat >= 0.1) value = formatAmount(absAmount, tokenDecimals, baseDecimals + 1, true); - else if (absAmountFloat >= 0.01) value = formatAmount(absAmount, tokenDecimals, baseDecimals + 2, true); - else if (absAmountFloat >= 0.001) value = formatAmount(absAmount, tokenDecimals, baseDecimals + 3, true); - else if (absAmountFloat >= 1e-8) value = formatAmount(absAmount, tokenDecimals, 8, true); - else { + if (absAmountFloat >= 1e-8) { + const displayDecimals = calculateDisplayDecimals(absAmount, tokenDecimals, 1, isStable); + value = formatAmount(absAmount, tokenDecimals, displayDecimals, true); + } else { if (toExponential) { value = bigintToNumber(absAmount, tokenDecimals).toExponential(2); } else { diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/numbers/formatting.spec.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/numbers/formatting.spec.ts deleted file mode 100644 index bbaac3b1..00000000 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/numbers/formatting.spec.ts +++ /dev/null @@ -1,152 +0,0 @@ -import { describe, expect, it } from "vitest"; - -import { USD_DECIMALS } from "../../configs/factors.js"; - -import { PERCENT_PRECISION_DECIMALS, toBigNumberWithDecimals } from "./index.js"; -import { - formatAmountHuman, - formatBalanceAmount, - formatBalanceAmountWithUsd, - formatFactor, - formatUsdPrice, - formatPercentage, -} from "./formatting.js"; - -const ONE_USD = 1000000000000000000000000000000n; - -describe("formatUsdPrice", () => { - it("should tolerate undefined", () => { - expect(formatUsdPrice()).toBeUndefined(); - }); - - it("should return NA if negative", () => { - expect(formatUsdPrice(-1n)).toBe("NA"); - }); - - it("should calculate correct decimals if displayDecimals not passed", () => - // prettier-ignore - { - expect(formatUsdPrice(ONE_USD * 10000n)).toBe( "$10,000.00"); - expect(formatUsdPrice(ONE_USD * 1000n)).toBe( "$1,000.00"); - expect(formatUsdPrice(ONE_USD * 100n)).toBe( "$100.000"); - expect(formatUsdPrice(ONE_USD * 10n)).toBe( "$10.0000"); - expect(formatUsdPrice(ONE_USD)).toBe( "$1.0000"); - expect(formatUsdPrice(ONE_USD / 10n)).toBe( "$0.10000"); - expect(formatUsdPrice(ONE_USD / 100n)).toBe( "$0.010000"); - expect(formatUsdPrice(ONE_USD / 1000n)).toBe( "$0.0010000"); - expect(formatUsdPrice(ONE_USD / 10_000n)).toBe( "$0.0001000"); - expect(formatUsdPrice(ONE_USD / 100_000n)).toBe( "$0.00001000"); - expect(formatUsdPrice(ONE_USD / 1_000_000_000n)).toBe( "$0.000000001"); - expect(formatUsdPrice(ONE_USD / 10_000_000_000n)).toBe( "< $0.000000001"); - }); -}); - -describe("formatAmountHuman", () => { - it("positive", () => { - expect(formatAmountHuman(ONE_USD, USD_DECIMALS)).toBe("1.0"); - expect(formatAmountHuman(ONE_USD * 1000n, USD_DECIMALS)).toBe("1.0k"); - expect(formatAmountHuman(ONE_USD * 1000000n, USD_DECIMALS)).toBe("1.0m"); - }); - - it("negative", () => { - expect(formatAmountHuman(-1n * ONE_USD, USD_DECIMALS)).toBe("-1.0"); - expect(formatAmountHuman(-1n * ONE_USD * 1000n, USD_DECIMALS)).toBe("-1.0k"); - expect(formatAmountHuman(-1n * ONE_USD * 1000000n, USD_DECIMALS)).toBe("-1.0m"); - }); - - it("should display dollar sign", () => { - expect(formatAmountHuman(ONE_USD, USD_DECIMALS, true)).toBe("$1.0"); - expect(formatAmountHuman(-1n * ONE_USD, USD_DECIMALS, true)).toBe("-$1.0"); - }); - - it("should display decimals", () => { - expect(formatAmountHuman(ONE_USD * 1000n, USD_DECIMALS, false, 2)).toBe("1.00k"); - expect(formatAmountHuman(ONE_USD * 1500000n, USD_DECIMALS, false, 2)).toBe("1.50m"); - expect(formatAmountHuman(ONE_USD * 1000n, USD_DECIMALS, false, 0)).toBe("1k"); - expect(formatAmountHuman(ONE_USD * 1500000n, USD_DECIMALS, false, 0)).toBe("2m"); - }); -}); - -describe("formatBalanceAmount", () => { - it("should display balance amount", () => - // prettier-ignore - { - expect(formatBalanceAmount(ONE_USD * 1000n, USD_DECIMALS)).toBe( "1,000.0000"); - expect(formatBalanceAmount(0n, USD_DECIMALS)).toBe( "-"); - expect(formatBalanceAmount(0n, USD_DECIMALS, undefined, true)).toBe( "0.0000"); - expect(formatBalanceAmount(ONE_USD * 1n, USD_DECIMALS)).toBe( "1.0000"); - expect(formatBalanceAmount(ONE_USD / 10n, USD_DECIMALS)).toBe( "0.10000"); - expect(formatBalanceAmount(ONE_USD / 100n, USD_DECIMALS)).toBe( "0.010000"); - expect(formatBalanceAmount(ONE_USD / 1_000n, USD_DECIMALS)).toBe( "0.0010000"); - expect(formatBalanceAmount(ONE_USD / 10_000n, USD_DECIMALS)).toBe( "0.00010000"); - expect(formatBalanceAmount(ONE_USD / 100_000n, USD_DECIMALS)).toBe( "0.00001000"); - expect(formatBalanceAmount(ONE_USD / 1_000_000n, USD_DECIMALS)).toBe( "0.00000100"); - expect(formatBalanceAmount(ONE_USD / 10_000_000n, USD_DECIMALS)).toBe( "0.00000010"); - expect(formatBalanceAmount(ONE_USD / 100_000_000n, USD_DECIMALS)).toBe( "0.00000001"); - expect(formatBalanceAmount(ONE_USD / 1_000_000_000n, USD_DECIMALS)).toBe( "1.00e-9"); - expect(formatBalanceAmount(ONE_USD / 1_000_000_000_000n, USD_DECIMALS)).toBe("1.00e-12"); - expect(formatBalanceAmount(ONE_USD * -1n, USD_DECIMALS)).toBe( "-1.0000"); - - }); - - it("should display balance amount with symbol", () => { - expect(formatBalanceAmount(ONE_USD, USD_DECIMALS, "USDC")).toBe("1.0000 USDC"); - expect(formatBalanceAmount(0n, USD_DECIMALS, "USDC", true)).toBe("0.0000 USDC"); - expect(formatBalanceAmount(0n, USD_DECIMALS, "USDC", false)).toBe("-"); - }); - - it("should display balance amount with usd", () => { - expect(formatBalanceAmountWithUsd(ONE_USD, ONE_USD, USD_DECIMALS)).toBe("1.0000 ($1.00)"); - expect(formatBalanceAmountWithUsd(ONE_USD, ONE_USD, USD_DECIMALS, "USDC")).toBe("1.0000 USDC ($1.00)"); - expect(formatBalanceAmountWithUsd(0n, 0n, USD_DECIMALS, "USDC")).toBe("-"); - expect(formatBalanceAmountWithUsd(0n, 0n, USD_DECIMALS, "USDC", true)).toBe("0.0000 USDC ($0.00)"); - }); -}); - -describe("formatFactor", () => { - it("should format factor", () => { - expect(formatFactor(0n)).toBe("0"); - expect(formatFactor(1n)).toBe("0.000000000000000000000000000001"); - expect(formatFactor(1000n)).toBe("0.000000000000000000000000001"); - expect(formatFactor(1000000n)).toBe("0.000000000000000000000001"); - expect(formatFactor(1000000000n)).toBe("0.000000000000000000001"); - expect(formatFactor(1000000000000n)).toBe("0.000000000000000001"); - expect(formatFactor(1000000000000000n)).toBe("0.000000000000001"); - expect(formatFactor(1000000000000000000n)).toBe("0.000000000001"); - expect(formatFactor(1000000000000000000000n)).toBe("0.000000001"); - expect(formatFactor(1000000000000000000000000n)).toBe("0.000001"); - expect(formatFactor(1000000000000000000000000000n)).toBe("0.001"); - expect(formatFactor(1000000000000000000000000000000n)).toBe("1"); - }); -}); - -describe("formatPercentage", () => { - it("should format a basic percentage", () => { - expect(formatPercentage(100n, { displayDecimals: 4 })).toBe("1.0000%"); - expect(formatPercentage(2500n)).toBe("25.00%"); - expect(formatPercentage(123456n)).toBe("1234.56%"); - }); - - it("should handle undefined input with fallbackToZero", () => { - expect(formatPercentage(undefined, { fallbackToZero: true })).toBe("0.00%"); - }); - - it("should display signed percentage", () => { - expect(formatPercentage(100n, { signed: true })).toBe("+1.00%"); - expect(formatPercentage(-100n, { signed: true })).toBe("-1.00%"); - }); - - it("should format with different displayDecimals", () => { - expect(formatPercentage(100n, { displayDecimals: 2 })).toBe("1.00%"); - expect(formatPercentage(123456n, { displayDecimals: 1 })).toBe("1234.6%"); - }); - - it("should handle basis points (bps) formatting", () => { - expect( - formatPercentage(toBigNumberWithDecimals("1", PERCENT_PRECISION_DECIMALS), { bps: false, displayDecimals: 4 }) - ).toBe("1.0000%"); - expect( - formatPercentage(toBigNumberWithDecimals("0.999", PERCENT_PRECISION_DECIMALS), { bps: false, displayDecimals: 5 }) - ).toBe("0.99900%"); - }); -}); diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/numbers/formatting.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/numbers/formatting.ts deleted file mode 100644 index 8fe45593..00000000 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/numbers/formatting.ts +++ /dev/null @@ -1,414 +0,0 @@ -import { BigNumberish, ethers } from "ethers"; - -import { USD_DECIMALS } from "../../configs/factors.js"; -import { bigMath } from "../../utils/bigmath.js"; - -import { bigintToNumber, PRECISION } from "../numbers.js"; -import { getLimitedDisplay, PERCENT_PRECISION_DECIMALS, calculateDisplayDecimals, roundBigNumberWithDecimals, limitDecimals, padDecimals, trimZeroDecimals } from "./index.js"; - -function getPlusOrMinusSymbol(value?: bigint, opts: { showPlusForZero?: boolean } = {}): string { - if (value === undefined) { - return ""; - } - - const { showPlusForZero = false } = opts; - return value === 0n ? (showPlusForZero ? "+" : "") : value < 0n ? "-" : "+"; -} - -export function formatUsd( - usd?: bigint, - opts: { - fallbackToZero?: boolean; - displayDecimals?: number; - maxThreshold?: string | null; - minThreshold?: string; - displayPlus?: boolean; - visualMultiplier?: number; - } = {} -) { - const { fallbackToZero = false, displayDecimals = 2 } = opts; - - if (typeof usd !== "bigint") { - if (fallbackToZero) { - usd = 0n; - } else { - return undefined; - } - } - - if (opts.visualMultiplier) { - usd *= BigInt(opts.visualMultiplier); - } - - const defaultMinThreshold = displayDecimals > 1 ? "0." + "0".repeat(displayDecimals - 1) + "1" : undefined; - - const exceedingInfo = getLimitedDisplay(usd, USD_DECIMALS, { - maxThreshold: opts.maxThreshold, - minThreshold: opts.minThreshold ?? defaultMinThreshold, - }); - - const maybePlus = opts.displayPlus ? "+" : ""; - const sign = usd < 0n ? "-" : maybePlus; - const symbol = exceedingInfo.symbol ? `${exceedingInfo.symbol} ` : ""; - const displayUsd = formatAmount(exceedingInfo.value, USD_DECIMALS, displayDecimals, true); - return `${symbol}${sign}$${displayUsd}`; -} - -export function formatDeltaUsd( - deltaUsd?: bigint, - percentage?: bigint, - opts: { fallbackToZero?: boolean; showPlusForZero?: boolean } = {} -) { - if (typeof deltaUsd !== "bigint") { - if (opts.fallbackToZero) { - return `${formatUsd(0n)} (${formatAmount(0n, 2, 2)}%)`; - } - - return undefined; - } - - const sign = getPlusOrMinusSymbol(deltaUsd, { showPlusForZero: opts.showPlusForZero }); - - const exceedingInfo = getLimitedDisplay(deltaUsd, USD_DECIMALS); - const percentageStr = percentage !== undefined ? ` (${sign}${formatPercentage(bigMath.abs(percentage))})` : ""; - const deltaUsdStr = formatAmount(exceedingInfo.value, USD_DECIMALS, 2, true); - const symbol = exceedingInfo.symbol ? `${exceedingInfo.symbol} ` : ""; - - return `${symbol}${sign}$${deltaUsdStr}${percentageStr}`; -} - -export function formatPercentage( - percentage?: bigint, - opts: { fallbackToZero?: boolean; signed?: boolean; displayDecimals?: number; bps?: boolean } = {} -) { - const { fallbackToZero = false, signed = false, displayDecimals = 2, bps = true } = opts; - - if (percentage === undefined) { - if (fallbackToZero) { - return `${formatAmount(0n, PERCENT_PRECISION_DECIMALS, displayDecimals)}%`; - } - - return undefined; - } - - const sign = signed ? getPlusOrMinusSymbol(percentage) : ""; - - return `${sign}${formatAmount(bigMath.abs(percentage), bps ? 2 : PERCENT_PRECISION_DECIMALS, displayDecimals)}%`; -} - -export function formatTokenAmount( - amount?: bigint, - tokenDecimals?: number, - symbol?: string, - opts: { - showAllSignificant?: boolean; - displayDecimals?: number; - fallbackToZero?: boolean; - useCommas?: boolean; - minThreshold?: string; - maxThreshold?: string; - displayPlus?: boolean; - } = {} -) { - const { - displayDecimals = 4, - showAllSignificant = false, - fallbackToZero = false, - useCommas = false, - minThreshold = "0", - maxThreshold, - } = opts; - - const symbolStr = symbol ? ` ${symbol}` : ""; - - if (typeof amount !== "bigint" || !tokenDecimals) { - if (fallbackToZero) { - amount = 0n; - tokenDecimals = displayDecimals; - } else { - return undefined; - } - } - - let amountStr: string; - - const maybePlus = opts.displayPlus ? "+" : ""; - const sign = amount < 0n ? "-" : maybePlus; - - if (showAllSignificant) { - amountStr = formatAmountFree(amount, tokenDecimals, tokenDecimals); - } else { - const exceedingInfo = getLimitedDisplay(amount, tokenDecimals, { maxThreshold, minThreshold }); - const symbol = exceedingInfo.symbol ? `${exceedingInfo.symbol} ` : ""; - amountStr = `${symbol}${sign}${formatAmount(exceedingInfo.value, tokenDecimals, displayDecimals, useCommas)}`; - } - - return `${amountStr}${symbolStr}`; -} - -export function formatTokenAmountWithUsd( - tokenAmount?: bigint, - usdAmount?: bigint, - tokenSymbol?: string, - tokenDecimals?: number, - opts: { - fallbackToZero?: boolean; - displayDecimals?: number; - displayPlus?: boolean; - } = {} -) { - if (typeof tokenAmount !== "bigint" || typeof usdAmount !== "bigint" || !tokenSymbol || !tokenDecimals) { - if (!opts.fallbackToZero) { - return undefined; - } - } - - const tokenStr = formatTokenAmount(tokenAmount, tokenDecimals, tokenSymbol, { - ...opts, - useCommas: true, - displayPlus: opts.displayPlus, - }); - - const usdStr = formatUsd(usdAmount, { - fallbackToZero: opts.fallbackToZero, - displayPlus: opts.displayPlus, - }); - - return `${tokenStr} (${usdStr})`; -} - -/** - * - * @param opts.signed - Default `true`. whether to display a `+` or `-` sign for all non-zero values. - */ -export function formatRatePercentage(rate?: bigint, opts?: { displayDecimals?: number; signed?: boolean }) { - if (typeof rate !== "bigint") { - return "-"; - } - - const signed = opts?.signed ?? true; - const plurOrMinus = signed ? getPlusOrMinusSymbol(rate) : ""; - - const amount = bigMath.abs(rate * 100n); - return `${plurOrMinus}${formatAmount(amount, 30, opts?.displayDecimals ?? 4)}%`; -} - -export function formatUsdPrice(price?: bigint, opts: Parameters[1] = {}) { - if (price === undefined) { - return; - } - - if (price < 0n) { - return "NA"; - } - - const decimals = calculateDisplayDecimals(price, undefined, opts.visualMultiplier); - - return formatUsd(price, { - ...opts, - displayDecimals: decimals, - }); -} - -export function formatPercentageDisplay(percentage: number, hideThreshold?: number) { - if (hideThreshold && percentage < hideThreshold) { - return ""; - } - - return `${percentage}%`; -} - -export function formatAmountHuman( - amount: BigNumberish | undefined, - tokenDecimals: number, - showDollar = false, - displayDecimals = 1 -) { - if (amount === undefined) { - return "..."; - } - - let n = Number(formatAmount(amount, tokenDecimals)); - // For large numbers, we can neglect the decimals to avoid decimals in cases like 9999999.99999 - if (n >= 1_000_000) { - n = Math.round(n); - } - const isNegative = n < 0; - const absN = Math.abs(n); - const sign = showDollar ? "$" : ""; - - if (absN >= 1_000_000_000) { - return `${isNegative ? "-" : ""}${sign}${(absN / 1_000_000_000).toFixed(displayDecimals)}b`; - } - - if (absN >= 1_000_000) { - return `${isNegative ? "-" : ""}${sign}${(absN / 1_000_000).toFixed(displayDecimals)}m`; - } - - if (absN >= 1000) { - return `${isNegative ? "-" : ""}${sign}${(absN / 1_000).toFixed(displayDecimals)}k`; - } - - return `${isNegative ? "-" : ""}${sign}${absN.toFixed(displayDecimals)}`; -} - -export function formatBalanceAmount( - amount: bigint, - tokenDecimals: number, - tokenSymbol?: string, - showZero = false, - toExponential = true -): string { - if (amount === undefined) return "-"; - - if (amount === 0n) { - if (showZero === true) { - if (tokenSymbol) { - return `0.0000 ${tokenSymbol}`; - } - return "0.0000"; - } - - return "-"; - } - - const absAmount = bigMath.abs(amount); - const absAmountFloat = bigintToNumber(absAmount, tokenDecimals); - - let value = ""; - - if (absAmountFloat >= 1) value = formatAmount(amount, tokenDecimals, 4, true); - else if (absAmountFloat >= 0.1) value = formatAmount(amount, tokenDecimals, 5, true); - else if (absAmountFloat >= 0.01) value = formatAmount(amount, tokenDecimals, 6, true); - else if (absAmountFloat >= 0.001) value = formatAmount(amount, tokenDecimals, 7, true); - else if (absAmountFloat >= 1e-8) value = formatAmount(amount, tokenDecimals, 8, true); - else { - if (toExponential) { - value = bigintToNumber(amount, tokenDecimals).toExponential(2); - } else { - value = bigintToNumber(amount, tokenDecimals).toFixed(8); - } - } - - if (tokenSymbol) { - // Non-breaking space - return `${value} ${tokenSymbol}`; - } - - return value; -} - -export function formatBalanceAmountWithUsd( - amount: bigint, - amountUsd: bigint, - tokenDecimals: number, - tokenSymbol?: string, - showZero = false -) { - if (showZero === false && amount === 0n) { - return "-"; - } - - const value = formatBalanceAmount(amount, tokenDecimals, tokenSymbol, showZero); - - const usd = formatUsd(amountUsd); - - // Regular space - return `${value} (${usd})`; -} - -export function formatFactor(factor: bigint) { - if (factor == 0n) { - return "0"; - } - - if (bigMath.abs(factor) > PRECISION * 1000n) { - return (factor / PRECISION).toString(); - } - - const trailingZeroes = - bigMath - .abs(factor) - .toString() - .match(/^(.+?)(?0*)$/)?.groups?.zeroes?.length || 0; - const factorDecimals = 30 - trailingZeroes; - return formatAmount(factor, 30, factorDecimals); -} -export function numberWithCommas(x: BigNumberish) { - if (x === undefined || x === null) { - return "..."; - } - - const parts = x.toString().split("."); - parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ","); - return parts.join("."); -} -export const formatAmount = ( - amount: BigNumberish | undefined, - tokenDecimals: number, - displayDecimals?: number, - useCommas?: boolean, - defaultValue?: string, - visualMultiplier?: number -) => { - if (defaultValue === undefined || defaultValue === null) { - defaultValue = "..."; - } - if (amount === undefined || amount === null || amount === "") { - return defaultValue; - } - if (displayDecimals === undefined) { - displayDecimals = 4; - } - const amountBigInt = roundBigNumberWithDecimals(BigInt(amount) * BigInt(visualMultiplier ?? 1), { - displayDecimals, - tokenDecimals, - }); - let amountStr = ethers.formatUnits(amountBigInt, tokenDecimals); - amountStr = limitDecimals(amountStr, displayDecimals); - if (displayDecimals !== 0) { - amountStr = padDecimals(amountStr, displayDecimals); - } - if (useCommas) { - return numberWithCommas(amountStr); - } - return amountStr; -}; - -export const formatKeyAmount = ( - map: T | undefined, - key: keyof T, - tokenDecimals: number, - displayDecimals: number, - useCommas?: boolean -) => { - const value = map ? map[key] ?? undefined : undefined; - if (value === undefined || value === null) { - return "..."; - } - - return formatAmount(value as bigint, tokenDecimals, displayDecimals, useCommas); -}; - -export const formatArrayAmount = ( - arr: any[], - index: number, - tokenDecimals: number, - displayDecimals?: number, - useCommas?: boolean -) => { - if (!arr || arr[index] === undefined || arr[index] === null) { - return "..."; - } - - return formatAmount(arr[index], tokenDecimals, displayDecimals, useCommas); -}; - -export const formatAmountFree = (amount: BigNumberish, tokenDecimals: number, displayDecimals?: number) => { - if (amount === undefined || amount === null) { - return "..."; - } - let amountStr = ethers.formatUnits(amount, tokenDecimals); - amountStr = limitDecimals(amountStr, displayDecimals); - return trimZeroDecimals(amountStr); -}; diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/numbers/index.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/numbers/index.ts deleted file mode 100644 index 15bff787..00000000 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/numbers/index.ts +++ /dev/null @@ -1,290 +0,0 @@ -import { BigNumberish, ethers } from "ethers"; - -import { BASIS_POINTS_DIVISOR_BIGINT, USD_DECIMALS } from "../../configs/factors.js"; -import { TRIGGER_PREFIX_ABOVE, TRIGGER_PREFIX_BELOW } from "../../configs/ui.js"; -import { bigMath } from "../../utils/bigmath.js"; -import { bigintToNumber, PRECISION_DECIMALS } from "../../utils/numbers.js"; - -export const PERCENT_PRECISION_DECIMALS = PRECISION_DECIMALS - 2; - -const MAX_EXCEEDING_THRESHOLD = "1000000000"; -const MIN_EXCEEDING_THRESHOLD = "0.01"; - -export const BN_ZERO = 0n; -export const BN_ONE = 1n; -export const BN_NEGATIVE_ONE = -1n; - -/** - * - * @deprecated Use BigInt instead - */ -export function bigNumberify(n?: BigNumberish | null | undefined) { - try { - if (n === undefined) throw new Error("n is undefined"); - if (n === null) throw new Error("n is null"); - - return BigInt(n); - } catch (e) { - // eslint-disable-next-line no-console - console.error("bigNumberify error", e); - return undefined; - } -} - -export function expandDecimals(n: BigNumberish, decimals: number): bigint { - return BigInt(n) * 10n ** BigInt(decimals); -} - -export function getLimitedDisplay( - amount: bigint, - tokenDecimals: number, - opts: { maxThreshold?: string | null; minThreshold?: string } = {} -) { - const { maxThreshold = MAX_EXCEEDING_THRESHOLD, minThreshold = MIN_EXCEEDING_THRESHOLD } = opts; - const max = maxThreshold === null ? null : expandDecimals(maxThreshold, tokenDecimals); - const min = ethers.parseUnits(minThreshold, tokenDecimals); - const absAmount = bigMath.abs(amount); - - if (absAmount == 0n) { - return { - symbol: "", - value: absAmount, - }; - } - - const symbol = max !== null && absAmount > max ? TRIGGER_PREFIX_ABOVE : absAmount < min ? TRIGGER_PREFIX_BELOW : ""; - const value = max !== null && absAmount > max ? max : absAmount < min ? min : absAmount; - - return { - symbol, - value, - }; -} - -export const trimZeroDecimals = (amount: string) => { - if (parseFloat(amount) === parseInt(amount)) { - return parseInt(amount).toString(); - } - return amount; -}; - -export const limitDecimals = (amount: BigNumberish, maxDecimals?: number) => { - let amountStr = amount.toString(); - if (maxDecimals === undefined) { - return amountStr; - } - if (maxDecimals === 0) { - return amountStr.split(".")[0]; - } - const dotIndex = amountStr.indexOf("."); - if (dotIndex !== -1) { - let decimals = amountStr.length - dotIndex - 1; - if (decimals > maxDecimals) { - amountStr = amountStr.substr(0, amountStr.length - (decimals - maxDecimals)); - } - } - - return amountStr; -}; - -export const padDecimals = (amount: BigNumberish, minDecimals: number) => { - let amountStr = amount.toString(); - const dotIndex = amountStr.indexOf("."); - if (dotIndex !== -1) { - const decimals = amountStr.length - dotIndex - 1; - if (decimals < minDecimals) { - amountStr = amountStr.padEnd(amountStr.length + (minDecimals - decimals), "0"); - } - } else { - amountStr = amountStr + ".0000"; - } - return amountStr; -}; - -export const parseValue = (value: string, tokenDecimals: number) => { - const pValue = parseFloat(value); - - if (isNaN(pValue)) { - return undefined; - } - value = limitDecimals(value, tokenDecimals); - const amount = ethers.parseUnits(value, tokenDecimals); - return bigNumberify(amount); -}; - -export function roundUpDivision(a: bigint, b: bigint) { - return (a + b - 1n) / b; -} - -export function roundToTwoDecimals(n: number) { - return Math.round(n * 100) / 100; -} - -export function roundToOrder(n: bigint, significantDigits = 1) { - const decimals = Math.max(n.toString().length - significantDigits, 0); - return (n / expandDecimals(1, decimals)) * expandDecimals(1, decimals); -} - -export function minBigNumber(...args: bigint[]) { - if (!args.length) return undefined; - - return args.reduce((acc, num) => (num < acc ? num : acc), args[0]); -} - -export function maxbigint(...args: bigint[]) { - if (!args.length) return undefined; - - return args.reduce((acc, num) => (num > acc ? num : acc), args[0]); -} - -export function removeTrailingZeros(amount: string | number) { - const amountWithoutZeros = Number(amount); - if (!amountWithoutZeros) return amount; - return amountWithoutZeros; -} - -type SerializedBigIntsInObject = { - [P in keyof T]: T[P] extends bigint - ? { type: "bigint"; value: bigint } - : T[P] extends object - ? SerializedBigIntsInObject - : T[P]; -}; - -type DeserializeBigIntInObject = { - [P in keyof T]: T[P] extends { type: "bigint"; value: bigint } - ? bigint - : T[P] extends object - ? DeserializeBigIntInObject - : T[P]; -}; - -export function serializeBigIntsInObject(obj: T): SerializedBigIntsInObject { - const result: any = Array.isArray(obj) ? [] : {}; - for (const key in obj) { - const value = obj[key]; - if (typeof value === "bigint") { - result[key] = { type: "bigint", value: String(value) }; - } else if (value && typeof value === "object") { - result[key] = serializeBigIntsInObject(value); - } else { - result[key] = value; - } - } - return result; -} - -export function deserializeBigIntsInObject(obj: T): DeserializeBigIntInObject { - const result: any = Array.isArray(obj) ? [] : {}; - for (const key in obj) { - const value = obj[key]; - if ( - typeof value === "object" && - value !== null && - (("type" in value && value.type === "bigint") || ("_type" in value && value._type === "BigNumber")) - ) { - if ("value" in value && typeof value.value === "string") { - result[key] = BigInt(value.value); - } else if ("hex" in value && typeof value.hex === "string") { - if (value.hex.startsWith("-")) { - result[key] = BigInt(value.hex.slice(1)) * -1n; - } else { - result[key] = BigInt(value.hex); - } - } - } else if (value && typeof value === "object") { - result[key] = deserializeBigIntsInObject(value); - } else { - result[key] = value; - } - } - return result; -} - -export function calculateDisplayDecimals(price?: bigint, decimals = USD_DECIMALS, visualMultiplier = 1) { - if (price === undefined || price === 0n) return 2; - const priceNumber = bigintToNumber(bigMath.abs(price) * BigInt(visualMultiplier), decimals); - - if (isNaN(priceNumber)) return 2; - if (priceNumber >= 1000) return 2; - if (priceNumber >= 100) return 3; - if (priceNumber >= 1) return 4; - if (priceNumber >= 0.1) return 5; - if (priceNumber >= 0.01) return 6; - if (priceNumber >= 0.0001) return 7; - if (priceNumber >= 0.00001) return 8; - - return 9; -} - -export function clamp(value: number, min: number, max: number): number { - return Math.max(min, Math.min(value, max)); -} - -export function absDiffBps(value: bigint, base: bigint) { - if ((value === 0n && base !== 0n) || (value !== 0n && base === 0n)) { - return BASIS_POINTS_DIVISOR_BIGINT; - } - - if (value === 0n && base === 0n) { - return 0n; - } - - return bigMath.mulDiv(bigMath.abs(value - base), BASIS_POINTS_DIVISOR_BIGINT, base); -} - -export function roundBigNumberWithDecimals( - value: BigNumberish, - opts: { displayDecimals: number; tokenDecimals: number } -): BigNumberish { - if (opts.displayDecimals === opts.tokenDecimals) { - return value; - } - - let valueString = value.toString(); - let isNegative = false; - - if (valueString[0] === "-") { - valueString = valueString.slice(1); - isNegative = true; - } - - if (valueString.length < opts.tokenDecimals) { - valueString = valueString.padStart(opts.tokenDecimals, "0"); - } - - const mainPart = valueString.slice(0, valueString.length - opts.tokenDecimals + opts.displayDecimals); - const partToRound = valueString.slice(valueString.length - opts.tokenDecimals + opts.displayDecimals); - - let mainPartBigInt = BigInt(mainPart); - - let returnValue = mainPartBigInt; - - if (partToRound.length !== 0) { - if (Number(partToRound[0]) >= 5) { - mainPartBigInt += 1n; - } - - returnValue = BigInt(mainPartBigInt.toString() + new Array(partToRound.length).fill("0").join("")); - } - - return isNegative ? returnValue * -1n : returnValue; -} - -export function toBigNumberWithDecimals(value: string, decimals: number): bigint { - if (!value) return BN_ZERO; - - const parts = value.split("."); - const integerPart = parts[0]; - const decimalPart = parts.length > 1 ? parts[1] : ""; - - const paddingZeros = decimals - decimalPart.length; - - if (paddingZeros >= 0) { - const result = integerPart + decimalPart + "0".repeat(paddingZeros); - return BigInt(result); - } else { - const result = integerPart + decimalPart.substring(0, decimals); - return BigInt(result); - } -} diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/numbers/numbers.spec.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/numbers/numbers.spec.ts deleted file mode 100644 index beea9c56..00000000 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/numbers/numbers.spec.ts +++ /dev/null @@ -1,153 +0,0 @@ -import { describe, expect, it } from "vitest"; - -import { USD_DECIMALS } from "../../configs/factors.js"; - -import { formatAmount } from "./formatting.js"; -import { roundBigNumberWithDecimals, toBigNumberWithDecimals } from "./index.js"; -import { PRECISION_DECIMALS } from "../numbers.js"; - -describe("toBigNumberWithDecimals", () => { - it("should convert string to big number with decimals", () => { - expect(toBigNumberWithDecimals("0", PRECISION_DECIMALS)).toBe(0n); - expect(toBigNumberWithDecimals("1", PRECISION_DECIMALS)).toBe(1000000000000000000000000000000n); - expect(toBigNumberWithDecimals("123.456", PRECISION_DECIMALS)).toBe(123456000000000000000000000000000n); - expect(toBigNumberWithDecimals("123.456789", PRECISION_DECIMALS)).toBe(123456789000000000000000000000000n); - expect(toBigNumberWithDecimals("-1.5", PRECISION_DECIMALS)).toBe(-1500000000000000000000000000000n); - expect(toBigNumberWithDecimals("0.000001", PRECISION_DECIMALS)).toBe(1000000000000000000000000n); - }); - - it("should handle strings with more decimals than token decimals parameter", () => { - expect(toBigNumberWithDecimals("0.123456789012345678901234567890", 5)).toBe(12345n); - }); - - it("should handle cases with different token decimals ", () => { - expect(toBigNumberWithDecimals("0.1234567890123456789012345678901", 18)).toBe(123456789012345678n); - expect(toBigNumberWithDecimals("0.12345", 5)).toBe(12345n); - expect(toBigNumberWithDecimals("0.1", 1)).toBe(1n); - }); - - it("should be compatible with formatAmount", () => { - expect(formatAmount(toBigNumberWithDecimals("123.456", PRECISION_DECIMALS), USD_DECIMALS, 3)).toBe("123.456"); - expect(formatAmount(toBigNumberWithDecimals("0.789", PRECISION_DECIMALS), USD_DECIMALS, 2)).toBe("0.79"); - }); -}); - -describe("roundBigNumberWithDecimals", () => { - it("should round small numbers correctly", () => { - expect( - roundBigNumberWithDecimals(toBigNumberWithDecimals("0.0000001", PRECISION_DECIMALS), { - tokenDecimals: PRECISION_DECIMALS, - displayDecimals: 0, - }) - ).toBe(0n); - expect( - roundBigNumberWithDecimals(toBigNumberWithDecimals("0.5", PRECISION_DECIMALS), { - tokenDecimals: PRECISION_DECIMALS, - displayDecimals: 0, - }) - ).toBe(toBigNumberWithDecimals("1", PRECISION_DECIMALS)); - expect( - roundBigNumberWithDecimals(toBigNumberWithDecimals("0.499", PRECISION_DECIMALS), { - tokenDecimals: PRECISION_DECIMALS, - displayDecimals: 0, - }) - ).toBe(0n); - expect( - roundBigNumberWithDecimals(toBigNumberWithDecimals("1", PRECISION_DECIMALS), { - tokenDecimals: PRECISION_DECIMALS, - displayDecimals: 1, - }) - ).toBe(toBigNumberWithDecimals("1", PRECISION_DECIMALS)); - }); - - it("should round numbers at specific decimal places", () => { - expect( - roundBigNumberWithDecimals(toBigNumberWithDecimals("1.49", PRECISION_DECIMALS), { - tokenDecimals: PRECISION_DECIMALS, - displayDecimals: 1, - }) - ).toBe(toBigNumberWithDecimals("1.5", PRECISION_DECIMALS)); - expect( - roundBigNumberWithDecimals(toBigNumberWithDecimals("1.44", PRECISION_DECIMALS), { - tokenDecimals: PRECISION_DECIMALS, - displayDecimals: 1, - }) - ).toBe(toBigNumberWithDecimals("1.4", PRECISION_DECIMALS)); - expect( - roundBigNumberWithDecimals(toBigNumberWithDecimals("1.499", PRECISION_DECIMALS), { - tokenDecimals: PRECISION_DECIMALS, - displayDecimals: 2, - }) - ).toBe(toBigNumberWithDecimals("1.50", PRECISION_DECIMALS)); - expect( - roundBigNumberWithDecimals(toBigNumberWithDecimals("1.495", PRECISION_DECIMALS), { - tokenDecimals: PRECISION_DECIMALS, - displayDecimals: 2, - }) - ).toBe(toBigNumberWithDecimals("1.50", PRECISION_DECIMALS)); - }); - - it("should round large numbers correctly", () => { - expect( - roundBigNumberWithDecimals(toBigNumberWithDecimals("499.999999", PRECISION_DECIMALS), { - tokenDecimals: PRECISION_DECIMALS, - displayDecimals: 5, - }) - ).toBe(toBigNumberWithDecimals("500.00000", PRECISION_DECIMALS)); - }); - - it("should handle complex rounding cases", () => { - expect( - roundBigNumberWithDecimals(toBigNumberWithDecimals("0.0000000000000000000000000001", PRECISION_DECIMALS), { - tokenDecimals: PRECISION_DECIMALS, - displayDecimals: 25, - }) - ).toBe(0n); - expect( - roundBigNumberWithDecimals(toBigNumberWithDecimals("0.4999999999999999999999999999", PRECISION_DECIMALS), { - tokenDecimals: PRECISION_DECIMALS, - displayDecimals: 25, - }) - ).toBe(toBigNumberWithDecimals("0.5", PRECISION_DECIMALS)); - expect( - roundBigNumberWithDecimals(toBigNumberWithDecimals("123.456789", PRECISION_DECIMALS), { - tokenDecimals: PRECISION_DECIMALS, - displayDecimals: 4, - }) - ).toBe(toBigNumberWithDecimals("123.4568", PRECISION_DECIMALS)); - }); - - it("should round numbers with different token decimals correctly", () => { - const differentTokenDecimals = [18, 5, 1, 22]; - for (const tokenDecimals of differentTokenDecimals) { - expect( - roundBigNumberWithDecimals(toBigNumberWithDecimals("123.456789", tokenDecimals), { - tokenDecimals, - displayDecimals: 4, - }) - ).toBe(toBigNumberWithDecimals("123.4568", tokenDecimals)); - } - }); - - it("should handle edge cases", () => { - expect(roundBigNumberWithDecimals(0n, { tokenDecimals: PRECISION_DECIMALS, displayDecimals: 10 })).toBe(0n); - expect( - roundBigNumberWithDecimals(toBigNumberWithDecimals("-1.5", PRECISION_DECIMALS), { - tokenDecimals: PRECISION_DECIMALS, - displayDecimals: 0, - }) - ).toBe(toBigNumberWithDecimals("-2", PRECISION_DECIMALS)); - expect( - roundBigNumberWithDecimals(toBigNumberWithDecimals("-1.4", PRECISION_DECIMALS), { - tokenDecimals: PRECISION_DECIMALS, - displayDecimals: 0, - }) - ).toBe(toBigNumberWithDecimals("-1", PRECISION_DECIMALS)); - expect( - roundBigNumberWithDecimals(toBigNumberWithDecimals("0.0000001", PRECISION_DECIMALS), { - tokenDecimals: PRECISION_DECIMALS, - displayDecimals: 5, - }) - ).toBe(0n); - }); -}); diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/orderTransactions.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/orderTransactions.ts new file mode 100644 index 00000000..d27a0898 --- /dev/null +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/orderTransactions.ts @@ -0,0 +1,971 @@ +import uniq from "lodash/uniq"; +import { encodeFunctionData, zeroAddress, zeroHash } from "viem"; + +import ExchangeRouterAbi from "../abis/ExchangeRouter.js"; +import { abis } from "../abis/index.js"; +import ERC20ABI from "../abis/Token.js"; +import { ContractsChainId, getExcessiveExecutionFee, getHighExecutionFee } from "../configs/chains.js"; +import { getContract } from "../configs/contracts.js"; +import { convertTokenAddress, getToken, getWrappedToken, NATIVE_TOKEN_ADDRESS } from "../configs/tokens.js"; +import { ExecutionFee } from "../types/fees.js"; +import { DecreasePositionSwapType, OrderType } from "../types/orders.js"; +import { ContractPrice, ERC20Address, TokensData } from "../types/tokens.js"; +import { ExternalSwapQuote } from "../types/trade.js"; +import { TwapOrderParams } from "../types/twap.js"; + +import { expandDecimals, MaxUint256, USD_DECIMALS } from "./numbers.js"; +import { getByKey } from "./objects.js"; +import { isIncreaseOrderType, isSwapOrderType } from "./orders.js"; +import { convertToContractPrice, convertToUsd } from "./tokens.js"; +import { applySlippageToMinOut, applySlippageToPrice } from "./trade/index.js"; +import { getTwapValidFromTime } from "./twap/index.js"; +import { createTwapUiFeeReceiver } from "./twap/uiFeeReceiver.js"; + +export type ExchangeRouterCall = { + method: string; + params: any[]; +}; + +export type BatchOrderTxnParams = { + createOrderParams: CreateOrderTxnParams[]; + updateOrderParams: UpdateOrderTxnParams[]; + cancelOrderParams: CancelOrderTxnParams[]; +}; + +export type CreateOrderTxnParams< + TParams extends SwapOrderParams | IncreasePositionOrderParams | DecreasePositionOrderParams, +> = { + params: TParams; + orderPayload: CreateOrderPayload; + tokenTransfersParams: TokenTransfersParams | undefined; +}; + +export type UpdateOrderTxnParams = { + params: UpdateOrderParams; + updatePayload: UpdateOrderPayload; +}; + +export type CancelOrderTxnParams = { + orderKey: string; +}; + +export type CreateOrderPayload = { + addresses: { + receiver: string | undefined; + cancellationReceiver: string; + callbackContract: string; + uiFeeReceiver: string; + market: string; + initialCollateralToken: ERC20Address; + swapPath: string[]; + }; + numbers: { + sizeDeltaUsd: bigint; + /** + * For express orders initialCollateralDeltaAmount will be transfered from user wallet to order vault in relay router logic, + * for default orders - this field will be ignored in contracts and settled by actual value reveived in order vault + * */ + initialCollateralDeltaAmount: bigint; + triggerPrice: ContractPrice | 0n; + acceptablePrice: ContractPrice | 0n; + executionFee: bigint; + callbackGasLimit: bigint; + minOutputAmount: bigint; + validFromTime: bigint; + }; + orderType: OrderType; + decreasePositionSwapType: DecreasePositionSwapType; + isLong: boolean; + shouldUnwrapNativeToken: boolean; + autoCancel: boolean; + referralCode: string; + dataList: string[]; +}; + +export type UpdateOrderParams = { + chainId: ContractsChainId; + indexTokenAddress: string; + orderKey: string; + orderType: OrderType; + sizeDeltaUsd: bigint; + triggerPrice: bigint; + acceptablePrice: bigint; + minOutputAmount: bigint; + autoCancel: boolean; + validFromTime: bigint; + // used to top-up execution fee for frozen orders + executionFeeTopUp: bigint; +}; + +export type UpdateOrderPayload = { + orderKey: string; + sizeDeltaUsd: bigint; + triggerPrice: ContractPrice; + acceptablePrice: ContractPrice; + minOutputAmount: bigint; + autoCancel: boolean; + validFromTime: bigint; + // used to top-up execution fee for frozen orders + executionFeeTopUp: bigint; +}; + +export type TokenTransfersParams = { + // Whether the payment token is the chain's native token (e.g. ETH for Ethereum) + isNativePayment: boolean; + // Whether the receive token is the chain's native token (e.g. ETH for Ethereum) + isNativeReceive: boolean; + tokenTransfers: TokenTransfer[]; + value: bigint; + payTokenAddress: string; + payTokenAmount: bigint; + initialCollateralTokenAddress: ERC20Address; + initialCollateralDeltaAmount: bigint; + minOutputAmount: bigint; + swapPath: string[]; + externalCalls: ExternalCallsPayload | undefined; +}; + +export type TokenTransfer = { + tokenAddress: string; + destination: string; + amount: bigint; +}; + +export type ExternalCallsPayload = { + sendTokens: ERC20Address[]; + sendAmounts: bigint[]; + externalCallTargets: string[]; + externalCallDataList: string[]; + refundTokens: string[]; + refundReceivers: string[]; +}; + +export type CommonOrderParams = { + chainId: ContractsChainId; + receiver: string | undefined; + executionFeeAmount: bigint; + executionGasLimit: bigint; + referralCode: string | undefined; + uiFeeReceiver: string | undefined; + allowedSlippage: number; + autoCancel: boolean; + validFromTime: bigint | undefined; +}; + +export type PositionOrderParams = { + marketAddress: string; + indexTokenAddress: string; + isLong: boolean; + sizeDeltaUsd: bigint; + sizeDeltaInTokens: bigint; + acceptablePrice: bigint; + triggerPrice: bigint | undefined; +}; + +export type SwapOrderParams = CommonOrderParams & { + // Token that the user pays with + payTokenAddress: string; + payTokenAmount: bigint; + // Token that the user receives + receiveTokenAddress: string; + swapPath: string[]; + externalSwapQuote: ExternalSwapQuote | undefined; + minOutputAmount: bigint; + expectedOutputAmount?: bigint; + orderType: OrderType.MarketSwap | OrderType.LimitSwap; + triggerRatio: bigint | undefined; +}; + +export type IncreasePositionOrderParams = CommonOrderParams & + PositionOrderParams & { + // Token that the user pays with + payTokenAddress: string; + payTokenAmount: bigint; + swapPath: string[]; + collateralDeltaAmount: bigint; + // Target collateral for the position + collateralTokenAddress: string; + externalSwapQuote: ExternalSwapQuote | undefined; + orderType: OrderType.MarketIncrease | OrderType.LimitIncrease | OrderType.StopIncrease; + }; + +export type DecreasePositionOrderParams = CommonOrderParams & + PositionOrderParams & { + // Collateral of the position + collateralTokenAddress: string; + collateralDeltaAmount: bigint; + swapPath: string[]; + externalSwapQuote: undefined; + // Token that the user receives + receiveTokenAddress: string; + minOutputUsd: bigint; + decreasePositionSwapType: DecreasePositionSwapType; + orderType: OrderType.MarketDecrease | OrderType.LimitDecrease | OrderType.StopLossDecrease; + }; + +export function buildSwapOrderPayload(p: SwapOrderParams): CreateOrderTxnParams { + const tokenTransfersParams = buildTokenTransfersParamsForIncreaseOrSwap(p); + + const orderPayload: CreateOrderPayload = { + addresses: { + receiver: p.receiver, + cancellationReceiver: zeroAddress, + callbackContract: zeroAddress, + uiFeeReceiver: p.uiFeeReceiver ?? zeroAddress, + market: zeroAddress, + initialCollateralToken: tokenTransfersParams.initialCollateralTokenAddress, + swapPath: tokenTransfersParams.swapPath, + }, + numbers: { + sizeDeltaUsd: 0n, + initialCollateralDeltaAmount: tokenTransfersParams.initialCollateralDeltaAmount, + // triggerRatio of limit swaps is used in trade history + triggerPrice: (p.triggerRatio as ContractPrice) ?? 0n, + acceptablePrice: 0n, + executionFee: p.executionFeeAmount, + callbackGasLimit: 0n, + minOutputAmount: applySlippageToMinOut(p.allowedSlippage, tokenTransfersParams.minOutputAmount), + validFromTime: p.validFromTime ?? 0n, + }, + orderType: p.orderType, + decreasePositionSwapType: DecreasePositionSwapType.NoSwap, + isLong: false, + shouldUnwrapNativeToken: tokenTransfersParams.isNativePayment || tokenTransfersParams.isNativeReceive, + autoCancel: p.autoCancel, + referralCode: p.referralCode ?? zeroHash, + dataList: [], + }; + + return { + params: p, + orderPayload, + tokenTransfersParams, + }; +} + +export function buildIncreaseOrderPayload( + p: IncreasePositionOrderParams +): CreateOrderTxnParams { + const tokenTransfersParams = buildTokenTransfersParamsForIncreaseOrSwap({ + ...p, + minOutputAmount: 0n, + receiveTokenAddress: undefined, + }); + + const indexToken = getToken(p.chainId, p.indexTokenAddress); + + let acceptablePrice: ContractPrice; + if (p.acceptablePrice === MaxUint256) { + acceptablePrice = MaxUint256 as ContractPrice; + } else { + acceptablePrice = convertToContractPrice( + applySlippageToPrice(p.allowedSlippage, p.acceptablePrice, true, p.isLong), + indexToken.decimals + ); + } + + let triggerPrice: ContractPrice; + if (p.triggerPrice === MaxUint256) { + triggerPrice = MaxUint256 as ContractPrice; + } else { + triggerPrice = convertToContractPrice(p.triggerPrice ?? 0n, indexToken.decimals); + } + + const orderPayload: CreateOrderPayload = { + addresses: { + receiver: p.receiver, + cancellationReceiver: zeroAddress, + callbackContract: zeroAddress, + uiFeeReceiver: p.uiFeeReceiver ?? zeroAddress, + market: p.marketAddress, + initialCollateralToken: tokenTransfersParams.initialCollateralTokenAddress, + swapPath: tokenTransfersParams.swapPath, + }, + numbers: { + sizeDeltaUsd: p.sizeDeltaUsd, + initialCollateralDeltaAmount: tokenTransfersParams.initialCollateralDeltaAmount, + triggerPrice, + acceptablePrice, + executionFee: p.executionFeeAmount, + callbackGasLimit: 0n, + minOutputAmount: applySlippageToMinOut(p.allowedSlippage, tokenTransfersParams.minOutputAmount), + validFromTime: p.validFromTime ?? 0n, + }, + orderType: p.orderType, + decreasePositionSwapType: DecreasePositionSwapType.NoSwap, + isLong: p.isLong, + shouldUnwrapNativeToken: tokenTransfersParams.isNativePayment, + autoCancel: p.autoCancel, + referralCode: p.referralCode ?? zeroHash, + dataList: [], + }; + + return { + params: p, + orderPayload, + tokenTransfersParams, + }; +} + +export function buildDecreaseOrderPayload( + p: DecreasePositionOrderParams +): CreateOrderTxnParams { + const indexToken = getToken(p.chainId, p.indexTokenAddress); + const tokenTransfersParams = buildTokenTransfersParamsForDecrease(p); + + let acceptablePrice: ContractPrice; + if (p.acceptablePrice === MaxUint256) { + acceptablePrice = MaxUint256 as ContractPrice; + } else { + acceptablePrice = convertToContractPrice( + applySlippageToPrice(p.allowedSlippage, p.acceptablePrice, false, p.isLong), + indexToken.decimals + ); + } + + let triggerPrice: ContractPrice; + if (p.triggerPrice === MaxUint256) { + triggerPrice = MaxUint256 as ContractPrice; + } else { + triggerPrice = convertToContractPrice(p.triggerPrice ?? 0n, indexToken.decimals); + } + + const orderPayload: CreateOrderPayload = { + addresses: { + receiver: p.receiver, + cancellationReceiver: zeroAddress, + callbackContract: zeroAddress, + uiFeeReceiver: p.uiFeeReceiver ?? zeroAddress, + market: p.marketAddress, + initialCollateralToken: tokenTransfersParams.initialCollateralTokenAddress, + swapPath: tokenTransfersParams.swapPath, + }, + numbers: { + sizeDeltaUsd: p.sizeDeltaUsd, + initialCollateralDeltaAmount: tokenTransfersParams.initialCollateralDeltaAmount, + triggerPrice, + acceptablePrice, + executionFee: p.executionFeeAmount, + callbackGasLimit: 0n, + minOutputAmount: applySlippageToMinOut(p.allowedSlippage, tokenTransfersParams.minOutputAmount), + validFromTime: p.validFromTime ?? 0n, + }, + orderType: p.orderType, + decreasePositionSwapType: p.decreasePositionSwapType, + isLong: p.isLong, + shouldUnwrapNativeToken: p.receiveTokenAddress === NATIVE_TOKEN_ADDRESS, + autoCancel: p.autoCancel, + referralCode: p.referralCode ?? zeroHash, + dataList: [], + }; + + return { + params: p, + orderPayload, + tokenTransfersParams, + }; +} + +export function buildTwapOrdersPayloads< + T extends SwapOrderParams | IncreasePositionOrderParams | DecreasePositionOrderParams, +>(p: T, twapParams: TwapOrderParams): CreateOrderTxnParams[] { + const uiFeeReceiver = createTwapUiFeeReceiver({ numberOfParts: twapParams.numberOfParts }); + + if (isSwapOrderType(p.orderType)) { + return Array.from({ length: twapParams.numberOfParts }, (_, i) => { + const params = p as SwapOrderParams; + + return buildSwapOrderPayload({ + chainId: params.chainId, + receiver: params.receiver, + executionGasLimit: params.executionGasLimit, + payTokenAddress: params.payTokenAddress, + receiveTokenAddress: params.receiveTokenAddress, + swapPath: params.swapPath, + externalSwapQuote: undefined, + minOutputAmount: 0n, + triggerRatio: params.triggerRatio, + referralCode: params.referralCode, + autoCancel: params.autoCancel, + allowedSlippage: 0, + ...(params.expectedOutputAmount !== undefined && { + expectedOutputAmount: params.expectedOutputAmount / BigInt(twapParams.numberOfParts), + }), + payTokenAmount: params.payTokenAmount / BigInt(twapParams.numberOfParts), + executionFeeAmount: params.executionFeeAmount / BigInt(twapParams.numberOfParts), + validFromTime: getTwapValidFromTime(twapParams.duration, twapParams.numberOfParts, i), + orderType: OrderType.LimitSwap, + uiFeeReceiver, + }) as CreateOrderTxnParams; + }); + } + + if (isIncreaseOrderType(p.orderType)) { + return Array.from({ length: twapParams.numberOfParts }, (_, i) => { + const params = p as IncreasePositionOrderParams; + + const acceptablePrice = params.isLong ? MaxUint256 : 0n; + const triggerPrice = acceptablePrice; + + return buildIncreaseOrderPayload({ + chainId: params.chainId, + receiver: params.receiver, + executionGasLimit: params.executionGasLimit, + referralCode: params.referralCode, + autoCancel: params.autoCancel, + swapPath: params.swapPath, + externalSwapQuote: undefined, + marketAddress: params.marketAddress, + indexTokenAddress: params.indexTokenAddress, + isLong: params.isLong, + sizeDeltaUsd: params.sizeDeltaUsd / BigInt(twapParams.numberOfParts), + sizeDeltaInTokens: params.sizeDeltaInTokens / BigInt(twapParams.numberOfParts), + payTokenAddress: params.payTokenAddress, + allowedSlippage: 0, + payTokenAmount: params.payTokenAmount / BigInt(twapParams.numberOfParts), + collateralTokenAddress: params.collateralTokenAddress, + collateralDeltaAmount: params.collateralDeltaAmount / BigInt(twapParams.numberOfParts), + executionFeeAmount: params.executionFeeAmount / BigInt(twapParams.numberOfParts), + validFromTime: getTwapValidFromTime(twapParams.duration, twapParams.numberOfParts, i), + orderType: OrderType.LimitIncrease, + acceptablePrice, + triggerPrice, + uiFeeReceiver, + }) as CreateOrderTxnParams; + }); + } + + return Array.from({ length: twapParams.numberOfParts }, (_, i) => { + const params = p as DecreasePositionOrderParams; + + const acceptablePrice = !params.isLong ? MaxUint256 : 0n; + const triggerPrice = acceptablePrice; + + return buildDecreaseOrderPayload({ + chainId: params.chainId, + receiver: params.receiver, + executionGasLimit: params.executionGasLimit, + referralCode: params.referralCode, + autoCancel: params.autoCancel, + swapPath: params.swapPath, + externalSwapQuote: undefined, + marketAddress: params.marketAddress, + indexTokenAddress: params.indexTokenAddress, + isLong: params.isLong, + collateralTokenAddress: params.collateralTokenAddress, + collateralDeltaAmount: params.collateralDeltaAmount / BigInt(twapParams.numberOfParts), + sizeDeltaUsd: params.sizeDeltaUsd / BigInt(twapParams.numberOfParts), + sizeDeltaInTokens: params.sizeDeltaInTokens / BigInt(twapParams.numberOfParts), + executionFeeAmount: params.executionFeeAmount / BigInt(twapParams.numberOfParts), + validFromTime: getTwapValidFromTime(twapParams.duration, twapParams.numberOfParts, i), + orderType: OrderType.LimitDecrease, + acceptablePrice, + triggerPrice, + allowedSlippage: 0, + uiFeeReceiver, + minOutputUsd: params.minOutputUsd / BigInt(twapParams.numberOfParts), + receiveTokenAddress: params.receiveTokenAddress, + decreasePositionSwapType: params.decreasePositionSwapType, + }) as CreateOrderTxnParams; + }); +} + +export function getIsTwapOrderPayload(p: CreateOrderPayload) { + return p.numbers.validFromTime !== 0n; +} + +export function buildUpdateOrderPayload(p: UpdateOrderParams): UpdateOrderTxnParams { + const indexToken = getToken(p.chainId, p.indexTokenAddress); + + return { + params: p, + updatePayload: { + orderKey: p.orderKey, + sizeDeltaUsd: p.sizeDeltaUsd, + triggerPrice: isSwapOrderType(p.orderType) + ? (p.triggerPrice as ContractPrice) + : convertToContractPrice(p.triggerPrice, indexToken.decimals), + acceptablePrice: convertToContractPrice(p.acceptablePrice, indexToken.decimals), + minOutputAmount: p.minOutputAmount, + autoCancel: p.autoCancel, + validFromTime: 0n, + executionFeeTopUp: p.executionFeeTopUp, + }, + }; +} + +export function getBatchTotalExecutionFee({ + batchParams: { createOrderParams, updateOrderParams }, + tokensData, + chainId, +}: { + batchParams: BatchOrderTxnParams; + tokensData: TokensData; + chainId: number; +}): ExecutionFee | undefined { + let feeTokenAmount = 0n; + let gasLimit = 0n; + + const wnt = getByKey(tokensData, getWrappedToken(chainId).address); + + if (!wnt) { + return undefined; + } + + for (const co of createOrderParams) { + feeTokenAmount += co.orderPayload.numbers.executionFee; + gasLimit += co.params.executionGasLimit; + } + + for (const uo of updateOrderParams) { + feeTokenAmount += uo.updatePayload.executionFeeTopUp; + } + + const feeUsd = convertToUsd(feeTokenAmount, wnt.decimals, wnt.prices.maxPrice)!; + const isFeeHigh = feeUsd > expandDecimals(getHighExecutionFee(chainId), USD_DECIMALS); + const isFeeVeryHigh = feeUsd > expandDecimals(getExcessiveExecutionFee(chainId), USD_DECIMALS); + + return { + feeTokenAmount, + gasLimit, + feeUsd, + feeToken: wnt, + isFeeHigh, + isFeeVeryHigh, + }; +} + +export function getBatchTotalPayCollateralAmount(batchParams: BatchOrderTxnParams) { + const payAmounts: { [tokenAddress: string]: bigint } = {}; + + for (const co of batchParams.createOrderParams) { + const payTokenAddress = co.tokenTransfersParams?.payTokenAddress; + const payTokenAmount = co.tokenTransfersParams?.payTokenAmount; + + if (payTokenAddress && payTokenAmount) { + payAmounts[payTokenAddress] = (payAmounts[payTokenAddress] ?? 0n) + payTokenAmount; + } + } + + return payAmounts; +} + +export function getBatchExternalSwapGasLimit(batchParams: BatchOrderTxnParams) { + return batchParams.createOrderParams.reduce((acc, co) => { + const externalSwapQuote = (co.params as IncreasePositionOrderParams | SwapOrderParams).externalSwapQuote; + + if (externalSwapQuote) { + return acc + externalSwapQuote.txnData.estimatedGas; + } + + return acc; + }, 0n); +} + +export function buildTokenTransfersParamsForDecrease({ + chainId, + executionFeeAmount, + collateralTokenAddress, + collateralDeltaAmount, + swapPath, + minOutputUsd, + receiveTokenAddress, +}: { + chainId: ContractsChainId; + executionFeeAmount: bigint; + collateralTokenAddress: string; + collateralDeltaAmount: bigint; + receiveTokenAddress: string; + swapPath: string[]; + minOutputUsd: bigint; +}): TokenTransfersParams { + const orderVaultAddress = getContract(chainId, "OrderVault"); + + const { tokenTransfers, value } = combineTransfers([ + { + tokenAddress: NATIVE_TOKEN_ADDRESS, + destination: orderVaultAddress, + amount: executionFeeAmount, + }, + ]); + + return { + isNativePayment: false, + isNativeReceive: receiveTokenAddress === NATIVE_TOKEN_ADDRESS, + initialCollateralTokenAddress: convertTokenAddress(chainId, collateralTokenAddress, "wrapped"), + initialCollateralDeltaAmount: collateralDeltaAmount, + tokenTransfers, + payTokenAddress: zeroAddress, + payTokenAmount: 0n, + minOutputAmount: minOutputUsd, + swapPath, + value, + externalCalls: undefined, + }; +} + +export function buildTokenTransfersParamsForIncreaseOrSwap({ + chainId, + receiver, + payTokenAddress, + payTokenAmount, + receiveTokenAddress, + executionFeeAmount, + externalSwapQuote, + minOutputAmount, + swapPath, +}: { + chainId: ContractsChainId; + receiver: string | undefined; + payTokenAddress: string; + payTokenAmount: bigint; + receiveTokenAddress: string | undefined; + executionFeeAmount: bigint; + externalSwapQuote: ExternalSwapQuote | undefined; + minOutputAmount: bigint; + swapPath: string[]; +}): TokenTransfersParams { + const isNativePayment = payTokenAddress === NATIVE_TOKEN_ADDRESS; + const isNativeReceive = receiveTokenAddress === NATIVE_TOKEN_ADDRESS; + const orderVaultAddress = getContract(chainId, "OrderVault"); + const externalHandlerAddress = getContract(chainId, "ExternalHandler"); + + let finalPayTokenAmount = payTokenAmount; + + const { tokenTransfers, value } = combineTransfers([ + { + tokenAddress: NATIVE_TOKEN_ADDRESS, + destination: orderVaultAddress, + amount: executionFeeAmount, + }, + { + tokenAddress: payTokenAddress, + destination: externalSwapQuote ? externalHandlerAddress : orderVaultAddress, + amount: payTokenAmount, + }, + ]); + + let initialCollateralTokenAddress = convertTokenAddress(chainId, payTokenAddress, "wrapped"); + let initialCollateralDeltaAmount = payTokenAmount; + let externalCalls: ExternalCallsPayload | undefined; + + if (externalSwapQuote && receiver) { + /** + * External swap will be executed before order creation logic, + * so the final order has no swap parameters and must treat the outToken address as an initial collateral + * */ + initialCollateralTokenAddress = convertTokenAddress(chainId, externalSwapQuote.outTokenAddress, "wrapped"); + initialCollateralDeltaAmount = 0n; + externalCalls = getExternalCallsPayload({ + chainId, + account: receiver, + quote: externalSwapQuote, + }); + finalPayTokenAmount = externalSwapQuote.amountIn; + } + + return { + isNativePayment, + isNativeReceive, + initialCollateralTokenAddress, + initialCollateralDeltaAmount, + tokenTransfers, + payTokenAddress, + payTokenAmount: finalPayTokenAmount, + minOutputAmount, + swapPath, + value, + externalCalls, + }; +} + +export function getBatchExternalCalls(batchParams: BatchOrderTxnParams): ExternalCallsPayload { + const externalCalls: ExternalCallsPayload[] = []; + + for (const createOrderParams of batchParams.createOrderParams) { + if (createOrderParams.tokenTransfersParams?.externalCalls) { + externalCalls.push(createOrderParams.tokenTransfersParams.externalCalls); + } + } + + return combineExternalCalls(externalCalls); +} + +export function combineExternalCalls(externalCalls: ExternalCallsPayload[]): ExternalCallsPayload { + const sendTokensMap: { [tokenAddress: string]: bigint } = {}; + const refundTokensMap: { [tokenAddress: string]: string } = {}; + const externalCallTargets: string[] = []; + const externalCallDataList: string[] = []; + + for (const call of externalCalls) { + for (const [index, tokenAddress] of call.sendTokens.entries()) { + sendTokensMap[tokenAddress] = (sendTokensMap[tokenAddress] ?? 0n) + call.sendAmounts[index]; + } + + for (const [index, tokenAddress] of call.refundTokens.entries()) { + refundTokensMap[tokenAddress] = call.refundReceivers[index]; + } + + externalCallTargets.push(...call.externalCallTargets); + externalCallDataList.push(...call.externalCallDataList); + } + + return { + sendTokens: Object.keys(sendTokensMap) as ERC20Address[], + sendAmounts: Object.values(sendTokensMap), + externalCallTargets, + externalCallDataList, + refundReceivers: Object.values(refundTokensMap), + refundTokens: Object.keys(refundTokensMap), + }; +} + +export function getEmptyExternalCallsPayload(): ExternalCallsPayload { + return { + sendTokens: [], + sendAmounts: [], + externalCallTargets: [], + externalCallDataList: [], + refundReceivers: [], + refundTokens: [], + }; +} + +export function getExternalCallsPayload({ + chainId, + account, + quote, +}: { + chainId: number; + account: string; + quote: ExternalSwapQuote; +}): ExternalCallsPayload { + const inTokenAddress = convertTokenAddress(chainId, quote.inTokenAddress, "wrapped"); + const outTokenAddress = convertTokenAddress(chainId, quote.outTokenAddress, "wrapped"); + const wntAddress = getWrappedToken(chainId).address; + + const refundTokens = uniq([inTokenAddress, outTokenAddress, wntAddress]); + + const payload: ExternalCallsPayload = { + sendTokens: [inTokenAddress], + sendAmounts: [quote.amountIn], + externalCallTargets: [], + externalCallDataList: [], + refundTokens, + refundReceivers: Array.from({ length: refundTokens.length }, () => account), + }; + + if (quote.needSpenderApproval) { + payload.externalCallTargets.push(inTokenAddress); + payload.externalCallDataList.push( + encodeFunctionData({ + abi: ERC20ABI, + functionName: "approve", + args: [quote.txnData.to as `0x${string}`, MaxUint256], + }) + ); + } + + payload.externalCallTargets.push(quote.txnData.to); + payload.externalCallDataList.push(quote.txnData.data); + + return payload; +} + +function combineTransfers(tokenTransfers: TokenTransfer[]) { + const transfersMap: { [key: string]: TokenTransfer } = {}; + let value = 0n; + + for (const transfer of tokenTransfers) { + const key = `${transfer.tokenAddress}:${transfer.destination}`; + + if (!transfersMap[key]) { + transfersMap[key] = { ...transfer }; + } else { + transfersMap[key].amount += transfer.amount; + } + + if (transfer.tokenAddress === NATIVE_TOKEN_ADDRESS) { + value += transfer.amount; + } + } + + return { tokenTransfers: Object.values(transfersMap), value }; +} + +export function getBatchOrderMulticallPayload({ params }: { params: BatchOrderTxnParams }) { + const { createOrderParams, updateOrderParams, cancelOrderParams } = params; + + const multicall: ExchangeRouterCall[] = []; + let value = 0n; + + for (const params of createOrderParams) { + const { multicall: createMulticall, value: createValue } = buildCreateOrderMulticall(params); + multicall.push(...createMulticall); + value += createValue; + } + + for (const update of updateOrderParams) { + const { multicall: updateMulticall, value: updateValue } = buildUpdateOrderMulticall(update); + multicall.push(...updateMulticall); + value += updateValue; + } + + for (const cancel of cancelOrderParams) { + const { multicall: cancelMulticall, value: cancelValue } = buildCancelOrderMulticall({ params: cancel }); + multicall.push(...cancelMulticall); + value += cancelValue; + } + + const { encodedMulticall, callData } = encodeExchangeRouterMulticall(multicall); + + return { multicall, value, encodedMulticall, callData }; +} + +export function buildCreateOrderMulticall(params: CreateOrderTxnParams) { + const { tokenTransfersParams, orderPayload } = params; + const { tokenTransfers = [], value = 0n, externalCalls = undefined } = tokenTransfersParams ?? {}; + + const multicall: ExchangeRouterCall[] = []; + + for (const transfer of tokenTransfers) { + if (transfer.tokenAddress === NATIVE_TOKEN_ADDRESS) { + multicall.push({ method: "sendWnt", params: [transfer.destination, transfer.amount] }); + } else { + multicall.push({ method: "sendTokens", params: [transfer.tokenAddress, transfer.destination, transfer.amount] }); + } + } + + if (externalCalls) { + multicall.push({ + method: "makeExternalCalls", + params: [ + externalCalls.externalCallTargets, + externalCalls.externalCallDataList, + externalCalls.refundTokens, + externalCalls.refundReceivers, + ], + }); + } + + multicall.push({ + method: "createOrder", + params: [orderPayload], + }); + + return { + multicall, + value, + }; +} + +export function buildUpdateOrderMulticall(updateTxn: UpdateOrderTxnParams) { + const { updatePayload, params: updateParams } = updateTxn; + const { chainId } = updateParams; + const orderVaultAddress = getContract(chainId, "OrderVault"); + + const multicall: ExchangeRouterCall[] = []; + + if (updatePayload.executionFeeTopUp > 0n) { + multicall.push({ method: "sendWnt", params: [orderVaultAddress, updatePayload.executionFeeTopUp] }); + } + + multicall.push({ + method: "updateOrder", + params: [ + updatePayload.orderKey, + updatePayload.sizeDeltaUsd, + updatePayload.acceptablePrice, + updatePayload.triggerPrice, + updatePayload.minOutputAmount, + 0n, + updatePayload.autoCancel, + ], + }); + + return { + multicall, + value: updatePayload.executionFeeTopUp, + }; +} + +export function buildCancelOrderMulticall({ params }: { params: CancelOrderTxnParams }) { + const { orderKey } = params; + + const multicall: ExchangeRouterCall[] = []; + + multicall.push({ + method: "cancelOrder", + params: [orderKey], + }); + + return { + multicall, + value: 0n, + }; +} + +export function encodeExchangeRouterMulticall(multicall: ExchangeRouterCall[]) { + const encodedMulticall = multicall.map((call) => + encodeFunctionData({ + abi: abis.ExchangeRouter, + functionName: call.method as any, + args: call.params as any, + }) + ); + + const callData = encodeFunctionData({ + abi: ExchangeRouterAbi, + functionName: "multicall", + args: [encodedMulticall], + }); + + return { + encodedMulticall, + callData, + }; +} + +export function getBatchRequiredActions(orderParams: BatchOrderTxnParams | undefined) { + if (!orderParams) { + return 0; + } + + return ( + orderParams.createOrderParams.length + orderParams.updateOrderParams.length + orderParams.cancelOrderParams.length + ); +} + +export function getBatchSwapsCount(orderParams: BatchOrderTxnParams | undefined) { + if (!orderParams) { + return 0; + } + + return orderParams.createOrderParams.reduce((acc, co) => { + return acc + co.orderPayload.addresses.swapPath.length; + }, 0); +} + +export function getIsEmptyBatch(orderParams: BatchOrderTxnParams | undefined) { + if (!orderParams) { + return true; + } + + if (getBatchRequiredActions(orderParams) === 0) { + return true; + } + + const hasEmptyOrder = orderParams.createOrderParams.some( + (o) => o.orderPayload.numbers.sizeDeltaUsd === 0n && o.orderPayload.numbers.initialCollateralDeltaAmount === 0n + ); + + return hasEmptyOrder; +} + +export function getBatchIsNativePayment(orderParams: BatchOrderTxnParams) { + return orderParams.createOrderParams.some((o) => o.tokenTransfersParams?.isNativePayment); +} + +export function getIsInvalidBatchReceiver(batchParams: BatchOrderTxnParams, signerAddress: string) { + return batchParams.createOrderParams.some((co) => co.orderPayload.addresses.receiver !== signerAddress); +} diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/orders.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/orders.ts index 8bf88852..309d10b3 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/orders.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/orders.ts @@ -1,18 +1,28 @@ -import {BASIS_POINTS_DIVISOR_BIGINT, DEFAULT_ALLOWED_SWAP_SLIPPAGE_BPS} from "../configs/factors.js"; -import {MarketsInfoData} from "../types/markets.js"; -import {Order, OrderInfo, OrderType, PositionOrderInfo, SwapOrderInfo} from "../types/orders.js"; -import {Token, TokensData} from "../types/tokens.js"; -import {bigMath} from "./bigmath.js"; -import {getByKey} from "./objects.js"; -import {parsePositionKey} from "./positions.js"; -import {getOrderThresholdType} from "./prices.js"; -import {getSwapPathOutputAddresses, getSwapPathStats} from "./swap/index.js"; +import { BASIS_POINTS_DIVISOR_BIGINT, DEFAULT_ALLOWED_SWAP_SLIPPAGE_BPS } from "../configs/factors.js"; +import { MarketsInfoData } from "../types/markets.js"; import { - convertToTokenAmount, - convertToUsd, - getTokensRatioByAmounts, - getTokensRatioByMinOutputAmountAndTriggerPrice, - parseContractPrice, + Order, + OrderInfo, + OrderParams, + OrderType, + PositionOrderInfo, + SwapOrderInfo, + SwapPricingType, + TwapOrderInfo, +} from "../types/orders.js"; +import { Token, TokensData } from "../types/tokens.js"; +import { getSwapPathOutputAddresses, getSwapPathStats } from "../utils/swap/swapStats.js"; + +import { bigMath } from "./bigmath.js"; +import { getByKey } from "./objects.js"; +import { getPositionKey, parsePositionKey } from "./positions.js"; +import { getOrderThresholdType } from "./prices.js"; +import { + convertToTokenAmount, + convertToUsd, + getTokensRatioByAmounts, + getTokensRatioByMinOutputAmountAndTriggerPrice, + parseContractPrice, } from "./tokens.js"; export function isMarketOrderType(orderType: OrderType) { @@ -31,7 +41,9 @@ export function isDecreaseOrderType(orderType: OrderType) { return [OrderType.MarketDecrease, OrderType.LimitDecrease, OrderType.StopLossDecrease].includes(orderType); } -export function isIncreaseOrderType(orderType: OrderType) { +export function isIncreaseOrderType( + orderType: OrderType +): orderType is OrderType.MarketIncrease | OrderType.LimitIncrease | OrderType.StopIncrease { return [OrderType.MarketIncrease, OrderType.LimitIncrease, OrderType.StopIncrease].includes(orderType); } @@ -63,6 +75,30 @@ export function isStopIncreaseOrderType(orderType: OrderType) { return orderType === OrderType.StopIncrease; } +export function isTwapOrder(orderInfo: T): orderInfo is Extract { + return orderInfo.isTwap; +} + +export function isTwapSwapOrder(orderInfo: OrderInfo): orderInfo is TwapOrderInfo { + return orderInfo.isTwap && orderInfo.isSwap; +} + +export function isTwapPositionOrder(orderInfo: OrderInfo): orderInfo is TwapOrderInfo { + return orderInfo.isTwap && !orderInfo.isSwap; +} + +export function isSwapOrder(orderInfo: OrderInfo): orderInfo is SwapOrderInfo { + return orderInfo.isSwap; +} + +export function isPositionOrder(orderInfo: OrderInfo): orderInfo is PositionOrderInfo { + return !orderInfo.isSwap; +} + +export function getOrderKeys(order: OrderInfo) { + return isTwapOrder(order) ? order.orders.map((o) => o.key) : [order.key]; +} + export function getOrderInfo(p: { marketsInfoData: MarketsInfoData; tokensData: TokensData; @@ -100,7 +136,7 @@ export function getOrderInfo(p: { )!, shouldUnwrapNativeToken: order.shouldUnwrapNativeToken, shouldApplyPriceImpact: true, - isAtomicSwap: false, + swapPricingType: SwapPricingType.Swap, }); const priceImpactAmount = convertToTokenAmount( @@ -153,6 +189,7 @@ export function getOrderInfo(p: { swapPathStats, triggerRatio, initialCollateralToken, + triggerPrice: order.contractTriggerPrice, targetCollateralToken, isSwap: true, isTwap: false, @@ -194,7 +231,7 @@ export function getOrderInfo(p: { )!, shouldUnwrapNativeToken: order.shouldUnwrapNativeToken, shouldApplyPriceImpact: true, - isAtomicSwap: false, + swapPricingType: SwapPricingType.Swap, }); let triggerThresholdType; @@ -221,7 +258,12 @@ export function getOrderInfo(p: { } export function isVisibleOrder(orderType: OrderType) { - return isLimitOrderType(orderType) || isTriggerDecreaseOrderType(orderType) || isLimitSwapOrderType(orderType); + return ( + isLimitOrderType(orderType) || + isTriggerDecreaseOrderType(orderType) || + isLimitSwapOrderType(orderType) || + isMarketOrderType(orderType) + ); } export function isOrderForPosition(order: OrderInfo, positionKey: string): order is PositionOrderInfo { @@ -278,3 +320,11 @@ export function isOrderForPositionByData( return isMatch; } + +export function getOrderTradeboxKey(order: OrderInfo) { + if (isPositionOrder(order) || isTwapPositionOrder(order)) { + return `POSITION-${getPositionKey(order.account, order.marketAddress, order.initialCollateralTokenAddress, order.isLong)}`; + } + + return `SWAP-${order.account}:${order.initialCollateralTokenAddress}:${order.targetCollateralToken.address}`; +} diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/positions.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/positions.ts index 5ae4e700..0f7352a6 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/positions.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/positions.ts @@ -1,20 +1,21 @@ -import {bigMath} from "./bigmath.js"; -import {applyFactor, expandDecimals, PRECISION} from "./numbers.js"; -import {getCappedPoolPnl, getMarketPnl, getOpenInterestUsd, getPoolUsdWithoutPnl} from "./markets.js"; -import {convertToUsd, getIsEquivalentTokens} from "./tokens.js"; -import {BASIS_POINTS_DIVISOR_BIGINT} from "../configs/factors.js"; -import {Token, TokenData} from "../types/tokens.js"; -import {UserReferralInfo} from "../types/referrals.js"; -import {MarketInfo} from "../types/markets.js"; +import { BASIS_POINTS_DIVISOR_BIGINT } from "../configs/factors.js"; +import { MarketInfo } from "../types/markets.js"; +import { PositionInfoLoaded } from "../types/positions.js"; +import { UserReferralInfo } from "../types/referrals.js"; +import { Token, TokenData } from "../types/tokens.js"; + +import { bigMath } from "./bigmath.js"; import { - capPositionImpactUsdByMaxImpactPool, - capPositionImpactUsdByMaxPriceImpactFactor, - getMaxPositionImpactFactors, - getPriceImpactForPosition, - getProportionalPendingImpactValues -} from "./fees/priceImpact.js"; -import {getPositionFee} from "./fees/index.js"; -import {PositionInfoLoaded} from "../types/positions.js"; + capPositionImpactUsdByMaxImpactPool, + capPositionImpactUsdByMaxPriceImpactFactor, + getMaxPositionImpactFactors, + getPositionFee, + getPriceImpactForPosition, + getProportionalPendingImpactValues, +} from "./fees/index.js"; +import { getCappedPoolPnl, getMarketPnl, getOpenInterestUsd, getPoolUsdWithoutPnl } from "./markets.js"; +import { applyFactor, expandDecimals, PRECISION } from "./numbers.js"; +import { convertToUsd, getIsEquivalentTokens } from "./tokens.js"; export function getPositionKey(account: string, marketAddress: string, collateralAddress: string, isLong: boolean) { return `${account}:${marketAddress}:${collateralAddress}:${isLong}`; diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/prices.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/prices.ts index 63ab78b9..2ecc7591 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/prices.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/prices.ts @@ -1,12 +1,13 @@ -import {BASIS_POINTS_DIVISOR_BIGINT, DEFAULT_ACCEPTABLE_PRICE_IMPACT_BUFFER} from "../configs/factors.js"; -import {MarketInfo} from "../types/markets.js"; -import {OrderType} from "../types/orders.js"; -import {TokenPrices} from "../types/tokens.js"; -import {getCappedPositionImpactUsd, getPriceImpactByAcceptablePrice} from "./fees/index.js"; -import {bigMath} from "./bigmath.js"; -import {convertToTokenAmount} from "./tokens.js"; -import {expandDecimals, getBasisPoints, roundUpMagnitudeDivision} from "./numbers.js"; -import {TriggerThresholdType} from "../types/trade.js"; +import { BASIS_POINTS_DIVISOR_BIGINT, DEFAULT_ACCEPTABLE_PRICE_IMPACT_BUFFER } from "../configs/factors.js"; +import { MarketInfo } from "../types/markets.js"; +import { OrderType } from "../types/orders.js"; +import { TokenPrices } from "../types/tokens.js"; +import { TriggerThresholdType } from "../types/trade.js"; + +import { bigMath } from "./bigmath.js"; +import { getCappedPositionImpactUsd, getPriceImpactByAcceptablePrice } from "./fees/index.js"; +import { expandDecimals, getBasisPoints, roundUpMagnitudeDivision } from "./numbers.js"; +import { convertToTokenAmount } from "./tokens.js"; export function getMarkPrice(p: { prices: TokenPrices; isIncrease: boolean; isLong: boolean }) { const { prices, isIncrease, isLong } = p; @@ -59,8 +60,6 @@ export function getAcceptablePriceInfo(p: { const values = { acceptablePrice: 0n, acceptablePriceDeltaBps: 0n, - cappedPriceImpactDeltaUsd: 0n, - cappedPriceImpactDeltaAmount: 0n, priceImpactDeltaAmount: 0n, priceImpactDeltaUsd: 0n, priceImpactDiffUsd: 0n, diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/simulateExecuteOrder.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/simulateExecuteOrder.ts index 45b5ab96..9981d914 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/simulateExecuteOrder.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/simulateExecuteOrder.ts @@ -1,21 +1,28 @@ -import {Abi, Address, decodeErrorResult, encodeFunctionData, withRetry} from "viem"; +import { Abi, Address, decodeErrorResult, encodeFunctionData, withRetry } from "viem"; +import { abis } from "../abis/index.js"; +import { getContract } from "../configs/contracts.js"; +import { convertTokenAddress } from "../configs/tokens.js"; +import { SwapPricingType } from "../types/orders.js"; +import { TokenPrices, TokensData } from "../types/tokens.js"; -import {getContract} from "../configs/contracts.js"; -import {convertTokenAddress} from "../configs/tokens.js"; - -import {SwapPricingType} from "../types/orders.js"; -import {TokenPrices, TokensData} from "../types/tokens.js"; -import {convertToContractPrice, getTokenData} from "./tokens.js"; - -import type {GmxSdk} from "../index.js"; -import {extractError} from "./contracts.js"; -import {abis} from "../abis/index.js"; +import type { GmxSdk } from ".."; +import { extractTxnError } from "./errors/index.js"; +import { convertToContractPrice, getTokenData } from "./tokens.js"; export type PriceOverrides = { [address: string]: TokenPrices | undefined; }; +class SimulateExecuteOrderError extends Error { + constructor( + message: string, + public cause: Error + ) { + super(message); + } +} + type SimulateExecuteParams = { createMulticallPayload: string[]; primaryPriceOverrides: PriceOverrides; @@ -24,6 +31,10 @@ type SimulateExecuteParams = { swapPricingType?: SwapPricingType; }; +/** + * + * @deprecated use simulateExecution instead + */ export async function simulateExecuteOrder(sdk: GmxSdk, p: SimulateExecuteParams) { const chainId = sdk.chainId; const client = sdk.publicClient; @@ -88,22 +99,22 @@ export async function simulateExecuteOrder(sdk: GmxSdk, p: SimulateExecuteParams retryCount: 2, delay: 200, shouldRetry: (error) => { - const [message] = extractError(error); + const [message] = extractTxnError(error); return message?.toLocaleLowerCase()?.includes("unsupported block number") ?? false; }, } ); - } catch (txnError) { + } catch (txnError: any) { let msg: string | undefined = undefined; try { const errorData = extractDataFromError(txnError?.info?.error?.message) ?? extractDataFromError(txnError?.message); - const error = new Error("No data found in error."); - error.cause = txnError; + const error = new SimulateExecuteOrderError("No data found in error.", txnError); + if (!errorData) throw error; - const decodedError = decodeErrorResult({ - abi: abis.CustomErrors as Abi, + const decodedError = decodeErrorResult({ + abi: abis.CustomErrors, data: errorData as Address, }); @@ -115,7 +126,8 @@ export async function simulateExecuteOrder(sdk: GmxSdk, p: SimulateExecuteParams const parsedArgs = Object.keys(decodedError.args ?? {}).reduce( (acc, k) => { - acc[k] = decodedError.args?.[k].toString(); + const args = (decodedError.args ?? {}) as unknown as Record; + acc[k] = args[k]?.toString(); return acc; }, {} as Record diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/swap/botanixStaking.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/swap/botanixStaking.ts index fb78735b..251909ba 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/swap/botanixStaking.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/swap/botanixStaking.ts @@ -1,14 +1,14 @@ -import {encodeFunctionData} from "viem"; +import { encodeFunctionData } from "viem"; -import StBTCABI from "../../abis/StBTC.json" with {type: "json"}; -import {BOTANIX} from "../../configs/chains.js"; -import {getContract} from "../../configs/contracts.js"; -import {TokensData} from "../../types/tokens.js"; -import {ExternalSwapAggregator, ExternalSwapQuote} from "../../types/trade.js"; -import {bigMath} from "../bigmath.js"; -import {BASIS_POINTS_DIVISOR_BIGINT, getBasisPoints} from "../numbers.js"; -import {AVAILABLE_BOTANIX_DEPOSIT_PAIRS, AVAILABLE_BOTANIX_WITHDRAW_PAIRS} from "./externalSwapPath.js"; -import {convertToUsd, getMidPrice, getTokenData} from "../tokens.js"; +import StBTCABI from "../../abis/StBTC.js"; +import { BOTANIX } from "../../configs/chains.js"; +import { getContract } from "../../configs/contracts.js"; +import { TokensData } from "../../types/tokens.js"; +import { ExternalSwapAggregator, ExternalSwapQuote } from "../../types/trade.js"; +import { bigMath } from "../bigmath.js"; +import { BASIS_POINTS_DIVISOR_BIGINT, getBasisPoints } from "../numbers.js"; +import { AVAILABLE_BOTANIX_DEPOSIT_PAIRS, AVAILABLE_BOTANIX_WITHDRAW_PAIRS } from "./externalSwapPath.js"; +import { convertToUsd, getMidPrice, getTokenData } from "../tokens.js"; const COEF_REDUCER = getBasisPoints(1n, 10000n); @@ -62,9 +62,9 @@ export const getBotanixStakingExternalSwapQuote = ({ txnData: { to: getContract(BOTANIX, "StBTC"), data: encodeFunctionData({ - abi: StBTCABI.abi, + abi: StBTCABI, functionName: "deposit", - args: [amountIn, receiverAddress], + args: [amountIn, receiverAddress as `0x${string}`], }), value: 0n, estimatedGas: gasPrice, @@ -97,9 +97,9 @@ export const getBotanixStakingExternalSwapQuote = ({ txnData: { to: getContract(BOTANIX, "StBTC"), data: encodeFunctionData({ - abi: StBTCABI.abi, + abi: StBTCABI, functionName: "withdraw", - args: [amountIn, receiverAddress, getContract(BOTANIX, "ExternalHandler")], + args: [amountIn, receiverAddress as `0x${string}`, getContract(BOTANIX, "ExternalHandler") as `0x${string}`], }), value: 0n, estimatedGas: gasPrice, diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/swap/buildSwapStrategy.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/swap/buildSwapStrategy.ts index 06b0b731..d1f4fc02 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/swap/buildSwapStrategy.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/swap/buildSwapStrategy.ts @@ -1,20 +1,21 @@ -import {MarketsInfoData} from "../../types/markets.js"; -import {SwapStrategyForSwapOrders} from "../../types/swapStrategy.js"; -import {TokenData} from "../../types/tokens.js"; -import {ExternalSwapQuoteParams, SwapOptimizationOrderArray} from "../../types/trade.js"; -import {bigMath} from "../../utils/bigmath.js"; +import { MarketsInfoData } from "../../types/markets.js"; +import { SwapPricingType } from "../../types/orders.js"; +import { SwapStrategyForSwapOrders } from "../../types/swapStrategy.js"; +import { TokenData } from "../../types/tokens.js"; +import { ExternalSwapQuoteParams, SwapOptimizationOrderArray } from "../../types/trade.js"; +import { bigMath } from "../bigmath.js"; import { - convertToTokenAmount, - convertToUsd, - getIsEquivalentTokens, - getIsStake, - getIsUnstake, - getMidPrice, -} from "../../utils/tokens.js"; + convertToTokenAmount, + convertToUsd, + getIsEquivalentTokens, + getIsStake, + getIsUnstake, + getMidPrice, +} from "../tokens.js"; -import {getAvailableExternalSwapPaths} from "./externalSwapPath.js"; -import {getExternalSwapQuoteByPath} from "./externalSwapQuoteByPath.js"; -import {createFindSwapPath} from "./swapPath.js"; +import { getAvailableExternalSwapPaths } from "./externalSwapPath.js"; +import { getExternalSwapQuoteByPath } from "./externalSwapQuoteByPath.js"; +import { createFindSwapPath } from "./swapPath.js"; /* Order/Priority of getting swap strategy: @@ -32,6 +33,7 @@ export function buildSwapStrategy({ chainId, swapOptimizationOrder, externalSwapQuoteParams, + swapPricingType = SwapPricingType.Swap, }: { chainId: number; amountIn: bigint; @@ -40,6 +42,7 @@ export function buildSwapStrategy({ marketsInfoData: MarketsInfoData | undefined; swapOptimizationOrder: SwapOptimizationOrderArray | undefined; externalSwapQuoteParams: ExternalSwapQuoteParams; + swapPricingType: SwapPricingType; }): SwapStrategyForSwapOrders { const priceIn = tokenIn.prices.minPrice; const usdIn = convertToUsd(amountIn, tokenIn.decimals, priceIn)!; @@ -70,7 +73,7 @@ export function buildSwapStrategy({ fromTokenAddress: tokenIn.address, toTokenAddress: tokenOut.address, marketsInfoData, - isExpressFeeSwap: false, + swapPricingType, }); const swapPathStats = findSwapPath(usdIn, { order: swapOptimizationOrder }); @@ -98,7 +101,7 @@ export function buildSwapStrategy({ fromTokenAddress: path.outTokenAddress, toTokenAddress: tokenOut.address, marketsInfoData, - isExpressFeeSwap: false, + swapPricingType, }); const swapPathStats = findSwapPath(usdIn); @@ -117,7 +120,7 @@ export function buildSwapStrategy({ fromTokenAddress: suitableSwapPath.outTokenAddress, toTokenAddress: tokenOut.address, marketsInfoData, - isExpressFeeSwap: false, + swapPricingType, }); const swapPathStatsForCombinedSwap = externalSwapQuoteForCombinedSwap @@ -135,7 +138,7 @@ export function buildSwapStrategy({ usdOut: swapPathStatsForCombinedSwap.usdOut, priceIn: externalSwapQuoteForCombinedSwap.priceIn, priceOut: tokenOut.prices.maxPrice, - feesUsd: BigInt(externalSwapQuoteForCombinedSwap.usdIn - swapPathStatsForCombinedSwap.usdOut), + feesUsd: externalSwapQuoteForCombinedSwap.usdIn - swapPathStatsForCombinedSwap.usdOut, } : defaultSwapStrategy; } @@ -152,14 +155,16 @@ export function buildReverseSwapStrategy({ chainId, externalSwapQuoteParams, swapOptimizationOrder, + swapPricingType, }: { chainId: number; amountOut: bigint; tokenIn: TokenData; tokenOut: TokenData; marketsInfoData: MarketsInfoData | undefined; - externalSwapQuoteParams: ExternalSwapQuoteParams; + externalSwapQuoteParams: ExternalSwapQuoteParams | undefined; swapOptimizationOrder: SwapOptimizationOrderArray | undefined; + swapPricingType: SwapPricingType; }): SwapStrategyForSwapOrders { const priceIn = getMidPrice(tokenIn.prices); const priceOut = getMidPrice(tokenOut.prices); @@ -190,7 +195,7 @@ export function buildReverseSwapStrategy({ fromTokenAddress: tokenIn.address, toTokenAddress: tokenOut.address, marketsInfoData, - isExpressFeeSwap: false, + swapPricingType, }); const approximateSwapPathStats = findSwapPath(approximateUsdIn, { order: swapOptimizationOrder }); @@ -233,7 +238,7 @@ export function buildReverseSwapStrategy({ fromTokenAddress: tokenIn.address, toTokenAddress: path.inTokenAddress, marketsInfoData, - isExpressFeeSwap: false, + swapPricingType, }); const swapPathStats = findSwapPath(approximateUsdIn); @@ -241,7 +246,7 @@ export function buildReverseSwapStrategy({ return Boolean(swapPathStats); }); - if (suitableSwapPath) { + if (suitableSwapPath && externalSwapQuoteParams) { const approximateExternalSwapQuoteForCombinedSwap = getExternalSwapQuoteByPath({ amountIn: approximateAmountIn, externalSwapPath: suitableSwapPath, @@ -257,7 +262,7 @@ export function buildReverseSwapStrategy({ fromTokenAddress: tokenIn.address, toTokenAddress: suitableSwapPath.inTokenAddress, marketsInfoData, - isExpressFeeSwap: false, + swapPricingType, }); const approximateSwapPathStatsForCombinedSwap = findSwapPathForSuitableSwapPath( @@ -303,7 +308,7 @@ export function buildReverseSwapStrategy({ usdOut: adjustedSwapPathStatsForCombinedSwap.usdOut, priceIn: adjustedExternalSwapQuoteForCombinedSwap.priceIn, priceOut: priceOut, - feesUsd: BigInt(adjustedExternalSwapQuoteForCombinedSwap.usdIn - adjustedSwapPathStatsForCombinedSwap.usdOut), + feesUsd: adjustedExternalSwapQuoteForCombinedSwap.usdIn - adjustedSwapPathStatsForCombinedSwap.usdOut, }; } diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/swap/externalSwapQuoteByPath.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/swap/externalSwapQuoteByPath.ts index 51c865c8..43210596 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/swap/externalSwapQuoteByPath.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/swap/externalSwapQuoteByPath.ts @@ -1,11 +1,6 @@ -import { - ExternalSwapAggregator, - ExternalSwapPath, - ExternalSwapQuote, - ExternalSwapQuoteParams -} from "../../types/trade.js"; +import { ExternalSwapAggregator, ExternalSwapPath, ExternalSwapQuote, ExternalSwapQuoteParams } from "../../types/trade.js"; -import {getBotanixStakingExternalSwapQuote} from "./botanixStaking.js"; +import { getBotanixStakingExternalSwapQuote } from "./botanixStaking.js"; export const getExternalSwapQuoteByPath = ({ amountIn, diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/swap/preparedSwapData.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/swap/preparedSwapData.ts index 96d8655c..d6dd54b6 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/swap/preparedSwapData.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/swap/preparedSwapData.ts @@ -1,9 +1,9 @@ -import {MARKETS} from "../../configs/markets.js"; -import {SwapPaths} from "../../types/trade.js"; +import { MARKETS } from "../../configs/markets.js"; +import { SwapPaths } from "../../types/trade.js"; -import {buildMarketsAdjacencyGraph, MarketsGraph} from "./buildMarketsAdjacencyGraph.js"; -import {findReachableTokens} from "./findReachableTokens.js"; -import {findSwapPathsBetweenTokens} from "./findSwapPathsBetweenTokens.js"; +import { MarketsGraph, buildMarketsAdjacencyGraph } from "./buildMarketsAdjacencyGraph.js"; +import { findReachableTokens } from "./findReachableTokens.js"; +import { findSwapPathsBetweenTokens } from "./findSwapPathsBetweenTokens.js"; const MARKETS_ADJACENCY_GRAPH: { [chainId: number]: MarketsGraph; diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/swap/swapPath.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/swap/swapPath.ts index fb950eaf..2470a592 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/swap/swapPath.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/swap/swapPath.ts @@ -1,26 +1,27 @@ -import {MarketConfig, MARKETS} from "../../configs/markets.js"; -import {convertTokenAddress, getWrappedToken, NATIVE_TOKEN_ADDRESS} from "../../configs/tokens.js"; -import {GasLimitsConfig} from "../../types/fees.js"; -import {MarketsInfoData} from "../../types/markets.js"; -import {TokensData} from "../../types/tokens.js"; -import {FindSwapPath, SwapPathStats} from "../../types/trade.js"; -import {LRUCache} from "../LruCache.js"; -import {getIsMarketAvailableForExpressSwaps} from "../markets.js"; +import { MarketConfig, MARKETS } from "../../configs/markets.js"; +import { convertTokenAddress, getWrappedToken, NATIVE_TOKEN_ADDRESS } from "../../configs/tokens.js"; +import { GasLimitsConfig } from "../../types/fees.js"; +import { MarketsInfoData } from "../../types/markets.js"; +import { SwapPricingType } from "../../types/orders.js"; +import { TokensData } from "../../types/tokens.js"; +import { FindSwapPath, SwapPathStats } from "../../types/trade.js"; +import { LRUCache } from "../../utils/LruCache.js"; +import { getIsMarketAvailableForExpressSwaps } from "../../utils/markets.js"; -import {buildMarketsAdjacencyGraph, MarketsGraph} from "./buildMarketsAdjacencyGraph.js"; +import { buildMarketsAdjacencyGraph, MarketsGraph } from "./buildMarketsAdjacencyGraph.js"; import { - createMarketEdgeLiquidityGetter, - createNaiveNetworkEstimator, - createNaiveSwapEstimator, - createSwapEstimator, - getBestSwapPath, - getMarketAdjacencyGraph, - getMaxLiquidityMarketSwapPathFromTokenSwapPaths, - getNaiveBestMarketSwapPathsFromTokenSwapPaths, - getTokenSwapPathsForTokenPairPrebuilt, - marketRouteToMarketEdges, + createMarketEdgeLiquidityGetter, + createNaiveNetworkEstimator, + createNaiveSwapEstimator, + createSwapEstimator, + getBestSwapPath, + getMarketAdjacencyGraph, + getMaxLiquidityMarketSwapPathFromTokenSwapPaths, + getNaiveBestMarketSwapPathsFromTokenSwapPaths, + getTokenSwapPathsForTokenPairPrebuilt, + marketRouteToMarketEdges, } from "./swapRouting.js"; -import {getSwapPathStats} from "./swapStats.js"; +import { getSwapPathStats } from "./swapStats.js"; export const getWrappedAddress = (chainId: number, address: string | undefined) => { return address ? convertTokenAddress(chainId, address, "wrapped") : undefined; @@ -71,10 +72,9 @@ export const createFindSwapPath = (params: { tokensData: TokensData; } | undefined; - isExpressFeeSwap: boolean | undefined; + swapPricingType: SwapPricingType | undefined; disabledMarkets?: string[] | undefined; manualPath?: string[] | undefined; - maxSwapPathLength?: number | undefined; }): FindSwapPath => { const { chainId, @@ -84,8 +84,7 @@ export const createFindSwapPath = (params: { disabledMarkets, manualPath, gasEstimationParams, - isExpressFeeSwap, - maxSwapPathLength, + swapPricingType = SwapPricingType.Swap, } = params; const wrappedFromAddress = getWrappedAddress(chainId, fromTokenAddress); const wrappedToAddress = getWrappedAddress(chainId, toTokenAddress); @@ -96,19 +95,9 @@ export const createFindSwapPath = (params: { ? getTokenSwapPathsForTokenPairPrebuilt(chainId, wrappedFromAddress, wrappedToAddress) : []; - if (maxSwapPathLength) { - /** - * As tokenSwapPath contains what tokens can we between input and output token, - * restricting intermediate tokens to 0 would mean we filter out any non-direct market swaps, - * length of 1 would mean all 2-step swaps - */ - const nonDirectPathLength = maxSwapPathLength - 1; - tokenSwapPaths = tokenSwapPaths.filter((path) => path.length <= nonDirectPathLength); - } - const finalDisabledMarkets = [...(disabledMarkets ?? [])]; - if (isExpressFeeSwap) { + if (swapPricingType === SwapPricingType.AtomicSwap) { const expressSwapUnavailableMarkets = Object.values(marketsInfoData ?? {}) .filter((market) => !getIsMarketAvailableForExpressSwaps(market)) .map((market) => market.marketTokenAddress); @@ -116,8 +105,6 @@ export const createFindSwapPath = (params: { finalDisabledMarkets.push(...expressSwapUnavailableMarkets); } - const isAtomicSwap = Boolean(isExpressFeeSwap); - const marketAdjacencyGraph = buildMarketAdjacencyGraph(chainId, finalDisabledMarkets); const cache: Record = {}; @@ -127,7 +114,7 @@ export const createFindSwapPath = (params: { } const marketEdgeLiquidityGetter = createMarketEdgeLiquidityGetter(marketsInfoData); - const naiveEstimator = createNaiveSwapEstimator(marketsInfoData, isAtomicSwap); + const naiveEstimator = createNaiveSwapEstimator(marketsInfoData, swapPricingType); const naiveNetworkEstimator = gasEstimationParams ? createNaiveNetworkEstimator({ gasLimits: gasEstimationParams.gasLimits, @@ -136,7 +123,7 @@ export const createFindSwapPath = (params: { chainId, }) : undefined; - const estimator = createSwapEstimator(marketsInfoData, isAtomicSwap); + const estimator = createSwapEstimator(marketsInfoData, swapPricingType); const findSwapPath: FindSwapPath = (usdIn: bigint, opts?: { order?: ("liquidity" | "length")[] }) => { if (tokenSwapPaths.length === 0 || !fromTokenAddress || !wrappedFromAddress || !wrappedToAddress) { @@ -217,7 +204,7 @@ export const createFindSwapPath = (params: { shouldUnwrapNativeToken: toTokenAddress === NATIVE_TOKEN_ADDRESS, shouldApplyPriceImpact: true, usdIn, - isAtomicSwap, + swapPricingType, }); cache[cacheKey] = result; diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/swap/swapRouting.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/swap/swapRouting.ts index 78b15aca..9deef955 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/swap/swapRouting.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/swap/swapRouting.ts @@ -1,29 +1,33 @@ -import {maxUint256} from "viem"; +import { maxUint256 } from "viem"; -import {GasLimitsConfig} from "../../types/fees.js"; -import {MarketsInfoData} from "../../types/markets.js"; -import {TokensData} from "../../types/tokens.js"; +import { GasLimitsConfig } from "../../types/fees.js"; +import { MarketsInfoData } from "../../types/markets.js"; +import { SwapPricingType } from "../../types/orders.js"; +import { TokensData } from "../../types/tokens.js"; import { - MarketEdge, - MarketEdgeLiquidityGetter, - NaiveNetworkEstimator, - NaiveSwapEstimator, - SwapEstimator, - SwapPaths, + MarketEdge, + MarketEdgeLiquidityGetter, + NaiveNetworkEstimator, + NaiveSwapEstimator, + SwapEstimator, + SwapPaths, } from "../../types/trade.js"; -import {bigMath} from "../../utils/bigmath.js"; -import {estimateOrderOraclePriceCount, getExecutionFee} from "../../utils/fees/index.js"; -import {getNaiveEstimatedGasBySwapCount} from "../../utils/fees/getNaiveEstimatedGasBySwapCount.js"; -import {getAvailableUsdLiquidityForCollateral, getTokenPoolType} from "../../utils/markets.js"; -import {bigintToNumber, PRECISION, PRECISION_DECIMALS} from "../../utils/numbers.js"; -import {getByKey} from "../../utils/objects.js"; -import {MarketsGraph} from "../../utils/swap/buildMarketsAdjacencyGraph.js"; -import {DEFAULT_NAIVE_TOP_PATHS_COUNT} from "../../utils/swap/constants.js"; -import {MARKETS_ADJACENCY_GRAPH, REACHABLE_TOKENS, TOKEN_SWAP_PATHS} from "../../utils/swap/preparedSwapData.js"; +import { bigMath } from "../../utils/bigmath.js"; +import { estimateOrderOraclePriceCount, getExecutionFee } from "../../utils/fees/index.js"; +import { getNaiveEstimatedGasBySwapCount } from "../../utils/fees/getNaiveEstimatedGasBySwapCount.js"; +import { getAvailableUsdLiquidityForCollateral, getTokenPoolType } from "../../utils/markets.js"; +import { PRECISION, PRECISION_DECIMALS, bigintToNumber } from "../../utils/numbers.js"; +import { getByKey } from "../../utils/objects.js"; +import { MarketsGraph } from "../../utils/swap/buildMarketsAdjacencyGraph.js"; +import { DEFAULT_NAIVE_TOP_PATHS_COUNT } from "../../utils/swap/constants.js"; +import { MARKETS_ADJACENCY_GRAPH, REACHABLE_TOKENS, TOKEN_SWAP_PATHS } from "../../utils/swap/preparedSwapData.js"; -import {getSwapStats} from "./swapStats.js"; +import { getSwapStats } from "./swapStats.js"; -export const createSwapEstimator = (marketsInfoData: MarketsInfoData, isAtomicSwap: boolean): SwapEstimator => { +export const createSwapEstimator = ( + marketsInfoData: MarketsInfoData, + swapPricingType: SwapPricingType +): SwapEstimator => { return (e: MarketEdge, usdIn: bigint) => { const marketInfo = marketsInfoData[e.marketAddress]; @@ -39,7 +43,7 @@ export const createSwapEstimator = (marketsInfoData: MarketsInfoData, isAtomicSw tokenInAddress: e.from, tokenOutAddress: e.to, shouldApplyPriceImpact: true, - isAtomicSwap, + swapPricingType, }); const isOutLiquidity = swapStats?.isOutLiquidity; @@ -73,9 +77,13 @@ export const createMarketEdgeLiquidityGetter = (marketsInfoData: MarketsInfoData }; }; +/** + TODO MLTCH does naive estimator need to know about swap pricing type? + Its naive for a reason and i think it would work the same without knowing about it +*/ export const createNaiveSwapEstimator = ( marketsInfoData: MarketsInfoData, - isAtomicSwap: boolean + swapPricingType: SwapPricingType ): NaiveSwapEstimator => { return (e: MarketEdge, usdIn: bigint) => { let marketInfo = marketsInfoData[e.marketAddress]; @@ -90,7 +98,7 @@ export const createNaiveSwapEstimator = ( tokenInAddress: e.from, tokenOutAddress: e.to, shouldApplyPriceImpact: true, - isAtomicSwap, + swapPricingType, }); const usdOut = swapStats?.usdOut; diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/swap/swapStats.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/swap/swapStats.ts index 6dfbb5a3..8ea1f35d 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/swap/swapStats.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/swap/swapStats.ts @@ -1,14 +1,14 @@ -import {maxUint256} from "viem"; +import { maxUint256 } from "viem"; -import {NATIVE_TOKEN_ADDRESS} from "../../configs/tokens.js"; -import {MarketInfo, MarketsInfoData} from "../../types/markets.js"; -import {SwapPathStats, SwapStats} from "../../types/trade.js"; +import { NATIVE_TOKEN_ADDRESS } from "../../configs/tokens.js"; +import { MarketInfo, MarketsInfoData } from "../../types/markets.js"; +import { SwapPricingType } from "../../types/orders.js"; +import { SwapPathStats, SwapStats } from "../../types/trade.js"; -import {getByKey} from "../objects.js"; -import {convertToTokenAmount, convertToUsd, getMidPrice} from "../tokens.js"; -import {getAvailableUsdLiquidityForCollateral, getOppositeCollateral, getTokenPoolType} from "../markets.js"; -import {getSwapFee} from "../fees/index.js"; -import {applySwapImpactWithCap, getPriceImpactForSwap} from "../fees/priceImpact.js"; +import { applySwapImpactWithCap, getPriceImpactForSwap, getSwapFee } from "../fees/index.js"; +import { getAvailableUsdLiquidityForCollateral, getOppositeCollateral, getTokenPoolType } from "../markets.js"; +import { getByKey } from "../objects.js"; +import { convertToTokenAmount, convertToUsd, getMidPrice } from "../tokens.js"; export function getSwapCapacityUsd(marketInfo: MarketInfo, isLong: boolean) { const poolAmount = isLong ? marketInfo.longPoolAmount : marketInfo.shortPoolAmount; @@ -121,7 +121,7 @@ export function getSwapPathStats(p: { usdIn: bigint; shouldUnwrapNativeToken: boolean; shouldApplyPriceImpact: boolean; - isAtomicSwap: boolean; + swapPricingType: SwapPricingType; }): SwapPathStats | undefined { const { marketsInfoData, @@ -131,7 +131,7 @@ export function getSwapPathStats(p: { shouldUnwrapNativeToken, shouldApplyPriceImpact, wrappedNativeTokenAddress, - isAtomicSwap, + swapPricingType, } = p; if (swapPath.length === 0) { @@ -174,7 +174,7 @@ export function getSwapPathStats(p: { tokenOutAddress, usdIn: usdOut, shouldApplyPriceImpact, - isAtomicSwap, + swapPricingType, }); tokenInAddress = swapStep.tokenOutAddress; @@ -212,9 +212,9 @@ export function getSwapStats(p: { tokenOutAddress: string; usdIn: bigint; shouldApplyPriceImpact: boolean; - isAtomicSwap: boolean; + swapPricingType: SwapPricingType; }): SwapStats { - const { marketInfo, tokenInAddress, tokenOutAddress, usdIn, shouldApplyPriceImpact, isAtomicSwap } = p; + const { marketInfo, tokenInAddress, tokenOutAddress, usdIn, shouldApplyPriceImpact, swapPricingType } = p; const isWrap = tokenInAddress === NATIVE_TOKEN_ADDRESS; const isUnwrap = tokenOutAddress === NATIVE_TOKEN_ADDRESS; @@ -240,7 +240,7 @@ export function getSwapStats(p: { } catch (e) { // Approximate if the market would be out of capacity const capacityUsd = getSwapCapacityUsd(marketInfo, getTokenPoolType(marketInfo, tokenInAddress) === "long"); - const swapFeeUsd = getSwapFee(marketInfo, usdIn, false, isAtomicSwap); + const swapFeeUsd = getSwapFee(marketInfo, usdIn, false, swapPricingType); const usdInAfterFees = usdIn - swapFeeUsd; const isOutCapacity = capacityUsd < usdInAfterFees; @@ -263,8 +263,8 @@ export function getSwapStats(p: { }; } - const swapFeeAmount = getSwapFee(marketInfo, amountIn, balanceWasImproved, isAtomicSwap); - const swapFeeUsd = getSwapFee(marketInfo, usdIn, balanceWasImproved, isAtomicSwap); + const swapFeeAmount = getSwapFee(marketInfo, amountIn, balanceWasImproved, swapPricingType); + const swapFeeUsd = getSwapFee(marketInfo, usdIn, balanceWasImproved, swapPricingType); const amountInAfterFees = amountIn - swapFeeAmount; const usdInAfterFees = usdIn - swapFeeUsd; diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/swap/swapValues.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/swap/swapValues.ts index b231d755..e5daf1a3 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/swap/swapValues.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/swap/swapValues.ts @@ -1,22 +1,23 @@ -import {BASIS_POINTS_DIVISOR_BIGINT} from "../../configs/factors.js"; -import {MarketsInfoData} from "../../types/markets.js"; -import {InternalSwapStrategy, NoSwapStrategy} from "../../types/swapStrategy.js"; -import type {TokenData, TokensRatio} from "../../types/tokens.js"; -import type {FindSwapPath, SwapAmounts, SwapOptimizationOrderArray} from "../../types/trade.js"; -import {ExternalSwapQuoteParams, SwapRoute} from "../../types/trade.js"; -import {bigMath} from "../../utils/bigmath.js"; -import {getTotalSwapVolumeFromSwapStats} from "../../utils/fees/index.js"; -import {applyFactor} from "../../utils/numbers.js"; +import { BASIS_POINTS_DIVISOR_BIGINT } from "../../configs/factors.js"; +import { MarketsInfoData } from "../../types/markets.js"; +import { SwapPricingType } from "../../types/orders.js"; +import { InternalSwapStrategy, NoSwapStrategy } from "../../types/swapStrategy.js"; +import type { TokenData, TokensRatio } from "../../types/tokens.js"; +import type { FindSwapPath, SwapAmounts, SwapOptimizationOrderArray } from "../../types/trade.js"; +import { ExternalSwapQuoteParams, SwapRoute } from "../../types/trade.js"; +import { bigMath } from "../../utils/bigmath.js"; +import { getTotalSwapVolumeFromSwapStats } from "../../utils/fees/index.js"; +import { applyFactor } from "../../utils/numbers.js"; import { - convertToTokenAmount, - convertToUsd, - getAmountByRatio, - getIsEquivalentTokens, - getIsStake, - getIsUnstake, + convertToTokenAmount, + convertToUsd, + getAmountByRatio, + getIsEquivalentTokens, + getIsStake, + getIsUnstake, } from "../../utils/tokens.js"; -import {buildReverseSwapStrategy, buildSwapStrategy} from "./buildSwapStrategy.js"; +import { buildReverseSwapStrategy, buildSwapStrategy } from "./buildSwapStrategy.js"; export function getSwapAmountsByFromValue(p: { tokenIn: TokenData; @@ -58,6 +59,7 @@ export function getSwapAmountsByFromValue(p: { chainId, swapOptimizationOrder, externalSwapQuoteParams, + swapPricingType: SwapPricingType.Swap, }); const swapPathStats = swapStrategy.swapPathStats; @@ -154,7 +156,7 @@ export function getSwapAmountsByToValue(p: { return getSwapAmountsByToValueDefault(p); } - const swapStrategy = buildReverseSwapStrategy({ + const swapStrategyReverse = buildReverseSwapStrategy({ amountOut, tokenIn, tokenOut, @@ -162,6 +164,18 @@ export function getSwapAmountsByToValue(p: { chainId, externalSwapQuoteParams, swapOptimizationOrder, + swapPricingType: SwapPricingType.Swap, + }); + + const swapStrategy = buildSwapStrategy({ + amountIn: swapStrategyReverse.amountIn, + tokenIn, + tokenOut, + marketsInfoData, + chainId, + swapOptimizationOrder, + externalSwapQuoteParams, + swapPricingType: SwapPricingType.Swap, }); const uiFeeUsd = applyFactor(swapStrategy.usdIn, uiFeeFactor); @@ -183,7 +197,6 @@ export function getSwapAmountsByToValue(p: { let amountIn = swapStrategy.amountIn; let usdIn = swapStrategy.usdIn; - let minOutputAmount = 0n; if (isLimit) { if (!triggerRatio) { @@ -201,12 +214,6 @@ export function getSwapAmountsByToValue(p: { usdIn = convertToUsd(amountIn, tokenIn.decimals, swapStrategy.priceIn)!; if (allowedSwapSlippageBps !== undefined) { usdIn += bigMath.mulDiv(usdIn, allowedSwapSlippageBps ?? 0n, BASIS_POINTS_DIVISOR_BIGINT); - } else { - usdIn = - usdIn + - swapStrategy.swapPathStats.totalSwapFeeUsd + - uiFeeUsd - - swapStrategy.swapPathStats.totalSwapPriceImpactDeltaUsd; } amountIn = convertToTokenAmount(usdIn, tokenIn.decimals, swapStrategy.priceIn)!; } else { @@ -214,20 +221,23 @@ export function getSwapAmountsByToValue(p: { amountIn = convertToTokenAmount(usdIn, tokenIn.decimals, swapStrategy.priceIn)!; } + let minOutputAmount = amountOut; + if (amountIn < 0) { amountIn = 0n; usdIn = 0n; + minOutputAmount = 0n; } return { - amountIn: swapStrategy.amountIn, + amountIn, amountOut: swapStrategy.amountOut, - usdIn, + usdIn: swapStrategy.usdIn, minOutputAmount, usdOut: swapStrategy.usdOut, priceIn: swapStrategy.priceIn, priceOut: swapStrategy.priceOut, - swapStrategy, + swapStrategy: swapStrategy, }; } @@ -507,8 +517,6 @@ function getSwapAmountsByToValueDefault(p: { usdIn = convertToUsd(amountIn, tokenIn.decimals, priceIn)!; if (allowedSwapSlippageBps !== undefined) { usdIn += bigMath.mulDiv(usdIn, allowedSwapSlippageBps ?? 0n, BASIS_POINTS_DIVISOR_BIGINT); - } else { - usdIn = usdIn + swapPathStats.totalSwapFeeUsd + uiFeeUsd - swapPathStats.totalSwapPriceImpactDeltaUsd; } amountIn = convertToTokenAmount(usdIn, tokenIn.decimals, priceIn)!; } else { diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/testUtil.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/testUtil.ts index eb778c4f..c2ed3454 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/testUtil.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/testUtil.ts @@ -1,8 +1,9 @@ -import {createTestClient, http, publicActions, walletActions} from "viem"; +import { createTestClient, http, publicActions, walletActions } from "viem"; -import {ARBITRUM, ContractsChainId, getViemChain} from "../configs/chains.js"; +import { ARBITRUM, getViemChain } from "../configs/chains.js"; +import { GmxSdkConfig } from "../types/sdk.js"; -import {GmxSdk} from "../index.js"; +import { GmxSdk } from "../index.js"; const client = createTestClient({ chain: getViemChain(ARBITRUM), @@ -12,14 +13,13 @@ const client = createTestClient({ .extend(publicActions) .extend(walletActions); -export const arbitrumSdkConfig = { - chainId: ARBITRUM as ContractsChainId, +export const arbitrumSdkConfig: GmxSdkConfig = { + chainId: ARBITRUM, account: "0x9f7198eb1b9Ccc0Eb7A07eD228d8FbC12963ea33", oracleUrl: "https://arbitrum-api.gmxinfra.io", rpcUrl: "https://arb1.arbitrum.io/rpc", walletClient: client, - subsquidUrl: "https://gmx.squids.live/gmx-synthetics-arbitrum:live/api/graphql", - subgraphUrl: "https://subgraph.satsuma-prod.com/3b2ced13c8d9/gmx/synthetics-arbitrum-stats/api", + subsquidUrl: "https://gmx.squids.live/gmx-synthetics-arbitrum:prod/api/graphql", }; export const arbitrumSdk = new GmxSdk(arbitrumSdkConfig); diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/time.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/time.ts new file mode 100644 index 00000000..fdc4b2ac --- /dev/null +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/time.ts @@ -0,0 +1,29 @@ +const SECONDS_IN_PERIOD = { + "1m": 60, + "5m": 60 * 5, + "15m": 60 * 15, + "1h": 60 * 60, + "4h": 60 * 60 * 4, + "1d": 60 * 60 * 24, + "1y": 60 * 60 * 24 * 365, +}; + +export function secondsFrom(period: keyof typeof SECONDS_IN_PERIOD) { + return SECONDS_IN_PERIOD[period]; +} + +export function secondsToPeriod(seconds: number, period: keyof typeof SECONDS_IN_PERIOD, roundUp = false) { + const secondsInPeriod = secondsFrom(period); + + const roundedSeconds = roundUp ? Math.ceil(seconds / secondsInPeriod) : Math.floor(seconds / secondsInPeriod); + + return roundedSeconds; +} + +export function periodToSeconds(periodsCount: number, period: keyof typeof SECONDS_IN_PERIOD) { + return periodsCount * secondsFrom(period); +} + +export function nowInSeconds() { + return Math.floor(Date.now() / 1000); +} diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/tokens.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/tokens.ts index a69b8fb8..ab88c94a 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/tokens.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/tokens.ts @@ -1,16 +1,18 @@ +import { ContractsChainId } from "../configs/chains.js"; +import { BASIS_POINTS_DIVISOR_BIGINT, DEFAULT_ALLOWED_SWAP_SLIPPAGE_BPS } from "../configs/factors.js"; +import { GLV_STUB_ADDRESS, getToken, NATIVE_TOKEN_ADDRESS, GM_STUB_ADDRESS } from "../configs/tokens.js"; import { - ContractPrice, - Token, - TokenData, - TokenPrices, - TokensData, - TokensRatio, - TokensRatioAndSlippage + ContractPrice, + Token, + TokenData, + TokenPrices, + TokensData, + TokensRatio, + TokensRatioAndSlippage, } from "../types/tokens.js"; -import {adjustForDecimals, expandDecimals, PRECISION} from "./numbers.js"; -import {NATIVE_TOKEN_ADDRESS} from "../configs/tokens.js"; -import {BASIS_POINTS_DIVISOR_BIGINT, DEFAULT_ALLOWED_SWAP_SLIPPAGE_BPS} from "../configs/factors.js"; -import {bigMath} from "./bigmath.js"; + +import { bigMath } from "./bigmath.js"; +import { adjustForDecimals, expandDecimals, PRECISION } from "./numbers.js"; export function parseContractPrice(price: bigint, tokenDecimals: number) { return price * expandDecimals(1, tokenDecimals); @@ -94,7 +96,11 @@ export function getIsEquivalentTokens(token1: Token, token2: Token) { return false; } -export function getTokenData(tokensData?: TokensData, address?: string, convertTo?: "wrapped" | "native") { +export function getTokenData( + tokensData?: TokensData, + address?: string, + convertTo?: "wrapped" | "native" +): TokenData | undefined { if (!address || !tokensData?.[address]) { return undefined; } @@ -242,3 +248,21 @@ export function getTokensRatioByPrice(p: { return { ratio, largestToken, smallestToken }; } + +export function getGmToken(chainId: ContractsChainId, marketTokenAddress: string): Token { + const stubToken = getToken(chainId, GM_STUB_ADDRESS); + + return { + ...stubToken, + address: marketTokenAddress, + }; +} + +export function getGlvToken(chainId: ContractsChainId, glvTokenAddress: string): Token { + const stubToken = getToken(chainId, GLV_STUB_ADDRESS); + + return { + ...stubToken, + address: glvTokenAddress, + }; +} diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/trade/decrease.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/trade/decrease.ts index 5a45442b..c4c90ab1 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/trade/decrease.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/trade/decrease.ts @@ -1,6 +1,6 @@ import {DEFAULT_ACCEPTABLE_PRICE_IMPACT_BUFFER} from "../../configs/factors.js"; import {MarketInfo} from "../../types/markets.js"; -import {DecreasePositionSwapType, OrderType} from "../../types/orders.js"; +import {DecreasePositionSwapType, OrderType, SwapPricingType} from "../../types/orders.js"; import {PositionInfo, PositionInfoLoaded} from "../../types/positions.js"; import {UserReferralInfo} from "../../types/referrals.js"; import {TokenData} from "../../types/tokens.js"; @@ -8,29 +8,29 @@ import {DecreasePositionAmounts, NextPositionValues} from "../../types/trade.js" import {bigMath} from "../../utils/bigmath.js"; import {getPositionFee} from "../../utils/fees/index.js"; import { - applyFactor, - BASIS_POINTS_DIVISOR_BIGINT, - expandDecimals, - getBasisPoints, - MaxUint256, - roundUpDivision, - USD_DECIMALS, + applyFactor, + BASIS_POINTS_DIVISOR_BIGINT, + expandDecimals, + getBasisPoints, + roundUpDivision, + USD_DECIMALS, + MaxUint256, } from "../../utils/numbers.js"; import { - getLeverage, - getLiquidationPrice, - getMinCollateralFactorForPosition, - getNetPriceImpactDeltaUsdForDecrease, - getPositionPnlUsd, + getLeverage, + getLiquidationPrice, + getMinCollateralFactorForPosition, + getNetPriceImpactDeltaUsdForDecrease, + getPositionPnlUsd, } from "../../utils/positions.js"; import { - getAcceptablePriceInfo, - getDefaultAcceptablePriceImpactBps, - getMarkPrice, - getOrderThresholdType, + getAcceptablePriceInfo, + getDefaultAcceptablePriceImpactBps, + getMarkPrice, + getOrderThresholdType, } from "../../utils/prices.js"; -import {getSwapStats} from "../../utils/swap/index.js"; -import {convertToTokenAmount, convertToUsd, getIsEquivalentTokens} from "../../utils/tokens.js"; +import { getSwapStats } from "../../utils/swap/index.js"; +import { convertToTokenAmount, convertToUsd, getIsEquivalentTokens } from "../../utils/tokens.js"; export function getDecreasePositionAmounts(p: { marketInfo: MarketInfo; @@ -49,6 +49,7 @@ export function getDecreasePositionAmounts(p: { isLimit?: boolean; limitPrice?: bigint; triggerOrderType?: DecreasePositionAmounts["triggerOrderType"]; + isSetAcceptablePriceImpactEnabled: boolean; receiveToken?: TokenData; }) { @@ -68,6 +69,7 @@ export function getDecreasePositionAmounts(p: { uiFeeFactor, triggerOrderType: orderType, receiveToken: receiveTokenArg, + isSetAcceptablePriceImpactEnabled, } = p; const { indexToken } = marketInfo; @@ -153,6 +155,7 @@ export function getDecreasePositionAmounts(p: { fixedAcceptablePriceImpactBps, acceptablePriceImpactBuffer, values, + isSetAcceptablePriceImpactEnabled, }); const positionFeeInfo = getPositionFee( @@ -237,6 +240,7 @@ export function getDecreasePositionAmounts(p: { fixedAcceptablePriceImpactBps, acceptablePriceImpactBuffer, values, + isSetAcceptablePriceImpactEnabled, }); // Profit @@ -289,10 +293,10 @@ export function getDecreasePositionAmounts(p: { tokenOutAddress: collateralToken.address, usdIn: profitUsd, shouldApplyPriceImpact: true, - isAtomicSwap: false, + swapPricingType: SwapPricingType.Swap, }); - values.swapProfitFeeUsd = swapProfitStats.swapFeeUsd - swapProfitStats.priceImpactDeltaUsd; + values.swapProfitFeeUsd = swapProfitStats.swapFeeUsd - BigInt(swapProfitStats.priceImpactDeltaUsd); values.swapUiFeeUsd = applyFactor(swapProfitStats.usdIn, uiFeeFactor); } else { values.swapProfitFeeUsd = 0n; @@ -495,6 +499,7 @@ function applyAcceptablePrice(p: { fixedAcceptablePriceImpactBps?: bigint; acceptablePriceImpactBuffer?: number; values: DecreasePositionAmounts; + isSetAcceptablePriceImpactEnabled: boolean; }) { const { position, @@ -504,6 +509,7 @@ function applyAcceptablePrice(p: { isTrigger, fixedAcceptablePriceImpactBps, acceptablePriceImpactBuffer, + isSetAcceptablePriceImpactEnabled, } = p; const acceptablePriceInfo = getAcceptablePriceInfo({ @@ -533,12 +539,8 @@ function applyAcceptablePrice(p: { values.priceImpactDiffUsd = totalImpactValues.priceImpactDiffUsd; if (isTrigger) { - if (values.triggerOrderType === OrderType.StopLossDecrease) { - if (isLong) { - values.acceptablePrice = 0n; - } else { - values.acceptablePrice = MaxUint256; - } + if (!isSetAcceptablePriceImpactEnabled || values.triggerOrderType === OrderType.StopLossDecrease) { + values.acceptablePrice = isLong ? 0n : MaxUint256; } else { let maxNegativePriceImpactBps = fixedAcceptablePriceImpactBps; values.recommendedAcceptablePriceDeltaBps = getDefaultAcceptablePriceImpactBps({ diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/trade/increase.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/trade/increase.ts index 04b0301c..4de8f9f7 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/trade/increase.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/trade/increase.ts @@ -8,35 +8,35 @@ import {UserReferralInfo} from "../../types/referrals.js"; import {ExternalSwapStrategy, NoSwapStrategy} from "../../types/swapStrategy.js"; import {TokenData, TokensRatio} from "../../types/tokens.js"; import { - ExternalSwapQuote, - ExternalSwapQuoteParams, - FindSwapPath, - IncreasePositionAmounts, - NextPositionValues, - SwapOptimizationOrderArray, - TriggerThresholdType, + ExternalSwapQuote, + ExternalSwapQuoteParams, + FindSwapPath, + IncreasePositionAmounts, + NextPositionValues, + SwapOptimizationOrderArray, + TriggerThresholdType, } from "../../types/trade.js"; import {bigMath} from "../../utils/bigmath.js"; import { - capPositionImpactUsdByMaxImpactPool, - capPositionImpactUsdByMaxPriceImpactFactor, - getPositionFee, - getPriceImpactForPosition, - getTotalSwapVolumeFromSwapStats, + capPositionImpactUsdByMaxImpactPool, + capPositionImpactUsdByMaxPriceImpactFactor, + getPositionFee, + getPriceImpactForPosition, + getTotalSwapVolumeFromSwapStats, } from "../../utils/fees/index.js"; import {applyFactor} from "../../utils/numbers.js"; import { - getEntryPrice, - getLeverage, - getLiquidationPrice, - getPositionPnlUsd, - getPriceImpactDiffUsd, + getEntryPrice, + getLeverage, + getLiquidationPrice, + getPositionPnlUsd, + getPriceImpactDiffUsd, } from "../../utils/positions.js"; import { - getAcceptablePriceInfo, - getDefaultAcceptablePriceImpactBps, - getMarkPrice, - getOrderThresholdType, + getAcceptablePriceInfo, + getDefaultAcceptablePriceImpactBps, + getMarkPrice, + getOrderThresholdType, } from "../../utils/prices.js"; import {getSwapAmountsByFromValue, getSwapAmountsByToValue} from "../../utils/swap/index.js"; import {convertToTokenAmount, convertToUsd, getIsEquivalentTokens, getTokensRatioByPrice} from "../../utils/tokens.js"; @@ -63,6 +63,7 @@ type IncreasePositionParams = { marketsInfoData: MarketsInfoData | undefined; chainId: number; externalSwapQuoteParams: ExternalSwapQuoteParams | undefined; + isSetAcceptablePriceImpactEnabled: boolean; }; export function getIncreasePositionAmounts(p: IncreasePositionParams): IncreasePositionAmounts { @@ -88,6 +89,7 @@ export function getIncreasePositionAmounts(p: IncreasePositionParams): IncreaseP marketsInfoData, chainId, externalSwapQuoteParams, + isSetAcceptablePriceImpactEnabled, } = p; const swapStrategy: NoSwapStrategy = { @@ -134,6 +136,7 @@ export function getIncreasePositionAmounts(p: IncreasePositionParams): IncreaseP borrowingFeeUsd: 0n, fundingFeeUsd: 0n, positionPriceImpactDeltaUsd: 0n, + potentialPriceImpactDiffUsd: 0n, limitOrderType: limitOrderType, triggerThresholdType: undefined, @@ -395,17 +398,18 @@ export function getIncreasePositionAmounts(p: IncreasePositionParams): IncreaseP }); values.positionPriceImpactDeltaUsd = acceptablePriceInfo.priceImpactDeltaUsd; + values.potentialPriceImpactDiffUsd = getPriceImpactDiffUsd({ + totalImpactDeltaUsd: values.positionPriceImpactDeltaUsd, + marketInfo, + sizeDeltaUsd: values.sizeDeltaUsd, + }); values.acceptablePrice = acceptablePriceInfo.acceptablePrice; values.acceptablePriceDeltaBps = acceptablePriceInfo.acceptablePriceDeltaBps; if (isLimit) { - if (limitOrderType === OrderType.StopIncrease) { - if (isLong) { - values.acceptablePrice = maxUint256; - } else { - values.acceptablePrice = 0n; - } + if (!isSetAcceptablePriceImpactEnabled || limitOrderType === OrderType.StopIncrease) { + values.acceptablePrice = isLong ? maxUint256 : 0n; } else { let maxNegativePriceImpactBps = fixedAcceptablePriceImpactBps; values.recommendedAcceptablePriceDeltaBps = getDefaultAcceptablePriceImpactBps({ diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/trade/trade.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/trade/trade.ts index 21d8f71a..c46e932a 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/trade/trade.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/trade/trade.ts @@ -1,16 +1,16 @@ -import {BASIS_POINTS_DIVISOR, BASIS_POINTS_DIVISOR_BIGINT} from "../../configs/factors.js"; -import {DecreasePositionSwapType} from "../../types/orders.js"; +import { BASIS_POINTS_DIVISOR, BASIS_POINTS_DIVISOR_BIGINT } from "../../configs/factors.js"; +import { DecreasePositionSwapType } from "../../types/orders.js"; import { - DecreasePositionAmounts, - IncreasePositionAmounts, - SwapAmounts, - TradeFlags, - TradeMode, - TradeType, + DecreasePositionAmounts, + IncreasePositionAmounts, + SwapAmounts, + TradeFlags, + TradeMode, + TradeType, } from "../../types/trade.js"; -import {bigMath} from "../bigmath.js"; -import {getShouldUseMaxPrice} from "../prices.js"; +import { bigMath } from "../bigmath.js"; +import { getShouldUseMaxPrice } from "../prices.js"; export function applySlippageToPrice(allowedSlippage: number, price: bigint, isIncrease: boolean, isLong: boolean) { const shouldIncreasePrice = getShouldUseMaxPrice(isIncrease, isLong); diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/tradeHistory.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/tradeHistory.ts index 05381c7c..8c82cce3 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/tradeHistory.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/tradeHistory.ts @@ -1,15 +1,15 @@ -import {getAddress} from "viem"; +import { getAddress } from "viem"; -import type {MarketsInfoData} from "../types/markets.js"; -import type {TradeAction as SubsquidTradeAction} from "../types/subsquid.js"; -import {Token, TokensData} from "../types/tokens.js"; -import type {PositionTradeAction, SwapTradeAction} from "../types/tradeHistory.js"; -import {TradeActionType} from "../types/tradeHistory.js"; +import type { MarketsInfoData } from "../types/markets.js"; +import type { TradeAction as SubsquidTradeAction } from "../types/subsquid.js"; +import { Token, TokensData } from "../types/tokens.js"; +import type { PositionTradeAction, SwapTradeAction } from "../types/tradeHistory.js"; -import {getByKey} from "./objects.js"; -import {isIncreaseOrderType, isSwapOrderType} from "./orders.js"; -import {getSwapPathOutputAddresses} from "./swap/swapStats.js"; -import {parseContractPrice} from "./tokens.js"; +import { getByKey } from "./objects.js"; +import { isIncreaseOrderType, isSwapOrderType } from "../utils/orders.js"; +import { getSwapPathOutputAddresses } from "./swap/swapStats.js"; +import { parseContractPrice } from "./tokens.js"; +import { TradeActionType } from "../types/tradeHistory.js"; export function createRawTradeActionTransformer( marketsInfoData: MarketsInfoData, @@ -44,6 +44,7 @@ export function createRawTradeActionTransformer( } const tradeAction: SwapTradeAction = { + type: "swap", id: rawAction.id, srcChainId: rawAction.srcChainId ? Number(rawAction.srcChainId) : undefined, eventName: rawAction.eventName as TradeActionType, @@ -94,6 +95,7 @@ export function createRawTradeActionTransformer( } const tradeAction: PositionTradeAction = { + type: "position", id: rawAction.id, eventName: rawAction.eventName as TradeActionType, account: rawAction.account, @@ -107,6 +109,7 @@ export function createRawTradeActionTransformer( targetCollateralToken, initialCollateralDeltaAmount: bigNumberify(rawAction.initialCollateralDeltaAmount)!, sizeDeltaUsd: bigNumberify(rawAction.sizeDeltaUsd)!, + sizeDeltaInTokens: rawAction.sizeDeltaInTokens ? bigNumberify(rawAction.sizeDeltaInTokens) : undefined, triggerPrice: rawAction.triggerPrice ? parseContractPrice(bigNumberify(rawAction.triggerPrice)!, indexToken.decimals) : undefined, diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/twap/index.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/twap/index.ts new file mode 100644 index 00000000..5958f287 --- /dev/null +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/twap/index.ts @@ -0,0 +1,78 @@ +import { DEFAULT_TWAP_NUMBER_OF_PARTS, MAX_TWAP_NUMBER_OF_PARTS, MIN_TWAP_NUMBER_OF_PARTS } from "../../configs/twap.js"; +import { OrderType } from "../../types/orders.js"; +import { TwapDuration } from "../../types/twap.js"; +import { isSwapOrderType } from "../orders.js"; + +export function getIsValidTwapParams(duration: TwapDuration, numberOfParts: number) { + return ( + duration.hours >= 0 && + duration.minutes >= 0 && + numberOfParts >= MIN_TWAP_NUMBER_OF_PARTS && + numberOfParts <= MAX_TWAP_NUMBER_OF_PARTS + ); +} + +export function getTwapDurationInSeconds(duration: TwapDuration) { + return duration.hours * 60 * 60 + duration.minutes * 60; +} + +export function getTwapValidFromTime(duration: TwapDuration, numberOfParts: number, partIndex: number) { + const durationMinutes = duration.hours * 60 + duration.minutes; + const durationMs = durationMinutes * 60; + const startTime = Math.ceil(Date.now() / 1000); + + return BigInt(Math.floor(startTime + (durationMs / (numberOfParts - 1)) * partIndex)); +} + +export function changeTwapNumberOfPartsValue(value: number) { + if (value < MIN_TWAP_NUMBER_OF_PARTS) { + return MIN_TWAP_NUMBER_OF_PARTS; + } + + if (value > MAX_TWAP_NUMBER_OF_PARTS) { + return MAX_TWAP_NUMBER_OF_PARTS; + } + + if (isNaN(value)) { + return DEFAULT_TWAP_NUMBER_OF_PARTS; + } + + return value; +} + +export function getTwapOrderKey({ + twapId, + orderType, + pool, + isLong, + collateralTokenSymbol, + swapPath, + account, + initialCollateralToken, +}: { + twapId: string; + orderType: OrderType; + pool: string; + collateralTokenSymbol: string; + initialCollateralToken: string; + isLong: boolean; + swapPath: string[]; + account: string; +}) { + if (isSwapOrderType(orderType)) { + return `${twapId}-${swapPath.join("-")}-${account}-${initialCollateralToken}`; + } + + const type = isLong ? "long" : "short"; + return `${twapId}-${type}-${pool}-${collateralTokenSymbol}`; +} + +export function makeTwapValidFromTimeGetter(duration: TwapDuration, numberOfParts: number) { + const durationMinutes = duration.hours * 60 + duration.minutes; + const durationMs = durationMinutes * 60; + const startTime = Math.ceil(Date.now() / 1000); + + return (part: number) => { + return BigInt(Math.floor(startTime + (durationMs / (numberOfParts - 1)) * part)); + }; +} diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/twap/uiFeeReceiver.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/twap/uiFeeReceiver.ts new file mode 100644 index 00000000..1564242d --- /dev/null +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/twap/uiFeeReceiver.ts @@ -0,0 +1,58 @@ +import { isAddress } from "viem"; + +const VERSION = "01"; +const PREFIX = "0xff0000"; + +/** + * Ui fee receiver structure: + * 0-3 (4) bytes (0-7 chars) - PREFIX + * 4-15 (12) bytes (8-32 chars) - 12 bytes buffer + * 16 (1) byte (33-34 chars) - isExpress flag + * 17 (1) byte (35-36 chars) - numberOfParts (hex encoded) + * 18-19 (2) bytes (37-40 chars) - twapId + * 20 (1) byte (41-42 chars) - VERSION + * + * Total: 0x + 20 bytes (41 hex characters) + */ +export function generateTwapId() { + return Math.floor(Math.random() * 256 * 256) + .toString(16) + .padStart(4, "0"); +} + +export function createTwapUiFeeReceiver({ numberOfParts }: { numberOfParts: number }) { + const twapId = generateTwapId(); + + const numberOfPartsInHex = numberOfParts.toString(16).padStart(2, "0"); + + const buffer = "00".repeat(12); + const isExpressHex = "00"; + + return `${PREFIX}${buffer}${isExpressHex}${numberOfPartsInHex}${twapId}${VERSION}`; +} + +export function decodeTwapUiFeeReceiver( + address: string +): { twapId: string; numberOfParts: number; isExpress: boolean } | void { + const byteString = address.slice(2); + const twapId = byteString.slice(34, 38); + const isExpress = byteString.slice(30, 32) === "01"; + + if (!isValidTwapUiFeeReceiver(address) || twapId === "0000") { + return; + } + + const numberOfParts = parseInt(byteString.slice(32, 34), 16); + + return { twapId, numberOfParts, isExpress }; +} + +export function isValidTwapUiFeeReceiver(address: string) { + return isAddress(address) && address.toLowerCase().startsWith(PREFIX.toLowerCase()); +} + +export function setUiFeeReceiverIsExpress(uiFeeReceiver: string, isExpress: boolean): string { + const isExpressInHex = isExpress ? "01" : "00"; + + return `${uiFeeReceiver.slice(0, 16 * 2)}${isExpressInHex}${uiFeeReceiver.slice(17 * 2)}`; +} diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/types.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/types.ts new file mode 100644 index 00000000..b2a53307 --- /dev/null +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/types.ts @@ -0,0 +1,14 @@ +export const mustNeverExist = (x: never): never => { + throw new Error(`Must never exist: ${x}`); +}; + +export const assertDefined = (x: T | undefined): T => { + if (x === undefined) throw new Error(`Expected defined value, got undefined`); + return x; +}; + +export type DeepPartial = T extends object + ? { + [P in keyof T]?: DeepPartial; + } + : T; diff --git a/src/Managing.Web3Proxy/src/plugins/custom/gmx.ts b/src/Managing.Web3Proxy/src/plugins/custom/gmx.ts index 112408f1..0b62b334 100644 --- a/src/Managing.Web3Proxy/src/plugins/custom/gmx.ts +++ b/src/Managing.Web3Proxy/src/plugins/custom/gmx.ts @@ -23,8 +23,8 @@ import { import {DecreasePositionSwapType, OrderType, PositionOrderInfo} from '../../generated/gmxsdk/types/orders.js'; import {DecreasePositionAmounts} from '../../generated/gmxsdk/types/trade.js'; import {decodeReferralCode, encodeReferralCode} from '../../generated/gmxsdk/utils/referrals.js'; -import {formatUsd} from '../../generated/gmxsdk/utils/numbers/formatting.js'; -import {calculateDisplayDecimals} from '../../generated/gmxsdk/utils/numbers/index.js'; +import {formatUsd} from '../../generated/gmxsdk/utils/numbers.js'; +import {calculateDisplayDecimals} from '../../generated/gmxsdk/utils/numbers.js'; import {handleError} from '../../utils/errorHandler.js'; import {Abi, formatEther, parseEther, zeroHash} from 'viem'; import {CLAIMABLE_FUNDING_AMOUNT} from '../../generated/gmxsdk/configs/dataStore.js'; @@ -2820,7 +2820,6 @@ export const swapGmxTokensImpl = async ( executionFee: 100000000000000000n, // 0.1 ETH as execution fee allowedSlippage: allowedSlippageBps, tokensData: tokensData, - skipSimulation: true, }); console.log('✅ Direct createSwapOrderTxn successful!'); } diff --git a/src/Managing.Web3Proxy/src/plugins/custom/privy.ts b/src/Managing.Web3Proxy/src/plugins/custom/privy.ts index 38784d59..0fa098eb 100644 --- a/src/Managing.Web3Proxy/src/plugins/custom/privy.ts +++ b/src/Managing.Web3Proxy/src/plugins/custom/privy.ts @@ -7,14 +7,14 @@ import {PrivyClient} from '@privy-io/server-auth' import {ethers} from 'ethers' import dotenv from 'dotenv' import fs from 'fs' -import Token from '../../generated/gmxsdk/abis/Token.json' with {type: 'json'} import {ARBITRUM} from '../../generated/gmxsdk/configs/chains.js' import {TOKENS} from '../../generated/gmxsdk/configs/tokens.js' import {CONTRACTS} from '../../generated/gmxsdk/configs/contracts.js' import {getClientForAddress, getTokenDataFromTicker} from './gmx.js' -import {Address} from 'viem' +import {Address, erc20Abi} from 'viem' import {Balance, Chain, Ticker} from '../../generated/ManagingApiTypes.js' import {getCachedPrivySecrets} from './privy-secrets.js' +import Token from '../../generated/gmxsdk/abis/Token.js' // Load environment variables in non-production only if (process.env.NODE_ENV !== 'production') dotenv.config() @@ -335,7 +335,7 @@ export const approveTokenImpl = async ( const tokenData = GetToken(ticker); // Create contract interface for ERC20 token - const contractInterface = new ethers.Interface(Token.abi); + const contractInterface = new ethers.Interface(erc20Abi); // Max uint256 value for unlimited approval const approveAmount = amount ? @@ -487,7 +487,7 @@ export const approveContractImpl = async ( ): Promise => { try { // Create contract interface for ERC20 token - const contractInterface = new ethers.Interface(Token.abi); + const contractInterface = new ethers.Interface(erc20Abi); // Max uint256 value for unlimited approval const approveAmount = amount ?? ethers.MaxUint256; @@ -964,7 +964,7 @@ export const sendTokenImpl = async ( console.log('Token approval completed'); } // Create contract interface for ERC20 token - const contractInterface = new ethers.Interface(Token.abi); + const contractInterface = new ethers.Interface(erc20Abi); // Amount is already in the smallest units (wei), so we don't need to convert it const transferAmount = amountBigInt; // Encode the transfer function call diff --git a/src/Managing.WebApp/bun.lock b/src/Managing.WebApp/bun.lock index 25036b3d..2f194c1e 100644 --- a/src/Managing.WebApp/bun.lock +++ b/src/Managing.WebApp/bun.lock @@ -5,6 +5,7 @@ "": { "name": "managing", "dependencies": { + "@gelatonetwork/relay-sdk": "^5.6.0", "@gmx-io/sdk": "^1.3.1", "@heroicons/react": "^1.0.6", "@microsoft/signalr": "^6.0.5", @@ -24,6 +25,7 @@ "canonicalize": "^2.0.0", "classnames": "^2.3.1", "connectkit": "^1.8.2", + "crypto-js": "^4.2.0", "date-fns": "^2.30.0", "elliptic": "^6.6.1", "genetic-js": "^0.1.14", @@ -79,7 +81,7 @@ }, }, "packages": { - "@adraffy/ens-normalize": ["@adraffy/ens-normalize@1.11.1", "", {}, "sha512-nhCBV3quEgesuf7c7KYfperqSS14T8bYuvJ8PcLJp6znkZpFc0AuW4qBtr8eKVyPPe/8RSr7sglCWPU5eaxwKQ=="], + "@adraffy/ens-normalize": ["@adraffy/ens-normalize@1.9.2", "", {}, "sha512-0h+FrQDqe2Wn+IIGFkTCd4aAwTJ+7834Ek1COohCyV26AXhwQ7WQaz+4F/nLOeVl/3BtWHOHLPsq46V8YB46Eg=="], "@babel/code-frame": ["@babel/code-frame@7.27.1", "", { "dependencies": { "@babel/helper-validator-identifier": "^7.27.1", "js-tokens": "^4.0.0", "picocolors": "^1.1.1" } }, "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg=="], @@ -2463,7 +2465,7 @@ "sonic-boom": ["sonic-boom@3.8.1", "", { "dependencies": { "atomic-sleep": "^1.0.0" } }, "sha512-y4Z8LCDBuum+PBP3lSV7RHrXscqksve/bi0as7mhwVnBW+/wUqKT/2Kb7um8yqcFy0duYbbPxzt89Zy2nOCaxg=="], - "source-map": ["source-map@0.5.7", "", {}, "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ=="], + "source-map": ["source-map@0.6.1", "", {}, "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="], "source-map-js": ["source-map-js@1.2.1", "", {}, "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA=="], @@ -2737,7 +2739,7 @@ "write-file-atomic": ["write-file-atomic@4.0.2", "", { "dependencies": { "imurmurhash": "^0.1.4", "signal-exit": "^3.0.7" } }, "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg=="], - "ws": ["ws@7.5.10", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": "^5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ=="], + "ws": ["ws@8.18.3", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg=="], "xmlhttprequest-ssl": ["xmlhttprequest-ssl@2.1.2", "", {}, "sha512-TEU+nJVUUnA4CYJFLvK5X9AOeH4KvDvhIfm0vV1GaQRtchnG0hgK5p8hw/xjv8cunWYCsiPCSDzObPyhEwq3KQ=="], @@ -2789,8 +2791,6 @@ "@gelatonetwork/relay-sdk/axios": ["axios@0.29.0", "", { "dependencies": { "follow-redirects": "^1.15.4", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" } }, "sha512-Kjsq1xisgO5DjjNQwZFsy0gpcU1P2j36dZeQDXVhpIU26GVgkDUnROaHLSuluhMqtDE7aKA2hbKXG5yu5DN8Tg=="], - "@gelatonetwork/relay-sdk/ws": ["ws@8.18.3", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg=="], - "@gmx-io/sdk/typescript": ["typescript@5.4.2", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ=="], "@headlessui/react/use-sync-external-store": ["use-sync-external-store@1.6.0", "", { "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-Pp6GSwGP/NrPIrxVFAIkOQeyw8lFenOHijQWkUTrDvrF4ALqylP2C/KCkeS9dpUM3KvYRQhna5vt7IL95+ZQ9w=="], @@ -2867,6 +2867,8 @@ "@metamask/utils/superstruct": ["superstruct@1.0.4", "", {}, "sha512-7JpaAoX2NGyoFlI9NBh66BQXGONc+uE+MRS5i2iOBKuS4e+ccgMDjATgZldkah+33DakBxDHiss9kvUcGAO8UQ=="], + "@microsoft/signalr/ws": ["ws@7.5.10", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": "^5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ=="], + "@motionone/animation/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="], "@motionone/dom/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="], @@ -2885,6 +2887,8 @@ "@react-native/codegen/yargs": ["yargs@17.7.2", "", { "dependencies": { "cliui": "^8.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", "string-width": "^4.2.3", "y18n": "^5.0.5", "yargs-parser": "^21.1.1" } }, "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w=="], + "@react-native/dev-middleware/ws": ["ws@7.5.10", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": "^5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ=="], + "@reown/appkit/@walletconnect/universal-provider": ["@walletconnect/universal-provider@2.23.0", "", { "dependencies": { "@walletconnect/events": "1.0.1", "@walletconnect/jsonrpc-http-connection": "1.0.8", "@walletconnect/jsonrpc-provider": "1.0.14", "@walletconnect/jsonrpc-types": "1.0.4", "@walletconnect/jsonrpc-utils": "1.0.8", "@walletconnect/keyvaluestorage": "1.1.1", "@walletconnect/logger": "3.0.0", "@walletconnect/sign-client": "2.23.0", "@walletconnect/types": "2.23.0", "@walletconnect/utils": "2.23.0", "es-toolkit": "1.39.3", "events": "3.3.0" } }, "sha512-3ZEqAsbtCbk+CV0ZLpy7Qzc04KXEnrW4zCboZ+gkkC0ey4H62x9h23kBOIrU9qew6orjA7D5gg0ikRC2Up1lbw=="], "@reown/appkit/bs58": ["bs58@6.0.0", "", { "dependencies": { "base-x": "^5.0.0" } }, "sha512-PD0wEnEYg6ijszw/u8s+iI3H17cTymlrwkKhDhPZq+Sokl3AU4htyBFTjAeNAlCCmg0f53g6ih3jATyCKftTfw=="], @@ -2923,8 +2927,6 @@ "@solana/options/@solana/codecs-numbers": ["@solana/codecs-numbers@3.0.3", "", { "dependencies": { "@solana/codecs-core": "3.0.3", "@solana/errors": "3.0.3" }, "peerDependencies": { "typescript": ">=5.3.3" } }, "sha512-pfXkH9J0glrM8qj6389GAn30+cJOxzXLR2FsPOHCUMXrqLhGjMMZAWhsQkpOQ37SGc/7EiQsT/gmyGC7gxHqJQ=="], - "@solana/rpc-subscriptions-channel-websocket/ws": ["ws@8.18.3", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg=="], - "@solana/rpc-types/@solana/codecs-numbers": ["@solana/codecs-numbers@3.0.3", "", { "dependencies": { "@solana/codecs-core": "3.0.3", "@solana/errors": "3.0.3" }, "peerDependencies": { "typescript": ">=5.3.3" } }, "sha512-pfXkH9J0glrM8qj6389GAn30+cJOxzXLR2FsPOHCUMXrqLhGjMMZAWhsQkpOQ37SGc/7EiQsT/gmyGC7gxHqJQ=="], "@solana/transaction-messages/@solana/codecs-numbers": ["@solana/codecs-numbers@3.0.3", "", { "dependencies": { "@solana/codecs-core": "3.0.3", "@solana/errors": "3.0.3" }, "peerDependencies": { "typescript": ">=5.3.3" } }, "sha512-pfXkH9J0glrM8qj6389GAn30+cJOxzXLR2FsPOHCUMXrqLhGjMMZAWhsQkpOQ37SGc/7EiQsT/gmyGC7gxHqJQ=="], @@ -2983,6 +2985,8 @@ "@walletconnect/jsonrpc-http-connection/cross-fetch": ["cross-fetch@3.2.0", "", { "dependencies": { "node-fetch": "^2.7.0" } }, "sha512-Q+xVJLoGOeIMXZmbUK4HYk+69cQH6LudR0Vu/pRm2YlU/hDV9CiS0gKUMaWY5f2NeUH9C1nV3bsTlCo0FsTV1Q=="], + "@walletconnect/jsonrpc-ws-connection/ws": ["ws@7.5.10", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": "^5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ=="], + "@walletconnect/keyvaluestorage/idb-keyval": ["idb-keyval@6.2.2", "", {}, "sha512-yjD9nARJ/jb1g+CvD0tlhUHOrJ9Sy0P8T9MF3YaLlHnSRpwPfpTX0XIvpmw3gAJUmEu3FiICLBDPXVwyEvrleg=="], "@walletconnect/relay-auth/@noble/curves": ["@noble/curves@1.8.0", "", { "dependencies": { "@noble/hashes": "1.7.0" } }, "sha512-j84kjAbzEnQHaSIhRPUmB3/eVXu2k3dKPl2LOrR8fSOIL+89U+7lV117EWHtq/GHM3ReGHM46iRBdZfpc4HRUQ=="], @@ -3041,8 +3045,6 @@ "escodegen/estraverse": ["estraverse@5.3.0", "", {}, "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA=="], - "escodegen/source-map": ["source-map@0.6.1", "", {}, "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="], - "eslint/eslint-scope": ["eslint-scope@7.2.2", "", { "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^5.2.0" } }, "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg=="], "esquery/estraverse": ["estraverse@5.3.0", "", {}, "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA=="], @@ -3059,8 +3061,6 @@ "ethereum-cryptography/@scure/bip39": ["@scure/bip39@1.3.0", "", { "dependencies": { "@noble/hashes": "~1.4.0", "@scure/base": "~1.1.6" } }, "sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ=="], - "ethers/@adraffy/ens-normalize": ["@adraffy/ens-normalize@1.9.2", "", {}, "sha512-0h+FrQDqe2Wn+IIGFkTCd4aAwTJ+7834Ek1COohCyV26AXhwQ7WQaz+4F/nLOeVl/3BtWHOHLPsq46V8YB46Eg=="], - "ethers/@noble/hashes": ["@noble/hashes@1.1.2", "", {}, "sha512-KYRCASVTv6aeUi1tsF8/vpyR7zpfs3FUzy2Jqm+MU+LmUKhQ0y2FpfwqkCcxSg2ua4GALJd8k2R76WxwZGbQpA=="], "ethers/@types/node": ["@types/node@18.15.13", "", {}, "sha512-N+0kuo9KgrUQ1Sn/ifDXsvg0TTleP7rIy4zOBGECxAljqvqfqpTfzx0Q1NUedOixRMBfe2Whhb056a42cWs26Q=="], @@ -3113,6 +3113,8 @@ "jayson/uuid": ["uuid@8.3.2", "", { "bin": { "uuid": "dist/bin/uuid" } }, "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg=="], + "jayson/ws": ["ws@7.5.10", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": "^5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ=="], + "jest-environment-node/@jest/types": ["@jest/types@29.6.3", "", { "dependencies": { "@jest/schemas": "^29.6.3", "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^3.0.0", "@types/node": "*", "@types/yargs": "^17.0.8", "chalk": "^4.0.0" } }, "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw=="], "jest-environment-node/jest-mock": ["jest-mock@29.7.0", "", { "dependencies": { "@jest/types": "^29.6.3", "@types/node": "*", "jest-util": "^29.7.0" } }, "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw=="], @@ -3163,10 +3165,18 @@ "metro/jest-worker": ["jest-worker@29.7.0", "", { "dependencies": { "@types/node": "*", "jest-util": "^29.7.0", "merge-stream": "^2.0.0", "supports-color": "^8.0.0" } }, "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw=="], + "metro/source-map": ["source-map@0.5.7", "", {}, "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ=="], + + "metro/ws": ["ws@7.5.10", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": "^5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ=="], + "metro/yargs": ["yargs@17.7.2", "", { "dependencies": { "cliui": "^8.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", "string-width": "^4.2.3", "y18n": "^5.0.5", "yargs-parser": "^21.1.1" } }, "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w=="], "metro-file-map/jest-worker": ["jest-worker@29.7.0", "", { "dependencies": { "@types/node": "*", "jest-util": "^29.7.0", "merge-stream": "^2.0.0", "supports-color": "^8.0.0" } }, "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw=="], + "metro-source-map/source-map": ["source-map@0.5.7", "", {}, "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ=="], + + "metro-symbolicate/source-map": ["source-map@0.5.7", "", {}, "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ=="], + "micromatch/picomatch": ["picomatch@2.3.1", "", {}, "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA=="], "needle/debug": ["debug@3.2.7", "", { "dependencies": { "ms": "^2.1.1" } }, "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ=="], @@ -3175,6 +3185,8 @@ "obj-multiplex/readable-stream": ["readable-stream@2.3.8", "", { "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", "isarray": "~1.0.0", "process-nextick-args": "~2.0.0", "safe-buffer": "~5.1.1", "string_decoder": "~1.1.1", "util-deprecate": "~1.0.1" } }, "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA=="], + "ox/@adraffy/ens-normalize": ["@adraffy/ens-normalize@1.11.1", "", {}, "sha512-nhCBV3quEgesuf7c7KYfperqSS14T8bYuvJ8PcLJp6znkZpFc0AuW4qBtr8eKVyPPe/8RSr7sglCWPU5eaxwKQ=="], + "pino/pino-abstract-transport": ["pino-abstract-transport@2.0.0", "", { "dependencies": { "split2": "^4.0.0" } }, "sha512-F63x5tizV6WCh4R6RHyi2Ml+M70DNRXt/+HANowMflpgGFMAym/VKm6G7ZOQRjqN7XbGxK1Lg9t6ZrtzOaivMw=="], "pino/sonic-boom": ["sonic-boom@4.2.0", "", { "dependencies": { "atomic-sleep": "^1.0.0" } }, "sha512-INb7TM37/mAcsGmc9hyyI6+QR3rR1zVRu36B0NeGXKnOOLiZOfER5SA+N7X7k3yUYRzLWafduTDvJAfDswwEww=="], @@ -3199,6 +3211,8 @@ "rc/strip-json-comments": ["strip-json-comments@2.0.1", "", {}, "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ=="], + "react-devtools-core/ws": ["ws@7.5.10", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": "^5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ=="], + "react-native/commander": ["commander@12.1.0", "", {}, "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA=="], "react-native/pretty-format": ["pretty-format@29.7.0", "", { "dependencies": { "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", "react-is": "^18.0.0" } }, "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ=="], @@ -3207,14 +3221,14 @@ "react-native/scheduler": ["scheduler@0.27.0", "", {}, "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q=="], + "react-native/ws": ["ws@7.5.10", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": "^5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ=="], + "react-native/yargs": ["yargs@17.7.2", "", { "dependencies": { "cliui": "^8.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", "string-width": "^4.2.3", "y18n": "^5.0.5", "yargs-parser": "^21.1.1" } }, "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w=="], "react-toastify/clsx": ["clsx@1.2.1", "", {}, "sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg=="], "rpc-websockets/uuid": ["uuid@8.3.2", "", { "bin": { "uuid": "dist/bin/uuid" } }, "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg=="], - "rpc-websockets/ws": ["ws@8.18.3", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg=="], - "schema-utils/ajv": ["ajv@8.17.1", "", { "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", "json-schema-traverse": "^1.0.0", "require-from-string": "^2.0.2" } }, "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g=="], "send/debug": ["debug@2.6.9", "", { "dependencies": { "ms": "2.0.0" } }, "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA=="], @@ -3229,8 +3243,6 @@ "socket.io-parser/debug": ["debug@4.3.4", "", { "dependencies": { "ms": "2.1.2" } }, "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ=="], - "source-map-support/source-map": ["source-map@0.6.1", "", {}, "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="], - "stack-utils/escape-string-regexp": ["escape-string-regexp@2.0.0", "", {}, "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w=="], "stacktrace-parser/type-fest": ["type-fest@0.7.1", "", {}, "sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg=="], @@ -3259,22 +3271,22 @@ "unstorage/lru-cache": ["lru-cache@10.4.3", "", {}, "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ=="], - "viem/ws": ["ws@8.18.3", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg=="], - "wagmi/@wagmi/connectors": ["@wagmi/connectors@6.2.0", "", { "dependencies": { "@base-org/account": "2.4.0", "@coinbase/wallet-sdk": "4.3.6", "@gemini-wallet/core": "0.3.2", "@metamask/sdk": "0.33.1", "@safe-global/safe-apps-provider": "0.18.6", "@safe-global/safe-apps-sdk": "9.1.0", "@walletconnect/ethereum-provider": "2.21.1", "cbw-sdk": "npm:@coinbase/wallet-sdk@3.9.3", "porto": "0.2.35" }, "peerDependencies": { "@wagmi/core": "2.22.1", "typescript": ">=5.0.4", "viem": "2.x" }, "optionalPeers": ["typescript"] }, "sha512-2NfkbqhNWdjfibb4abRMrn7u6rPjEGolMfApXss6HCDVt9AW2oVC6k8Q5FouzpJezElxLJSagWz9FW1zaRlanA=="], "web3-eth-abi/abitype": ["abitype@0.7.1", "", { "peerDependencies": { "typescript": ">=4.9.4", "zod": "^3 >=3.19.1" }, "optionalPeers": ["zod"] }, "sha512-VBkRHTDZf9Myaek/dO3yMmOzB/y2s3Zo6nVU7yaw1G+TvCHAjwaJzNGN9yo4K5D8bU/VZXKP1EJpRhFr862PlQ=="], "web3-eth-contract/@ethereumjs/rlp": ["@ethereumjs/rlp@5.0.2", "", { "bin": { "rlp": "bin/rlp.cjs" } }, "sha512-DziebCdg4JpGlEqEdGgXmjqcFoJi+JGulUXwEjsZGAscAQ7MyD/7LE/GVCP29vEQxKc7AAwjT3A2ywHp2xfoCA=="], - "web3-providers-http/cross-fetch": ["cross-fetch@4.1.0", "", { "dependencies": { "node-fetch": "^2.7.0" } }, "sha512-uKm5PU+MHTootlWEY+mZ4vvXoCn4fLQxT9dSc1sXVMSFkINTJVN8cAQROpwcKm8bJ/c7rgZVIBWzH5T78sNZZw=="], + "web3-eth-ens/@adraffy/ens-normalize": ["@adraffy/ens-normalize@1.11.1", "", {}, "sha512-nhCBV3quEgesuf7c7KYfperqSS14T8bYuvJ8PcLJp6znkZpFc0AuW4qBtr8eKVyPPe/8RSr7sglCWPU5eaxwKQ=="], - "web3-providers-ws/ws": ["ws@8.18.3", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg=="], + "web3-providers-http/cross-fetch": ["cross-fetch@4.1.0", "", { "dependencies": { "node-fetch": "^2.7.0" } }, "sha512-uKm5PU+MHTootlWEY+mZ4vvXoCn4fLQxT9dSc1sXVMSFkINTJVN8cAQROpwcKm8bJ/c7rgZVIBWzH5T78sNZZw=="], "yargs/find-up": ["find-up@4.1.0", "", { "dependencies": { "locate-path": "^5.0.0", "path-exists": "^4.0.0" } }, "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw=="], "zustand/use-sync-external-store": ["use-sync-external-store@1.6.0", "", { "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-Pp6GSwGP/NrPIrxVFAIkOQeyw8lFenOHijQWkUTrDvrF4ALqylP2C/KCkeS9dpUM3KvYRQhna5vt7IL95+ZQ9w=="], + "@base-org/account/ox/@adraffy/ens-normalize": ["@adraffy/ens-normalize@1.11.1", "", {}, "sha512-nhCBV3quEgesuf7c7KYfperqSS14T8bYuvJ8PcLJp6znkZpFc0AuW4qBtr8eKVyPPe/8RSr7sglCWPU5eaxwKQ=="], + "@base-org/account/ox/@noble/curves": ["@noble/curves@1.9.7", "", { "dependencies": { "@noble/hashes": "1.8.0" } }, "sha512-gbKGcRUYIjA3/zCCNaWDciTMFI0dCkvou3TL8Zmy5Nc7sJ47a0jtOeZoTaMxkuqRo9cRhjOdZJXegxYE5FN/xw=="], "@base-org/account/ox/@noble/hashes": ["@noble/hashes@1.8.0", "", {}, "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A=="], @@ -3421,6 +3433,8 @@ "@walletconnect/utils/bs58/base-x": ["base-x@5.0.1", "", {}, "sha512-M7uio8Zt++eg3jPj+rHMfCC+IuygQHHCOU+IYsVtik6FWjuYpVt/+MRKcgsAMHh8mMFAwnB+Bs+mTrFiXjMzKg=="], + "@walletconnect/utils/ox/@adraffy/ens-normalize": ["@adraffy/ens-normalize@1.11.1", "", {}, "sha512-nhCBV3quEgesuf7c7KYfperqSS14T8bYuvJ8PcLJp6znkZpFc0AuW4qBtr8eKVyPPe/8RSr7sglCWPU5eaxwKQ=="], + "@walletconnect/utils/ox/@noble/curves": ["@noble/curves@1.9.1", "", { "dependencies": { "@noble/hashes": "1.8.0" } }, "sha512-k11yZxZg+t+gWvBbIswW0yoJlu8cHOC7dhunwOzoWH/mXGBiYyR4YY6hAEK/3EUs4UpB8la1RfdRpeGsFHkWsA=="], "ajv-formats/ajv/json-schema-traverse": ["json-schema-traverse@1.0.0", "", {}, "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug=="], @@ -3577,6 +3591,8 @@ "@reown/appkit-controllers/@walletconnect/universal-provider/@walletconnect/utils/ox": ["ox@0.9.3", "", { "dependencies": { "@adraffy/ens-normalize": "^1.11.0", "@noble/ciphers": "^1.3.0", "@noble/curves": "1.9.1", "@noble/hashes": "^1.8.0", "@scure/bip32": "^1.7.0", "@scure/bip39": "^1.6.0", "abitype": "^1.0.9", "eventemitter3": "5.0.1" }, "peerDependencies": { "typescript": ">=5.4.0" }, "optionalPeers": ["typescript"] }, "sha512-KzyJP+fPV4uhuuqrTZyok4DC7vFzi7HLUFiUNEmpbyh59htKWkOC98IONC1zgXJPbHAhQgqs6B0Z6StCGhmQvg=="], + "@reown/appkit-utils/@base-org/account/ox/@adraffy/ens-normalize": ["@adraffy/ens-normalize@1.11.1", "", {}, "sha512-nhCBV3quEgesuf7c7KYfperqSS14T8bYuvJ8PcLJp6znkZpFc0AuW4qBtr8eKVyPPe/8RSr7sglCWPU5eaxwKQ=="], + "@reown/appkit-utils/@base-org/account/ox/@noble/curves": ["@noble/curves@1.9.7", "", { "dependencies": { "@noble/hashes": "1.8.0" } }, "sha512-gbKGcRUYIjA3/zCCNaWDciTMFI0dCkvou3TL8Zmy5Nc7sJ47a0jtOeZoTaMxkuqRo9cRhjOdZJXegxYE5FN/xw=="], "@reown/appkit-utils/@base-org/account/ox/@noble/hashes": ["@noble/hashes@1.8.0", "", {}, "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A=="], @@ -3595,6 +3611,8 @@ "@reown/appkit/@walletconnect/universal-provider/@walletconnect/utils/ox": ["ox@0.9.3", "", { "dependencies": { "@adraffy/ens-normalize": "^1.11.0", "@noble/ciphers": "^1.3.0", "@noble/curves": "1.9.1", "@noble/hashes": "^1.8.0", "@scure/bip32": "^1.7.0", "@scure/bip39": "^1.6.0", "abitype": "^1.0.9", "eventemitter3": "5.0.1" }, "peerDependencies": { "typescript": ">=5.4.0" }, "optionalPeers": ["typescript"] }, "sha512-KzyJP+fPV4uhuuqrTZyok4DC7vFzi7HLUFiUNEmpbyh59htKWkOC98IONC1zgXJPbHAhQgqs6B0Z6StCGhmQvg=="], + "@wagmi/connectors/@coinbase/wallet-sdk/ox/@adraffy/ens-normalize": ["@adraffy/ens-normalize@1.11.1", "", {}, "sha512-nhCBV3quEgesuf7c7KYfperqSS14T8bYuvJ8PcLJp6znkZpFc0AuW4qBtr8eKVyPPe/8RSr7sglCWPU5eaxwKQ=="], + "@wagmi/connectors/@coinbase/wallet-sdk/ox/@noble/curves": ["@noble/curves@1.9.7", "", { "dependencies": { "@noble/hashes": "1.8.0" } }, "sha512-gbKGcRUYIjA3/zCCNaWDciTMFI0dCkvou3TL8Zmy5Nc7sJ47a0jtOeZoTaMxkuqRo9cRhjOdZJXegxYE5FN/xw=="], "@wagmi/connectors/@coinbase/wallet-sdk/ox/@noble/hashes": ["@noble/hashes@1.8.0", "", {}, "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A=="], @@ -3761,12 +3779,18 @@ "@reown/appkit-controllers/@walletconnect/universal-provider/@walletconnect/utils/bs58/base-x": ["base-x@5.0.1", "", {}, "sha512-M7uio8Zt++eg3jPj+rHMfCC+IuygQHHCOU+IYsVtik6FWjuYpVt/+MRKcgsAMHh8mMFAwnB+Bs+mTrFiXjMzKg=="], + "@reown/appkit-controllers/@walletconnect/universal-provider/@walletconnect/utils/ox/@adraffy/ens-normalize": ["@adraffy/ens-normalize@1.11.1", "", {}, "sha512-nhCBV3quEgesuf7c7KYfperqSS14T8bYuvJ8PcLJp6znkZpFc0AuW4qBtr8eKVyPPe/8RSr7sglCWPU5eaxwKQ=="], + "@reown/appkit-controllers/@walletconnect/universal-provider/@walletconnect/utils/ox/@noble/curves": ["@noble/curves@1.9.1", "", { "dependencies": { "@noble/hashes": "1.8.0" } }, "sha512-k11yZxZg+t+gWvBbIswW0yoJlu8cHOC7dhunwOzoWH/mXGBiYyR4YY6hAEK/3EUs4UpB8la1RfdRpeGsFHkWsA=="], "@reown/appkit-utils/@walletconnect/universal-provider/@walletconnect/utils/bs58/base-x": ["base-x@5.0.1", "", {}, "sha512-M7uio8Zt++eg3jPj+rHMfCC+IuygQHHCOU+IYsVtik6FWjuYpVt/+MRKcgsAMHh8mMFAwnB+Bs+mTrFiXjMzKg=="], + "@reown/appkit-utils/@walletconnect/universal-provider/@walletconnect/utils/ox/@adraffy/ens-normalize": ["@adraffy/ens-normalize@1.11.1", "", {}, "sha512-nhCBV3quEgesuf7c7KYfperqSS14T8bYuvJ8PcLJp6znkZpFc0AuW4qBtr8eKVyPPe/8RSr7sglCWPU5eaxwKQ=="], + "@reown/appkit-utils/@walletconnect/universal-provider/@walletconnect/utils/ox/@noble/curves": ["@noble/curves@1.9.1", "", { "dependencies": { "@noble/hashes": "1.8.0" } }, "sha512-k11yZxZg+t+gWvBbIswW0yoJlu8cHOC7dhunwOzoWH/mXGBiYyR4YY6hAEK/3EUs4UpB8la1RfdRpeGsFHkWsA=="], + "@reown/appkit/@walletconnect/universal-provider/@walletconnect/utils/ox/@adraffy/ens-normalize": ["@adraffy/ens-normalize@1.11.1", "", {}, "sha512-nhCBV3quEgesuf7c7KYfperqSS14T8bYuvJ8PcLJp6znkZpFc0AuW4qBtr8eKVyPPe/8RSr7sglCWPU5eaxwKQ=="], + "@reown/appkit/@walletconnect/universal-provider/@walletconnect/utils/ox/@noble/curves": ["@noble/curves@1.9.1", "", { "dependencies": { "@noble/hashes": "1.8.0" } }, "sha512-k11yZxZg+t+gWvBbIswW0yoJlu8cHOC7dhunwOzoWH/mXGBiYyR4YY6hAEK/3EUs4UpB8la1RfdRpeGsFHkWsA=="], "@wagmi/connectors/@walletconnect/ethereum-provider/@reown/appkit/@reown/appkit-ui/qrcode": ["qrcode@1.5.3", "", { "dependencies": { "dijkstrajs": "^1.0.1", "encode-utf8": "^1.0.3", "pngjs": "^5.0.0", "yargs": "^15.3.1" }, "bin": { "qrcode": "bin/qrcode" } }, "sha512-puyri6ApkEHYiVl4CFzo1tDkAZ+ATcnbJrJ6RiBM1Fhctdn/ix9MTE3hRph33omisEbC/2fcfemsseiKgBPKZg=="], @@ -3881,6 +3905,8 @@ "@walletconnect/ethereum-provider/@walletconnect/universal-provider/@walletconnect/logger/pino/thread-stream": ["thread-stream@0.15.2", "", { "dependencies": { "real-require": "^0.1.0" } }, "sha512-UkEhKIg2pD+fjkHQKyJO3yoIvAP3N6RlNFt2dUhcS1FGvCD1cQa1M/PGknCLFIyZdtJOWQjejp7bdNqmN7zwdA=="], + "@walletconnect/ethereum-provider/@walletconnect/utils/viem/ox/@adraffy/ens-normalize": ["@adraffy/ens-normalize@1.11.1", "", {}, "sha512-nhCBV3quEgesuf7c7KYfperqSS14T8bYuvJ8PcLJp6znkZpFc0AuW4qBtr8eKVyPPe/8RSr7sglCWPU5eaxwKQ=="], + "@walletconnect/ethereum-provider/@walletconnect/utils/viem/ox/@noble/curves": ["@noble/curves@1.9.7", "", { "dependencies": { "@noble/hashes": "1.8.0" } }, "sha512-gbKGcRUYIjA3/zCCNaWDciTMFI0dCkvou3TL8Zmy5Nc7sJ47a0jtOeZoTaMxkuqRo9cRhjOdZJXegxYE5FN/xw=="], "@walletconnect/ethereum-provider/@walletconnect/utils/viem/ox/abitype": ["abitype@1.1.0", "", { "peerDependencies": { "typescript": ">=5.0.4", "zod": "^3.22.0 || ^4.0.0" }, "optionalPeers": ["typescript", "zod"] }, "sha512-6Vh4HcRxNMLA0puzPjM5GBgT4aAcFGKZzSgAXvuZ27shJP6NEpielTuqbBmZILR5/xd0PizkBGy5hReKz9jl5A=="], @@ -3889,10 +3915,14 @@ "metro/jest-worker/jest-util/@jest/types/@jest/schemas": ["@jest/schemas@29.6.3", "", { "dependencies": { "@sinclair/typebox": "^0.27.8" } }, "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA=="], + "wagmi/@wagmi/connectors/@base-org/account/ox/@adraffy/ens-normalize": ["@adraffy/ens-normalize@1.11.1", "", {}, "sha512-nhCBV3quEgesuf7c7KYfperqSS14T8bYuvJ8PcLJp6znkZpFc0AuW4qBtr8eKVyPPe/8RSr7sglCWPU5eaxwKQ=="], + "wagmi/@wagmi/connectors/@base-org/account/ox/@noble/curves": ["@noble/curves@1.9.7", "", { "dependencies": { "@noble/hashes": "1.8.0" } }, "sha512-gbKGcRUYIjA3/zCCNaWDciTMFI0dCkvou3TL8Zmy5Nc7sJ47a0jtOeZoTaMxkuqRo9cRhjOdZJXegxYE5FN/xw=="], "wagmi/@wagmi/connectors/@base-org/account/ox/@noble/hashes": ["@noble/hashes@1.8.0", "", {}, "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A=="], + "wagmi/@wagmi/connectors/@coinbase/wallet-sdk/ox/@adraffy/ens-normalize": ["@adraffy/ens-normalize@1.11.1", "", {}, "sha512-nhCBV3quEgesuf7c7KYfperqSS14T8bYuvJ8PcLJp6znkZpFc0AuW4qBtr8eKVyPPe/8RSr7sglCWPU5eaxwKQ=="], + "wagmi/@wagmi/connectors/@coinbase/wallet-sdk/ox/@noble/curves": ["@noble/curves@1.9.7", "", { "dependencies": { "@noble/hashes": "1.8.0" } }, "sha512-gbKGcRUYIjA3/zCCNaWDciTMFI0dCkvou3TL8Zmy5Nc7sJ47a0jtOeZoTaMxkuqRo9cRhjOdZJXegxYE5FN/xw=="], "wagmi/@wagmi/connectors/@coinbase/wallet-sdk/ox/@noble/hashes": ["@noble/hashes@1.8.0", "", {}, "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A=="], @@ -4011,6 +4041,8 @@ "@wagmi/connectors/@walletconnect/ethereum-provider/@walletconnect/universal-provider/@walletconnect/logger/pino/thread-stream": ["thread-stream@0.15.2", "", { "dependencies": { "real-require": "^0.1.0" } }, "sha512-UkEhKIg2pD+fjkHQKyJO3yoIvAP3N6RlNFt2dUhcS1FGvCD1cQa1M/PGknCLFIyZdtJOWQjejp7bdNqmN7zwdA=="], + "@wagmi/connectors/@walletconnect/ethereum-provider/@walletconnect/utils/viem/ox/@adraffy/ens-normalize": ["@adraffy/ens-normalize@1.11.1", "", {}, "sha512-nhCBV3quEgesuf7c7KYfperqSS14T8bYuvJ8PcLJp6znkZpFc0AuW4qBtr8eKVyPPe/8RSr7sglCWPU5eaxwKQ=="], + "@wagmi/connectors/@walletconnect/ethereum-provider/@walletconnect/utils/viem/ox/@noble/curves": ["@noble/curves@1.9.7", "", { "dependencies": { "@noble/hashes": "1.8.0" } }, "sha512-gbKGcRUYIjA3/zCCNaWDciTMFI0dCkvou3TL8Zmy5Nc7sJ47a0jtOeZoTaMxkuqRo9cRhjOdZJXegxYE5FN/xw=="], "@wagmi/connectors/@walletconnect/ethereum-provider/@walletconnect/utils/viem/ox/@noble/hashes": ["@noble/hashes@1.8.0", "", {}, "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A=="], @@ -4235,6 +4267,8 @@ "@walletconnect/ethereum-provider/@reown/appkit/@walletconnect/universal-provider/@walletconnect/logger/pino/pino-abstract-transport/duplexify": ["duplexify@4.1.3", "", { "dependencies": { "end-of-stream": "^1.4.1", "inherits": "^2.0.3", "readable-stream": "^3.1.1", "stream-shift": "^1.0.2" } }, "sha512-M3BmBhwJRZsSx38lZyhE53Csddgzl5R7xGJNk7CVddZD6CcmwMCH8J+7AprIrQKH7TonKxaCjcv27Qmf+sQ+oA=="], + "@walletconnect/ethereum-provider/@reown/appkit/@walletconnect/universal-provider/@walletconnect/utils/viem/ox/@adraffy/ens-normalize": ["@adraffy/ens-normalize@1.11.1", "", {}, "sha512-nhCBV3quEgesuf7c7KYfperqSS14T8bYuvJ8PcLJp6znkZpFc0AuW4qBtr8eKVyPPe/8RSr7sglCWPU5eaxwKQ=="], + "@walletconnect/ethereum-provider/@reown/appkit/@walletconnect/universal-provider/@walletconnect/utils/viem/ox/@noble/curves": ["@noble/curves@1.9.7", "", { "dependencies": { "@noble/hashes": "1.8.0" } }, "sha512-gbKGcRUYIjA3/zCCNaWDciTMFI0dCkvou3TL8Zmy5Nc7sJ47a0jtOeZoTaMxkuqRo9cRhjOdZJXegxYE5FN/xw=="], "@walletconnect/ethereum-provider/@reown/appkit/@walletconnect/universal-provider/@walletconnect/utils/viem/ox/@noble/hashes": ["@noble/hashes@1.8.0", "", {}, "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A=="], @@ -4315,6 +4349,8 @@ "wagmi/@wagmi/connectors/@walletconnect/ethereum-provider/@walletconnect/universal-provider/@walletconnect/logger/pino/thread-stream": ["thread-stream@0.15.2", "", { "dependencies": { "real-require": "^0.1.0" } }, "sha512-UkEhKIg2pD+fjkHQKyJO3yoIvAP3N6RlNFt2dUhcS1FGvCD1cQa1M/PGknCLFIyZdtJOWQjejp7bdNqmN7zwdA=="], + "wagmi/@wagmi/connectors/@walletconnect/ethereum-provider/@walletconnect/utils/viem/ox/@adraffy/ens-normalize": ["@adraffy/ens-normalize@1.11.1", "", {}, "sha512-nhCBV3quEgesuf7c7KYfperqSS14T8bYuvJ8PcLJp6znkZpFc0AuW4qBtr8eKVyPPe/8RSr7sglCWPU5eaxwKQ=="], + "wagmi/@wagmi/connectors/@walletconnect/ethereum-provider/@walletconnect/utils/viem/ox/@noble/curves": ["@noble/curves@1.9.7", "", { "dependencies": { "@noble/hashes": "1.8.0" } }, "sha512-gbKGcRUYIjA3/zCCNaWDciTMFI0dCkvou3TL8Zmy5Nc7sJ47a0jtOeZoTaMxkuqRo9cRhjOdZJXegxYE5FN/xw=="], "wagmi/@wagmi/connectors/@walletconnect/ethereum-provider/@walletconnect/utils/viem/ox/@noble/hashes": ["@noble/hashes@1.8.0", "", {}, "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A=="], @@ -4333,6 +4369,8 @@ "@wagmi/connectors/@walletconnect/ethereum-provider/@reown/appkit/@walletconnect/universal-provider/@walletconnect/logger/pino/pino-abstract-transport/duplexify": ["duplexify@4.1.3", "", { "dependencies": { "end-of-stream": "^1.4.1", "inherits": "^2.0.3", "readable-stream": "^3.1.1", "stream-shift": "^1.0.2" } }, "sha512-M3BmBhwJRZsSx38lZyhE53Csddgzl5R7xGJNk7CVddZD6CcmwMCH8J+7AprIrQKH7TonKxaCjcv27Qmf+sQ+oA=="], + "@wagmi/connectors/@walletconnect/ethereum-provider/@reown/appkit/@walletconnect/universal-provider/@walletconnect/utils/viem/ox/@adraffy/ens-normalize": ["@adraffy/ens-normalize@1.11.1", "", {}, "sha512-nhCBV3quEgesuf7c7KYfperqSS14T8bYuvJ8PcLJp6znkZpFc0AuW4qBtr8eKVyPPe/8RSr7sglCWPU5eaxwKQ=="], + "@wagmi/connectors/@walletconnect/ethereum-provider/@reown/appkit/@walletconnect/universal-provider/@walletconnect/utils/viem/ox/@noble/curves": ["@noble/curves@1.9.7", "", { "dependencies": { "@noble/hashes": "1.8.0" } }, "sha512-gbKGcRUYIjA3/zCCNaWDciTMFI0dCkvou3TL8Zmy5Nc7sJ47a0jtOeZoTaMxkuqRo9cRhjOdZJXegxYE5FN/xw=="], "@wagmi/connectors/@walletconnect/ethereum-provider/@reown/appkit/@walletconnect/universal-provider/@walletconnect/utils/viem/ox/@noble/hashes": ["@noble/hashes@1.8.0", "", {}, "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A=="], @@ -4455,6 +4493,8 @@ "wagmi/@wagmi/connectors/@walletconnect/ethereum-provider/@reown/appkit/@walletconnect/universal-provider/@walletconnect/logger/pino/pino-abstract-transport/duplexify": ["duplexify@4.1.3", "", { "dependencies": { "end-of-stream": "^1.4.1", "inherits": "^2.0.3", "readable-stream": "^3.1.1", "stream-shift": "^1.0.2" } }, "sha512-M3BmBhwJRZsSx38lZyhE53Csddgzl5R7xGJNk7CVddZD6CcmwMCH8J+7AprIrQKH7TonKxaCjcv27Qmf+sQ+oA=="], + "wagmi/@wagmi/connectors/@walletconnect/ethereum-provider/@reown/appkit/@walletconnect/universal-provider/@walletconnect/utils/viem/ox/@adraffy/ens-normalize": ["@adraffy/ens-normalize@1.11.1", "", {}, "sha512-nhCBV3quEgesuf7c7KYfperqSS14T8bYuvJ8PcLJp6znkZpFc0AuW4qBtr8eKVyPPe/8RSr7sglCWPU5eaxwKQ=="], + "wagmi/@wagmi/connectors/@walletconnect/ethereum-provider/@reown/appkit/@walletconnect/universal-provider/@walletconnect/utils/viem/ox/@noble/curves": ["@noble/curves@1.9.7", "", { "dependencies": { "@noble/hashes": "1.8.0" } }, "sha512-gbKGcRUYIjA3/zCCNaWDciTMFI0dCkvou3TL8Zmy5Nc7sJ47a0jtOeZoTaMxkuqRo9cRhjOdZJXegxYE5FN/xw=="], "wagmi/@wagmi/connectors/@walletconnect/ethereum-provider/@reown/appkit/@walletconnect/universal-provider/@walletconnect/utils/viem/ox/@noble/hashes": ["@noble/hashes@1.8.0", "", {}, "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A=="], diff --git a/src/Managing.WebApp/package.json b/src/Managing.WebApp/package.json index 6d2cff71..5232e816 100644 --- a/src/Managing.WebApp/package.json +++ b/src/Managing.WebApp/package.json @@ -15,6 +15,7 @@ "validate": "./scripts/validate" }, "dependencies": { + "@gelatonetwork/relay-sdk": "^5.6.0", "@gmx-io/sdk": "^1.3.1", "@heroicons/react": "^1.0.6", "@microsoft/signalr": "^6.0.5", @@ -34,6 +35,7 @@ "canonicalize": "^2.0.0", "classnames": "^2.3.1", "connectkit": "^1.8.2", + "crypto-js": "^4.2.0", "date-fns": "^2.30.0", "elliptic": "^6.6.1", "genetic-js": "^0.1.14",