@paraswap/dex-lib 4.1.4-bal-v3-hooks.0 → 4.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (321) hide show
  1. package/build/abi/Aave_GSM.json +751 -0
  2. package/build/abi/Balancer.json +257 -0
  3. package/build/abi/{balancer-v3/stableSurgeHook.json → BalancerV2.json} +732 -529
  4. package/build/abi/{integral/relayer.json → RamsesV2Pool.abi.json} +850 -832
  5. package/build/abi/RamsesV2Quoter.abi.json +274 -0
  6. package/build/abi/USDM.json +807 -0
  7. package/build/abi/UniswapV2Router.json +397 -0
  8. package/build/abi/angle-transmuter/ChainlinkAccessControlledOffchainAggregator.json +1246 -0
  9. package/build/abi/{integral/oracle.json → angle-transmuter/ChainlinkEACAggregatorProxy.json} +247 -239
  10. package/build/abi/curve-v1/CurveBUSDv2.abi.json +1356 -0
  11. package/build/abi/curve-v1/CurveTokenV1.json +305 -0
  12. package/build/abi/curve-v1/CurveTokenV2.json +318 -0
  13. package/build/abi/curve-v1/CurveV1StableNg.json +1452 -0
  14. package/build/abi/curve-v1/CurveV2Swap.json +700 -0
  15. package/build/abi/curve-v1/FactoryCryptoRegistry.json +316 -0
  16. package/build/abi/curve-v1/FactoryRegistry.json +508 -0
  17. package/build/abi/curve-v1/StableSwapAave.json +1152 -0
  18. package/build/abi/curve-v1/StableSwapBUSD.json +814 -0
  19. package/build/abi/curve-v1/StableSwapCompound.json +814 -0
  20. package/build/abi/curve-v1/StableSwapIDLE.json +1253 -0
  21. package/build/abi/curve-v1/StableSwapPax.json +865 -0
  22. package/build/abi/curve-v1/StableSwapSnow.json +900 -0
  23. package/build/abi/{integral/pool.json → curve-v1/StableSwapUSDN.json} +450 -487
  24. package/build/abi/curve-v1/StableSwapUSDT.json +814 -0
  25. package/build/abi/curve-v1/StableSwapY.json +814 -0
  26. package/build/abi/fluid-dex/resolver.abi.json +30 -0
  27. package/build/abi/inception/inception-ineth-pool.json +1062 -0
  28. package/build/abi/inception/inception-ineth.json +609 -0
  29. package/build/abi/inception/inception-ratio-feed.json +329 -0
  30. package/build/abi/inception/inception-vault.json +991 -0
  31. package/build/abi/kyberdmm/kyber-storage.abi.json +824 -0
  32. package/build/abi/kyberdmm.abi.json +1148 -0
  33. package/build/abi/maverick-v2/MaverickV2Quoter.json +278 -0
  34. package/build/abi/nerve/nerve-metapool.json +790 -0
  35. package/build/abi/uniswap-v3/UniswapV3Quoter.abi.json +193 -0
  36. package/build/abi/velodrome-slipstream/VelodromeSlipstreamQuoterV2.abi.json +267 -0
  37. package/build/dex/aave-v1/aave-v1.d.ts +2 -1
  38. package/build/dex/aave-v1/aave-v1.js +22 -0
  39. package/build/dex/aave-v1/aave-v1.js.map +1 -1
  40. package/build/dex/balancer-v1/balancer-pools.json +33333 -0
  41. package/build/dex/balancer-v3/balancer-v3-pool.d.ts +1 -4
  42. package/build/dex/balancer-v3/balancer-v3-pool.js +13 -20
  43. package/build/dex/balancer-v3/balancer-v3-pool.js.map +1 -1
  44. package/build/dex/balancer-v3/balancer-v3.d.ts +0 -4
  45. package/build/dex/balancer-v3/balancer-v3.js +3 -29
  46. package/build/dex/balancer-v3/balancer-v3.js.map +1 -1
  47. package/build/dex/balancer-v3/config.js +0 -39
  48. package/build/dex/balancer-v3/config.js.map +1 -1
  49. package/build/dex/balancer-v3/getOnChainState.d.ts +2 -1
  50. package/build/dex/balancer-v3/getOnChainState.js +2 -0
  51. package/build/dex/balancer-v3/getOnChainState.js.map +1 -1
  52. package/build/dex/balancer-v3/getPoolsApi.d.ts +1 -2
  53. package/build/dex/balancer-v3/getPoolsApi.js +10 -17
  54. package/build/dex/balancer-v3/getPoolsApi.js.map +1 -1
  55. package/build/dex/balancer-v3/getTopPoolsApi.d.ts +1 -5
  56. package/build/dex/balancer-v3/getTopPoolsApi.js +3 -6
  57. package/build/dex/balancer-v3/getTopPoolsApi.js.map +1 -1
  58. package/build/dex/balancer-v3/types.d.ts +1 -4
  59. package/build/dex/bebop/websocket-fetcher.d.ts +35 -0
  60. package/build/dex/bebop/websocket-fetcher.js +87 -0
  61. package/build/dex/bebop/websocket-fetcher.js.map +1 -0
  62. package/build/dex/fluid-dex/config.js +2 -2
  63. package/build/dex/fluid-dex/constants.d.ts +1 -1
  64. package/build/dex/fluid-dex/constants.js +2 -1
  65. package/build/dex/fluid-dex/constants.js.map +1 -1
  66. package/build/dex/fluid-dex/fluid-dex-liquidity-proxy.js +3 -1
  67. package/build/dex/fluid-dex/fluid-dex-liquidity-proxy.js.map +1 -1
  68. package/build/dex/fluid-dex/fluid-dex.d.ts +4 -5
  69. package/build/dex/fluid-dex/fluid-dex.js +61 -59
  70. package/build/dex/fluid-dex/fluid-dex.js.map +1 -1
  71. package/build/dex/fluid-dex/types.d.ts +3 -0
  72. package/build/dex/idle-dao/idle-dao-pool.d.ts +56 -0
  73. package/build/dex/idle-dao/idle-dao-pool.js +176 -0
  74. package/build/dex/idle-dao/idle-dao-pool.js.map +1 -0
  75. package/build/dex/idle-dao/idle-dao-pooling-pool.d.ts +16 -0
  76. package/build/dex/idle-dao/idle-dao-pooling-pool.js +57 -0
  77. package/build/dex/idle-dao/idle-dao-pooling-pool.js.map +1 -0
  78. package/build/dex/idle-dao/scripts.d.ts +9 -0
  79. package/build/dex/idle-dao/scripts.js +552 -0
  80. package/build/dex/idle-dao/scripts.js.map +1 -0
  81. package/build/dex/inception/config.d.ts +4 -0
  82. package/build/dex/inception/config.js +109 -0
  83. package/build/dex/inception/config.js.map +1 -0
  84. package/build/dex/inception/inception-event-pool.d.ts +16 -0
  85. package/build/dex/inception/inception-event-pool.js +51 -0
  86. package/build/dex/inception/inception-event-pool.js.map +1 -0
  87. package/build/dex/{integral/integral.d.ts → inception/inception-native.d.ts} +21 -19
  88. package/build/dex/inception/inception-native.js +131 -0
  89. package/build/dex/inception/inception-native.js.map +1 -0
  90. package/build/dex/inception/inception-pool.d.ts +18 -0
  91. package/build/dex/inception/inception-pool.js +32 -0
  92. package/build/dex/inception/inception-pool.js.map +1 -0
  93. package/build/dex/inception/inception-price-feed.d.ts +19 -0
  94. package/build/dex/inception/inception-price-feed.js +51 -0
  95. package/build/dex/inception/inception-price-feed.js.map +1 -0
  96. package/build/dex/inception/inception.d.ts +43 -0
  97. package/build/dex/inception/inception.js +204 -0
  98. package/build/dex/inception/inception.js.map +1 -0
  99. package/build/dex/inception/tokens.d.ts +9 -0
  100. package/build/dex/inception/tokens.js +28 -0
  101. package/build/dex/inception/tokens.js.map +1 -0
  102. package/build/dex/inception/types.d.ts +22 -0
  103. package/build/dex/inception/types.js +3 -0
  104. package/build/dex/inception/types.js.map +1 -0
  105. package/build/dex/inception/utils.d.ts +6 -0
  106. package/build/dex/inception/utils.js +37 -0
  107. package/build/dex/inception/utils.js.map +1 -0
  108. package/build/dex/jarvis.d.ts +2 -1
  109. package/build/dex/jarvis.js +58 -0
  110. package/build/dex/jarvis.js.map +1 -1
  111. package/build/dex/platypus/platypus.d.ts +2 -1
  112. package/build/dex/platypus/platypus.js +31 -0
  113. package/build/dex/platypus/platypus.js.map +1 -1
  114. package/build/dex/swaap-v1/swaap-v1.d.ts +2 -1
  115. package/build/dex/swaap-v1/swaap-v1.js +10 -0
  116. package/build/dex/swaap-v1/swaap-v1.js.map +1 -1
  117. package/build/dex/zerox/index.d.ts +4 -26
  118. package/build/dex/zerox/index.js +50 -42
  119. package/build/dex/zerox/index.js.map +1 -1
  120. package/build/dex/zerox/types.d.ts +29 -0
  121. package/build/dex/zerox/types.js +8 -1
  122. package/build/dex/zerox/types.js.map +1 -1
  123. package/build/executor/fixtures/executor01/exchange-params/price-route-multiswap-balancerv1-curvev1-eth-usdc-gusd.json +16 -0
  124. package/build/executor/fixtures/executor01/exchange-params/price-route-multiswap-balancerv1-sushiv3-wbtc-eth-sushi.json +16 -0
  125. package/build/executor/fixtures/executor01/exchange-params/price-route-multiswap-sushiv3-curvev1-eth-usdc-gusd.json +16 -0
  126. package/build/executor/fixtures/executor01/exchange-params/price-route-multiswap-sushiv3-curvev1-gusd-usdc-eth.json +16 -0
  127. package/build/executor/fixtures/executor01/exchange-params/price-route-multiswap-sushiv3-dai-usdc-eth.json +16 -0
  128. package/build/executor/fixtures/executor01/exchange-params/price-route-multiswap-sushiv3-eth-usdc-dai.json +16 -0
  129. package/build/executor/fixtures/executor01/exchange-params/price-route-multiswap-sushiv3-usdc-eth-wbtc.json +16 -0
  130. package/build/executor/fixtures/executor01/exchange-params/price-route-multiswap-sushiv3-usdt-usdc-dai.json +16 -0
  131. package/build/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-balancerv1-eth-usdc.json +9 -0
  132. package/build/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-balancerv1-usdc-eth.json +9 -0
  133. package/build/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-balancerv1-usdc-wbtc.json +9 -0
  134. package/build/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-curvev1-eth-steth.json +9 -0
  135. package/build/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-curvev1-steth-eth.json +9 -0
  136. package/build/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-curvev1-usdc-usdt.json +9 -0
  137. package/build/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-univ3-eth-usdc.json +9 -0
  138. package/build/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-univ3-usdc-eth.json +9 -0
  139. package/build/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-univ3-usdc-usdt.json +9 -0
  140. package/build/executor/fixtures/executor01/maybe-weth-calldata/price-route-multiswap-balancerv1-sushiv3-wbtc-eth-sushi.json +12 -0
  141. package/build/executor/fixtures/executor01/maybe-weth-calldata/price-route-multiswap-sushiv3-curvev1-eth-usdc-gusd.json +7 -0
  142. package/build/executor/fixtures/executor01/maybe-weth-calldata/price-route-multiswap-sushiv3-curvev1-gusd-usdc-eth.json +7 -0
  143. package/build/executor/fixtures/executor01/maybe-weth-calldata/price-route-multiswap-sushiv3-dai-usdc-eth.json +7 -0
  144. package/build/executor/fixtures/executor01/maybe-weth-calldata/price-route-multiswap-sushiv3-eth-usdc-dai.json +7 -0
  145. package/build/executor/fixtures/executor01/maybe-weth-calldata/price-route-multiswap-sushiv3-usdc-eth-wbtc.json +12 -0
  146. package/build/executor/fixtures/executor01/maybe-weth-calldata/price-route-simpleSwap-univ3-eth-usdc.json +7 -0
  147. package/build/executor/fixtures/executor01/maybe-weth-calldata/price-route-simpleSwap-univ3-usdc-eth.json +7 -0
  148. package/build/executor/fixtures/executor01/routes/price-route-multiswap-balancerv1-curvev1-eth-usdc-gusd.json +78 -0
  149. package/build/executor/fixtures/executor01/routes/price-route-multiswap-balancerv1-sushiv3-wbtc-eth-sushi.json +81 -0
  150. package/build/executor/fixtures/executor01/routes/price-route-multiswap-sushiv3-curvev1-eth-usdc-gusd.json +78 -0
  151. package/build/executor/fixtures/executor01/routes/price-route-multiswap-sushiv3-curvev1-gusd-usdc-eth.json +78 -0
  152. package/build/executor/fixtures/executor01/routes/price-route-multiswap-sushiv3-dai-usdc-eth.json +81 -0
  153. package/build/executor/fixtures/executor01/routes/price-route-multiswap-sushiv3-eth-usdc-dai.json +81 -0
  154. package/build/executor/fixtures/executor01/routes/price-route-multiswap-sushiv3-usdc-eth-wbtc.json +81 -0
  155. package/build/executor/fixtures/executor01/routes/price-route-multiswap-sushiv3-usdt-usdc-dai.json +81 -0
  156. package/build/executor/fixtures/executor01/routes/price-route-simpleSwap-balancerv1-eth-usdc.json +64 -0
  157. package/build/executor/fixtures/executor01/routes/price-route-simpleSwap-balancerv1-usdc-eth.json +85 -0
  158. package/build/executor/fixtures/executor01/routes/price-route-simpleSwap-balancerv1-usdc-wbtc.json +64 -0
  159. package/build/executor/fixtures/executor01/routes/price-route-simpleSwap-curvev1-eth-steth.json +52 -0
  160. package/build/executor/fixtures/executor01/routes/price-route-simpleSwap-curvev1-steth-eth.json +52 -0
  161. package/build/executor/fixtures/executor01/routes/price-route-simpleSwap-curvev1-usdc-usdt.json +52 -0
  162. package/build/executor/fixtures/executor01/routes/price-route-simpleSwap-univ3-eth-usdc.json +55 -0
  163. package/build/executor/fixtures/executor01/routes/price-route-simpleSwap-univ3-usdc-eth.json +55 -0
  164. package/build/executor/fixtures/executor01/routes/price-route-simpleSwap-univ3-usdc-usdt.json +55 -0
  165. package/build/executor/fixtures/executor02/exchange-params/price-route-multiSwap-balancerv1-sushiv3-univ3-bal-eth-sushi.json +23 -0
  166. package/build/executor/fixtures/executor02/exchange-params/price-route-multiSwap-maverickv1-sushiv3-univ3-eth-usdc-mav.json +37 -0
  167. package/build/executor/fixtures/executor02/exchange-params/price-route-multiSwap-univ3-sushiv3-sushi-eth-wbtc.json +23 -0
  168. package/build/executor/fixtures/executor02/exchange-params/price-route-multiSwap-univ3-sushiv3-wbtc-eth-sushi.json +23 -0
  169. package/build/executor/fixtures/executor02/exchange-params/price-route-multiswap-curvev1-univ3-dai-usdc-eth.json +51 -0
  170. package/build/executor/fixtures/executor02/exchange-params/price-route-multiswap-univ3-usdt-dai-eth.json +58 -0
  171. package/build/executor/fixtures/executor02/exchange-params/price-route-simpleSwap-sushiv3-balancerv1-eth-usdc.json +23 -0
  172. package/build/executor/fixtures/executor02/exchange-params/price-route-simpleSwap-sushiv3-balancerv1-usdc-eth.json +23 -0
  173. package/build/executor/fixtures/executor02/exchange-params/price-route-simpleSwap-sushiv3-univ3-eth-sushi.json +9 -0
  174. package/build/executor/fixtures/executor02/exchange-params/price-route-simpleSwap-sushiv3-univ3-sushi-eth.json +16 -0
  175. package/build/executor/fixtures/executor02/exchange-params/price-route-simpleSwap-univ3-curvev1-usdt-dai.json +23 -0
  176. package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-multiSwap-balancerv1-sushiv3-univ3-bal-eth-sushi.json +12 -0
  177. package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-multiSwap-maverickv1-sushiv3-univ3-eth-usdc-mav.json +7 -0
  178. package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-multiSwap-univ3-sushiv3-sushi-eth-wbtc.json +12 -0
  179. package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-multiSwap-univ3-sushiv3-wbtc-eth-sushi.json +12 -0
  180. package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-multiswap-curvev1-univ3-dai-usdc-eth.json +7 -0
  181. package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-multiswap-univ3-usdt-dai-eth.json +7 -0
  182. package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-simpleSwap-sushiv3-balancerv1-eth-usdc.json +7 -0
  183. package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-simpleSwap-sushiv3-balancerv1-usdc-eth.json +7 -0
  184. package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-simpleSwap-sushiv3-univ3-eth-sushi.json +7 -0
  185. package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-simpleSwap-sushiv3-univ3-sushi-eth.json +7 -0
  186. package/build/executor/fixtures/executor02/routes/price-route-multiSwap-balancerv1-sushiv3-univ3-bal-eth-sushi.json +130 -0
  187. package/build/executor/fixtures/executor02/routes/price-route-multiSwap-maverickv1-sushiv3-univ3-eth-usdc-mav.json +136 -0
  188. package/build/executor/fixtures/executor02/routes/price-route-multiSwap-univ3-sushiv3-sushi-eth-wbtc.json +100 -0
  189. package/build/executor/fixtures/executor02/routes/price-route-multiSwap-univ3-sushiv3-wbtc-eth-sushi.json +100 -0
  190. package/build/executor/fixtures/executor02/routes/price-route-multiswap-curvev1-univ3-dai-usdc-eth.json +166 -0
  191. package/build/executor/fixtures/executor02/routes/price-route-multiswap-univ3-usdt-dai-eth.json +190 -0
  192. package/build/executor/fixtures/executor02/routes/price-route-simpleSwap-sushiv3-balancerv1-eth-usdc.json +114 -0
  193. package/build/executor/fixtures/executor02/routes/price-route-simpleSwap-sushiv3-balancerv1-usdc-eth.json +114 -0
  194. package/build/executor/fixtures/executor02/routes/price-route-simpleSwap-sushiv3-univ3-eth-sushi.json +55 -0
  195. package/build/executor/fixtures/executor02/routes/price-route-simpleSwap-sushiv3-univ3-sushi-eth.json +73 -0
  196. package/build/executor/fixtures/executor02/routes/price-route-simpleSwap-univ3-curvev1-usdt-dai.json +82 -0
  197. package/package.json +2 -2
  198. package/scripts/run-dex-integration-v3.ts +4 -4
  199. package/src/abi/fluid-dex/resolver.abi.json +30 -0
  200. package/src/dex/balancer-v3/balancer-v3-e2e.test.ts +0 -20
  201. package/src/dex/balancer-v3/balancer-v3-integration.test.ts +197 -2
  202. package/src/dex/balancer-v3/balancer-v3-pool.ts +13 -37
  203. package/src/dex/balancer-v3/balancer-v3.ts +1 -42
  204. package/src/dex/balancer-v3/config.ts +0 -39
  205. package/src/dex/balancer-v3/getOnChainState.ts +4 -1
  206. package/src/dex/balancer-v3/getPoolsApi.ts +23 -42
  207. package/src/dex/balancer-v3/getTopPoolsApi.ts +2 -13
  208. package/src/dex/balancer-v3/types.ts +2 -4
  209. package/src/dex/fluid-dex/config.ts +2 -2
  210. package/src/dex/fluid-dex/constants.ts +2 -1
  211. package/src/dex/fluid-dex/fluid-dex-e2e.test.ts +61 -117
  212. package/src/dex/fluid-dex/fluid-dex-liquidity-proxy.ts +3 -0
  213. package/src/dex/fluid-dex/fluid-dex.ts +96 -94
  214. package/src/dex/fluid-dex/types.ts +3 -0
  215. package/tests/constants-e2e.ts +2 -7
  216. package/tests/tenderly-simulation.ts +1 -0
  217. package/.idea/aws.xml +0 -17
  218. package/.idea/codeStyles/Project.xml +0 -19
  219. package/.idea/codeStyles/codeStyleConfig.xml +0 -5
  220. package/.idea/misc.xml +0 -6
  221. package/.idea/modules.xml +0 -8
  222. package/.idea/paraswap-dex-lib.iml +0 -9
  223. package/.idea/prettier.xml +0 -7
  224. package/.idea/vcs.xml +0 -6
  225. package/build/abi/balancer-v3/directionalFeeHook.json +0 -684
  226. package/build/abi/integral/factory.json +0 -333
  227. package/build/dex/bProtocol.d.ts +0 -18
  228. package/build/dex/bProtocol.js +0 -39
  229. package/build/dex/bProtocol.js.map +0 -1
  230. package/build/dex/balancer-v3/balancer-test-helpers.d.ts +0 -5
  231. package/build/dex/balancer-v3/balancer-test-helpers.js +0 -122
  232. package/build/dex/balancer-v3/balancer-test-helpers.js.map +0 -1
  233. package/build/dex/balancer-v3/hooks/balancer-hook-event-subscriber.d.ts +0 -54
  234. package/build/dex/balancer-v3/hooks/balancer-hook-event-subscriber.js +0 -153
  235. package/build/dex/balancer-v3/hooks/balancer-hook-event-subscriber.js.map +0 -1
  236. package/build/dex/balancer-v3/hooks/directionalFeeHook.d.ts +0 -26
  237. package/build/dex/balancer-v3/hooks/directionalFeeHook.js +0 -41
  238. package/build/dex/balancer-v3/hooks/directionalFeeHook.js.map +0 -1
  239. package/build/dex/balancer-v3/hooks/loadHooksConfig.d.ts +0 -2
  240. package/build/dex/balancer-v3/hooks/loadHooksConfig.js +0 -11
  241. package/build/dex/balancer-v3/hooks/loadHooksConfig.js.map +0 -1
  242. package/build/dex/balancer-v3/hooks/stableSurgeHook.d.ts +0 -39
  243. package/build/dex/balancer-v3/hooks/stableSurgeHook.js +0 -99
  244. package/build/dex/balancer-v3/hooks/stableSurgeHook.js.map +0 -1
  245. package/build/dex/bancor.d.ts +0 -26
  246. package/build/dex/bancor.js +0 -58
  247. package/build/dex/bancor.js.map +0 -1
  248. package/build/dex/compound.d.ts +0 -18
  249. package/build/dex/compound.js +0 -46
  250. package/build/dex/compound.js.map +0 -1
  251. package/build/dex/curve-v2.d.ts +0 -58
  252. package/build/dex/curve-v2.js +0 -180
  253. package/build/dex/curve-v2.js.map +0 -1
  254. package/build/dex/dodo-v1.d.ts +0 -33
  255. package/build/dex/dodo-v1.js +0 -63
  256. package/build/dex/dodo-v1.js.map +0 -1
  257. package/build/dex/fluid-dex/fluid-dex-generate-pool.d.ts +0 -49
  258. package/build/dex/fluid-dex/fluid-dex-generate-pool.js +0 -104
  259. package/build/dex/fluid-dex/fluid-dex-generate-pool.js.map +0 -1
  260. package/build/dex/integral/config.d.ts +0 -4
  261. package/build/dex/integral/config.js +0 -20
  262. package/build/dex/integral/config.js.map +0 -1
  263. package/build/dex/integral/context.d.ts +0 -40
  264. package/build/dex/integral/context.js +0 -158
  265. package/build/dex/integral/context.js.map +0 -1
  266. package/build/dex/integral/integral-factory.d.ts +0 -24
  267. package/build/dex/integral/integral-factory.js +0 -95
  268. package/build/dex/integral/integral-factory.js.map +0 -1
  269. package/build/dex/integral/integral-pool.d.ts +0 -50
  270. package/build/dex/integral/integral-pool.js +0 -149
  271. package/build/dex/integral/integral-pool.js.map +0 -1
  272. package/build/dex/integral/integral-pricing.d.ts +0 -18
  273. package/build/dex/integral/integral-pricing.js +0 -114
  274. package/build/dex/integral/integral-pricing.js.map +0 -1
  275. package/build/dex/integral/integral-relayer.d.ts +0 -42
  276. package/build/dex/integral/integral-relayer.js +0 -192
  277. package/build/dex/integral/integral-relayer.js.map +0 -1
  278. package/build/dex/integral/integral-token.d.ts +0 -27
  279. package/build/dex/integral/integral-token.js +0 -59
  280. package/build/dex/integral/integral-token.js.map +0 -1
  281. package/build/dex/integral/integral.js +0 -376
  282. package/build/dex/integral/integral.js.map +0 -1
  283. package/build/dex/integral/types.d.ts +0 -85
  284. package/build/dex/integral/types.js +0 -9
  285. package/build/dex/integral/types.js.map +0 -1
  286. package/build/dex/integral/utils-e2e.d.ts +0 -9
  287. package/build/dex/integral/utils-e2e.js +0 -131
  288. package/build/dex/integral/utils-e2e.js.map +0 -1
  289. package/build/dex/integral/utils.d.ts +0 -17
  290. package/build/dex/integral/utils.js +0 -94
  291. package/build/dex/integral/utils.js.map +0 -1
  292. package/build/dex/lido.d.ts +0 -19
  293. package/build/dex/lido.js +0 -42
  294. package/build/dex/lido.js.map +0 -1
  295. package/build/dex/onebit.d.ts +0 -25
  296. package/build/dex/onebit.js +0 -42
  297. package/build/dex/onebit.js.map +0 -1
  298. package/build/dex/smoothy.d.ts +0 -26
  299. package/build/dex/smoothy.js +0 -48
  300. package/build/dex/smoothy.js.map +0 -1
  301. package/build/dex/stable-pool.d.ts +0 -28
  302. package/build/dex/stable-pool.js +0 -62
  303. package/build/dex/stable-pool.js.map +0 -1
  304. package/build/dex/trader-joe-v2.1/optimizer.d.ts +0 -2
  305. package/build/dex/trader-joe-v2.1/optimizer.js +0 -47
  306. package/build/dex/trader-joe-v2.1/optimizer.js.map +0 -1
  307. package/build/dex/trader-joe-v2.1/trader-joe-v2.1-new.d.ts +0 -7
  308. package/build/dex/trader-joe-v2.1/trader-joe-v2.1-new.js +0 -20
  309. package/build/dex/trader-joe-v2.1/trader-joe-v2.1-new.js.map +0 -1
  310. package/build/dex/trader-joe-v2.1.d.ts +0 -43
  311. package/build/dex/trader-joe-v2.1.js +0 -79
  312. package/build/dex/trader-joe-v2.1.js.map +0 -1
  313. package/src/abi/balancer-v3/directionalFeeHook.json +0 -684
  314. package/src/abi/balancer-v3/stableSurgeHook.json +0 -976
  315. package/src/dex/balancer-v3/balancer-hooks-events.test.ts +0 -99
  316. package/src/dex/balancer-v3/balancer-stableSurge.test.ts +0 -110
  317. package/src/dex/balancer-v3/balancer-test-helpers.ts +0 -199
  318. package/src/dex/balancer-v3/hooks/balancer-hook-event-subscriber.ts +0 -226
  319. package/src/dex/balancer-v3/hooks/directionalFeeHook.ts +0 -51
  320. package/src/dex/balancer-v3/hooks/loadHooksConfig.ts +0 -12
  321. package/src/dex/balancer-v3/hooks/stableSurgeHook.ts +0 -163
@@ -7,7 +7,6 @@ import {
7
7
  } from './config';
8
8
  import { CommonImmutablePoolState, ImmutablePoolStateMap } from './types';
9
9
  import { parseUnits } from 'ethers/lib/utils';
10
- import { HooksConfigMap } from './hooks/balancer-hook-event-subscriber';
11
10
 
12
11
  interface PoolToken {
13
12
  address: string;
@@ -22,9 +21,6 @@ interface Pool {
22
21
  id: string;
23
22
  type: string;
24
23
  poolTokens: PoolToken[];
25
- hook: {
26
- address: string;
27
- } | null;
28
24
  }
29
25
 
30
26
  interface QueryResponse {
@@ -48,6 +44,7 @@ function createQuery(
48
44
  const whereClause = {
49
45
  chainIn: networkString,
50
46
  protocolVersionIn: 3,
47
+ hasHook: false,
51
48
  poolTypeIn: `[${poolTypesString}]`,
52
49
  ...(timestamp && { createTime: `{lt: ${timestamp}}` }),
53
50
  ...(disabledPoolIdsString && { idNotIn: `[${disabledPoolIdsString}]` }),
@@ -72,53 +69,37 @@ function createQuery(
72
69
  address
73
70
  }
74
71
  }
75
- hook {
76
- address
77
- }
78
72
  }
79
73
  }
80
74
  `;
81
75
  }
82
76
 
83
- function toImmutablePoolStateMap(
84
- pools: Pool[],
85
- hooksConfigMap: HooksConfigMap,
86
- ): ImmutablePoolStateMap {
87
- return (
88
- pools
89
- // First filter out pools with hooks that aren't in hooksMap
90
- .filter(
91
- pool =>
92
- !pool.hook ||
93
- (pool.hook && pool.hook.address.toLowerCase() in hooksConfigMap),
94
- )
95
- .reduce((map, pool) => {
96
- const immutablePoolState: CommonImmutablePoolState = {
97
- poolAddress: pool.id,
98
- tokens: pool.poolTokens.map(t => t.address),
99
- tokensUnderlying: pool.poolTokens.map(t =>
100
- t.underlyingToken ? t.underlyingToken.address : null,
101
- ),
102
- weights: pool.poolTokens.map(t =>
103
- t.weight ? parseUnits(t.weight, 18).toBigInt() : 0n,
104
- ),
105
- poolType: pool.type,
106
- hookAddress: pool.hook ? pool.hook.address.toLowerCase() : undefined,
107
- hookType: pool.hook
108
- ? hooksConfigMap[pool.hook.address.toLowerCase()].type
109
- : undefined,
110
- supportsUnbalancedLiquidity: true,
111
- };
112
- map[pool.id] = immutablePoolState;
113
- return map;
114
- }, {} as ImmutablePoolStateMap)
115
- );
77
+ function toImmutablePoolStateMap(pools: Pool[]): ImmutablePoolStateMap {
78
+ return pools.reduce((map, pool) => {
79
+ const immutablePoolState: CommonImmutablePoolState = {
80
+ poolAddress: pool.id,
81
+ tokens: pool.poolTokens.map(t => t.address),
82
+ tokensUnderlying: pool.poolTokens.map(t =>
83
+ t.underlyingToken ? t.underlyingToken.address : null,
84
+ ),
85
+ weights: pool.poolTokens.map(t =>
86
+ t.weight ? parseUnits(t.weight, 18).toBigInt() : 0n,
87
+ ),
88
+ poolType: pool.type,
89
+ // TODO add scalingFactors once API provides them
90
+ // scalingFactors: pool.poolTokens.map(t => parseUnits('1', 18).toBigInt()),
91
+ // TODO Hook support will be added in future PR
92
+ hookType: undefined,
93
+ };
94
+
95
+ map[pool.id] = immutablePoolState;
96
+ return map;
97
+ }, {} as ImmutablePoolStateMap);
116
98
  }
117
99
 
118
100
  // Any data from API will be immutable. Mutable data such as balances, etc will be fetched via onchain/event state.
119
101
  export async function getPoolsApi(
120
102
  network: number,
121
- hooksConfigMap: HooksConfigMap,
122
103
  timestamp?: number,
123
104
  ): Promise<ImmutablePoolStateMap> {
124
105
  try {
@@ -140,7 +121,7 @@ export async function getPoolsApi(
140
121
  );
141
122
 
142
123
  const pools = response.data.data.poolGetAggregatorPools;
143
- return toImmutablePoolStateMap(pools, hooksConfigMap);
124
+ return toImmutablePoolStateMap(pools);
144
125
  } catch (error) {
145
126
  // console.error('Error executing GraphQL query:', error);
146
127
  throw error;
@@ -1,6 +1,5 @@
1
1
  import axios from 'axios';
2
2
  import { apiUrl, BalancerV3Config, disabledPoolIds } from './config';
3
- import { HooksConfigMap } from './hooks/balancer-hook-event-subscriber';
4
3
 
5
4
  interface PoolToken {
6
5
  address: string;
@@ -17,9 +16,6 @@ export interface Pool {
17
16
  dynamicData: {
18
17
  totalLiquidity: string;
19
18
  };
20
- hook: {
21
- address: string;
22
- } | null;
23
19
  }
24
20
 
25
21
  interface QueryResponse {
@@ -43,6 +39,7 @@ function createQuery(
43
39
  const whereClause = {
44
40
  chainIn: networkString,
45
41
  protocolVersionIn: 3,
42
+ hasHook: false,
46
43
  idIn: `[${poolIdString}]`,
47
44
  ...(disabledPoolIdsString && { idNotIn: `[${disabledPoolIdsString}]` }),
48
45
  };
@@ -71,9 +68,6 @@ function createQuery(
71
68
  dynamicData {
72
69
  totalLiquidity
73
70
  }
74
- hook {
75
- address
76
- }
77
71
  }
78
72
  }
79
73
  `;
@@ -83,7 +77,6 @@ export async function getTopPoolsApi(
83
77
  networkId: number,
84
78
  poolsFilter: string[],
85
79
  count: number,
86
- hooksTypeMap: HooksConfigMap,
87
80
  ): Promise<Pool[]> {
88
81
  try {
89
82
  const query = createQuery(networkId, poolsFilter, count);
@@ -99,11 +92,7 @@ export async function getTopPoolsApi(
99
92
  },
100
93
  );
101
94
 
102
- const pools = response.data.data.poolGetAggregatorPools.filter(
103
- pool =>
104
- !pool.hook ||
105
- (pool.hook && pool.hook.address.toLowerCase() in hooksTypeMap),
106
- );
95
+ const pools = response.data.data.poolGetAggregatorPools;
107
96
  return pools;
108
97
  } catch (error) {
109
98
  // console.error('Error executing GraphQL query:', error);
@@ -1,6 +1,5 @@
1
1
  import { BufferState } from '@balancer-labs/balancer-maths';
2
2
  import { Address } from '../../types';
3
- import { HookConfig } from './hooks/balancer-hook-event-subscriber';
4
3
 
5
4
  // Immutable data types available on all pools (Available from API)
6
5
  export type CommonImmutablePoolState = {
@@ -13,9 +12,7 @@ export type CommonImmutablePoolState = {
13
12
  weights: bigint[];
14
13
  // TODO re-introduce this once added to API
15
14
  // scalingFactors: bigint[];
16
- hookAddress: string | undefined;
17
15
  hookType: string | undefined;
18
- supportsUnbalancedLiquidity: boolean;
19
16
  };
20
17
 
21
18
  // Mutable data types available on all pools (Available via onchain calls/events)
@@ -29,6 +26,8 @@ export interface CommonMutableState {
29
26
  isPoolPaused: boolean;
30
27
  // TODO remove this once API provides it
31
28
  scalingFactors: bigint[];
29
+ // TODO remove this once API provides it
30
+ hasHook: boolean;
32
31
  }
33
32
 
34
33
  type CommonPoolState = CommonImmutablePoolState & CommonMutableState;
@@ -77,7 +76,6 @@ export type DexParams = {
77
76
  // https://github.com/balancer/balancer-v3-monorepo/blob/main/pkg/interfaces/contracts/vault/IRouter.sol
78
77
  balancerRouterAddress: string;
79
78
  balancerBatchRouterAddress: string;
80
- hooks?: HookConfig[];
81
79
  };
82
80
 
83
81
  export type TokenInfo = {
@@ -7,14 +7,14 @@ export const FluidDexConfig: DexConfigMap<DexParams> = {
7
7
  [Network.MAINNET]: {
8
8
  commonAddresses: {
9
9
  liquidityProxy: '0x52aa899454998be5b000ad077a46bbe360f4e497',
10
- resolver: '0x45f4ad57e300da55c33dea579a40fcee000d7b94',
10
+ resolver: '0xb387f9C2092cF7c4943F97842887eBff7AE96EB3',
11
11
  dexFactory: '0x91716C4EDA1Fb55e84Bf8b4c7085f84285c19085',
12
12
  },
13
13
  },
14
14
  [Network.ARBITRUM]: {
15
15
  commonAddresses: {
16
16
  liquidityProxy: '0x52Aa899454998Be5b000Ad077a46Bbe360F4e497',
17
- resolver: '0xb8f526718FF58758E256D9aD86bC194a9ff5986D',
17
+ resolver: '0xCe6F4E40152a1DF97ae95a7e4F60D944871A4060',
18
18
  dexFactory: '0x91716C4EDA1Fb55e84Bf8b4c7085f84285c19085',
19
19
  },
20
20
  },
@@ -1 +1,2 @@
1
- export const MIN_SWAP_LIQUIDITY = 10n ** 4n;
1
+ // on-chain we use 1e4 but use extra buffer to avoid reverts
2
+ export const MIN_SWAP_LIQUIDITY = 8500n;
@@ -4,46 +4,13 @@ dotenv.config();
4
4
 
5
5
  import { StaticJsonRpcProvider } from '@ethersproject/providers';
6
6
  import { testE2E } from '../../../tests/utils-e2e';
7
- import {
8
- Tokens,
9
- Holders,
10
- NativeTokenSymbols,
11
- } from '../../../tests/constants-e2e';
7
+ import { Tokens, Holders } from '../../../tests/constants-e2e';
12
8
  import { Network, ContractMethod, SwapSide } from '../../constants';
13
9
  import { generateConfig } from '../../config';
14
10
  import { CollateralReserves, DebtReserves, DexLimits } from './types';
15
11
  import { DummyDexHelper } from '../../dex-helper/index';
16
12
  import { FluidDex } from './fluid-dex';
17
13
 
18
- /*
19
- README
20
- ======
21
-
22
- The template already enumerates the basic structure which involves
23
- testing simpleSwap, multiSwap, megaSwap contract methods for
24
- ETH <> TOKEN and TOKEN <> TOKEN swaps. You should replace tokenA and
25
- tokenB with any two highly liquid tokens on FluidDex for the tests
26
- to work. If the tokens that you would like to use are not defined in
27
- Tokens or Holders map, you can update the './tests/constants-e2e'
28
-
29
- Other than the standard cases that are already added by the template
30
- it is highly recommended to add test cases which could be specific
31
- to testing FluidDex (Eg. Tests based on poolType, special tokens,
32
- etc).
33
-
34
- You can run this individual test script by running:
35
- `npx jest src/dex/<dex-name>/<dex-name>-e2e.test.ts`
36
-
37
- e2e tests use the Tenderly fork api. Please add the following to your
38
- .env file:
39
- TENDERLY_TOKEN=Find this under Account>Settings>Authorization.
40
- TENDERLY_ACCOUNT_ID=Your Tenderly account name.
41
- TENDERLY_PROJECT=Name of a Tenderly project you have created in your
42
- dashboard.
43
-
44
- (This comment should be removed from the final implementation)
45
- */
46
-
47
14
  function testForNetwork(
48
15
  network: Network,
49
16
  dexKey: string,
@@ -56,9 +23,14 @@ function testForNetwork(
56
23
  generateConfig(network).privateHttpProvider,
57
24
  network,
58
25
  );
26
+
59
27
  const tokens = Tokens[network];
60
28
  const holders = Holders[network];
61
29
 
30
+ // Create FluidDex instance to check reserves
31
+ const dexHelper = new DummyDexHelper(network);
32
+ const fluidDex = new FluidDex(network, dexKey, dexHelper);
33
+
62
34
  const sideToContractMethods = new Map([
63
35
  [SwapSide.SELL, [ContractMethod.swapExactAmountIn]],
64
36
  [SwapSide.BUY, [ContractMethod.swapExactAmountOut]],
@@ -69,11 +41,11 @@ function testForNetwork(
69
41
  describe(`${side}`, () => {
70
42
  contractMethods.forEach((contractMethod: string) => {
71
43
  describe(`${contractMethod}`, () => {
72
- it(`${tokenASymbol} -> ${tokenBSymbol}`, async () => {
44
+ it(`${tokenBSymbol} -> ${tokenASymbol}`, async () => {
73
45
  await testE2E(
74
- tokens[tokenASymbol],
75
46
  tokens[tokenBSymbol],
76
- holders[tokenASymbol],
47
+ tokens[tokenASymbol],
48
+ holders[tokenBSymbol],
77
49
  tokenBAmount,
78
50
  side,
79
51
  dexKey,
@@ -82,12 +54,13 @@ function testForNetwork(
82
54
  provider,
83
55
  );
84
56
  });
85
- it(`${tokenBSymbol} -> ${tokenASymbol}`, async () => {
57
+
58
+ it(`${tokenASymbol} -> ${tokenBSymbol}`, async () => {
86
59
  await testE2E(
87
- tokens[tokenBSymbol],
88
60
  tokens[tokenASymbol],
89
- holders[tokenBSymbol],
90
- tokenBAmount,
61
+ tokens[tokenBSymbol],
62
+ holders[tokenASymbol],
63
+ tokenAAmount,
91
64
  side,
92
65
  dexKey,
93
66
  contractMethod as ContractMethod,
@@ -108,30 +81,11 @@ describe('FluidDex E2E', () => {
108
81
  describe('Mainnet', () => {
109
82
  const network = Network.MAINNET;
110
83
 
111
- // TODO: Uncomment & test when the issue is resolved. Currently no price as expected.
112
- // describe.only('FLUID -> ETH', () => {
113
- // const tokenASymbol: string = 'FLUID';
114
- // const tokenBSymbol: string = 'ETH';
115
- //
116
- // const tokenAAmount: string = '160097047322810379';
117
- // const tokenBAmount: string = '79923068733005505624';
118
- //
119
- // testForNetwork(
120
- // network,
121
- // dexKey,
122
- // tokenASymbol,
123
- // tokenBSymbol,
124
- // tokenAAmount,
125
- // tokenBAmount,
126
- // );
127
- // });
128
-
129
- describe('ETH -> INST', () => {
130
- const tokenASymbol: string = 'ETH';
131
- const tokenBSymbol: string = 'INST';
132
-
133
- const tokenAAmount: string = '100000000000000';
134
- const tokenBAmount: string = '100000000000000';
84
+ describe('limit:FLUID -> ETH', () => {
85
+ const tokenASymbol: string = 'FLUID';
86
+ const tokenBSymbol: string = 'ETH';
87
+ const tokenAAmount: string = '16009704732281037900';
88
+ const tokenBAmount: string = '7992306873300550562400';
135
89
 
136
90
  testForNetwork(
137
91
  network,
@@ -148,7 +102,7 @@ describe('FluidDex E2E', () => {
148
102
  const tokenBSymbol: string = 'ETH';
149
103
 
150
104
  const tokenAAmount: string = '100000000000000';
151
- const tokenBAmount: string = '100000000000000';
105
+ const tokenBAmount: string = '3500000000000000000';
152
106
 
153
107
  testForNetwork(
154
108
  network,
@@ -237,6 +191,9 @@ function NewDebtReservesOne(): DebtReserves {
237
191
  };
238
192
  }
239
193
 
194
+ const centerPriceTight: bigint = 3401944443797854601871360n;
195
+ const centerPriceWide: bigint = 1190081051944310368000000000n;
196
+
240
197
  const limitsTight: DexLimits = {
241
198
  withdrawableToken0: {
242
199
  available: 456740438880263n,
@@ -283,10 +240,6 @@ const limitsWide: DexLimits = {
283
240
  },
284
241
  };
285
242
 
286
- const ErrInsufficientBorrowable = new Error('insufficient borrowable');
287
- const ErrInsufficientMaxPrice = new Error('insufficient max price');
288
- const ErrInsufficientReserve = new Error('insufficient reserve');
289
-
290
243
  describe('TestPoolSimulator_SwapInLimits', () => {
291
244
  const network = Network.MAINNET;
292
245
  const dexHelper = new DummyDexHelper(network);
@@ -295,21 +248,18 @@ describe('TestPoolSimulator_SwapInLimits', () => {
295
248
 
296
249
  it('when limits hit', () => {
297
250
  let outAmt;
298
- try {
299
- outAmt = fluidDex.swapInAdjusted(
300
- true,
301
- BigInt(1e15),
302
- NewColReservesOne(),
303
- NewDebtReservesOne(),
304
- 100n,
305
- 18,
306
- limitsTight,
307
- Math.floor(Date.now() / 1000) - 10,
308
- );
309
- expect(outAmt).toEqual(0n);
310
- } catch (err: any) {
311
- expect(err.message).toEqual(ErrInsufficientBorrowable.message);
312
- }
251
+ outAmt = fluidDex.swapInAdjusted(
252
+ true,
253
+ BigInt(1e15),
254
+ NewColReservesOne(),
255
+ NewDebtReservesOne(),
256
+ 100n,
257
+ 18,
258
+ limitsTight,
259
+ BigInt(centerPriceTight),
260
+ Math.floor(Date.now() / 1000) - 10,
261
+ );
262
+ expect(outAmt).toEqual(0n);
313
263
  });
314
264
 
315
265
  it('when expanded', () => {
@@ -321,47 +271,41 @@ describe('TestPoolSimulator_SwapInLimits', () => {
321
271
  100n,
322
272
  18,
323
273
  limitsTight,
274
+ BigInt(centerPriceTight),
324
275
  Math.floor(Date.now() / 1000) - 6000,
325
276
  );
326
- console.log('outAmt: ', outAmt);
327
- expect(outAmt?.toString()).toEqual('998262697204710');
277
+ expect(outAmt?.toString()).toEqual('998163044346107');
328
278
  });
329
279
 
330
280
  it('when price diff hit', () => {
331
281
  let outAmt;
332
- try {
333
- outAmt = fluidDex.swapInAdjusted(
334
- true,
335
- BigInt(3e16),
336
- NewColReservesOne(),
337
- NewDebtReservesOne(),
338
- 100n,
339
- 18,
340
- limitsWide,
341
- Math.floor(Date.now() / 1000) - 10,
342
- );
343
- expect(outAmt).toEqual(0n);
344
- } catch (err: any) {
345
- expect(err.message).toEqual(ErrInsufficientMaxPrice.message);
346
- }
282
+ outAmt = fluidDex.swapInAdjusted(
283
+ true,
284
+ BigInt(3e16),
285
+ NewColReservesOne(),
286
+ NewDebtReservesOne(),
287
+ 100n,
288
+ 18,
289
+ limitsWide,
290
+ BigInt(centerPriceWide),
291
+ Math.floor(Date.now() / 1000) - 10,
292
+ );
293
+ expect(outAmt).toEqual(0n);
347
294
  });
348
295
 
349
296
  it('when reserves limit is hit', () => {
350
297
  let outAmt;
351
- try {
352
- outAmt = fluidDex.swapInAdjusted(
353
- true,
354
- BigInt(5e16),
355
- NewColReservesOne(),
356
- NewDebtReservesOne(),
357
- 100n,
358
- 18,
359
- limitsWide,
360
- Math.floor(Date.now() / 1000) - 10,
361
- );
362
- expect(outAmt).toEqual(0n);
363
- } catch (err: any) {
364
- expect(err.message).toEqual(ErrInsufficientReserve.message);
365
- }
298
+ outAmt = fluidDex.swapInAdjusted(
299
+ true,
300
+ BigInt(5e16),
301
+ NewColReservesOne(),
302
+ NewDebtReservesOne(),
303
+ 100n,
304
+ 18,
305
+ limitsWide,
306
+ BigInt(centerPriceWide),
307
+ Math.floor(Date.now() / 1000) - 10,
308
+ );
309
+ expect(outAmt).toEqual(0n);
366
310
  });
367
311
  });
@@ -137,12 +137,14 @@ export class FluidDexLiquidityProxy extends StatefulEventSubscriber<FluidDexLiqu
137
137
  token0,
138
138
  token1,
139
139
  feeHex,
140
+ centerPriceHex,
140
141
  collateralReservesHex,
141
142
  debtReservesHex,
142
143
  dexLimitsHex,
143
144
  ] = poolReserve;
144
145
 
145
146
  const fee = Number(feeHex.toString());
147
+ const centerPrice = Number(centerPriceHex.toString());
146
148
 
147
149
  const collateralReserves = {
148
150
  token0RealReserves: bigIntify(collateralReservesHex[0]),
@@ -196,6 +198,7 @@ export class FluidDexLiquidityProxy extends StatefulEventSubscriber<FluidDexLiqu
196
198
  token0,
197
199
  token1,
198
200
  fee,
201
+ centerPrice,
199
202
  collateralReserves,
200
203
  debtReserves,
201
204
  dexLimits,