From 9dcc09dd378f2e3f9c9254c9b82bf3be4898f5ec Mon Sep 17 00:00:00 2001 From: Siddharth2207 Date: Sun, 30 Jun 2024 16:56:07 +0530 Subject: [PATCH] add tests --- strategies/dca-oracle-polygon-univ3.rain | 96 ++++--- ...Decimal.t.sol => DcaOracleUniv3Test.t.sol} | 242 ++++++++++++++---- 2 files changed, 232 insertions(+), 106 deletions(-) rename test/{PolygonFixedGridDecimal.t.sol => DcaOracleUniv3Test.t.sol} (57%) diff --git a/strategies/dca-oracle-polygon-univ3.rain b/strategies/dca-oracle-polygon-univ3.rain index 47fdae2..c4de6b0 100644 --- a/strategies/dca-oracle-polygon-univ3.rain +++ b/strategies/dca-oracle-polygon-univ3.rain @@ -1,9 +1,9 @@ # Strategy: Oracle based DCA, uniswap v3 # -# High level, this strategy trades mean amount of USDC denominated LINK tokens at the end of every cooldown period -# provided that current calculated USDC denominated price of LINK falls within the price gird. +# High level, this strategy trades mean amount of USDC denominated DOLZ tokens at the end of every cooldown period +# provided that current calculated USDC denominated price of DOLZ falls within the price gird. # -# - Amount of LINK bought/sold per trade within the price band is randomized and centered around a mean, +# - Amount of DOLZ bought/sold per trade within the price band is randomized and centered around a mean, # value for which can be set within the bindings. # - Range for the grid can also be provided within the bindings. # - Strategy provides a guard against orcale manipulation by enforcing that the ratio of the current price offered @@ -31,22 +31,16 @@ deployers: network: h20-community-polygon tokens: - tkn-link: + polygon-dolz: network: h20-community-polygon - address: 0x53E0bca35eC356BD5ddDFebbD1Fc0fD03FaBad39 - tkn-usdt: + address: 0x6ab4E20f36ca48B61ECd66c0450fDf665Fa130be + polygon-usdt: network: h20-community-polygon address: 0xc2132D05D31c914a87C6611C10748AEb04B58e8F - tkn-usdc: - network: h20-community-polygon - address: 0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174 - tkn-wmatic: - network: h20-community-polygon - address: 0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270 scenarios: - polygon-link-dca-univ3: + polygon-dolz-dca-univ3: network: h20-community-polygon deployer: h20-community-polygon orderbook: h20-community-polygon @@ -62,10 +56,10 @@ scenarios: # Twap fee for tokens # `twap-io-fee`: Uniswap-v3 pool fee for token pair. # If distribution token is paired with a stable token, the binding value is the fee - # for the LINK-USDC pool. + # for the DOLZ-USDC pool. # # If distribution token is paired with native wrapped token, for eg WETH, then the - # binding value is the fee for LINK-WETH pool. + # binding value is the fee for DOLZ-WETH pool. twap-io-fee: '[uniswap-v3-fee-medium]' # `twap-multiplier-fee`: Uniswap-v3 pool fee for stable-reserve pair. @@ -82,14 +76,14 @@ scenarios: buy: bindings: # Input and Output tokens are from the perspective of the order. - input-token: 0x53E0bca35eC356BD5ddDFebbD1Fc0fD03FaBad39 - output-token: 0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174 + input-token: 0x6ab4E20f36ca48B61ECd66c0450fDf665Fa130be + output-token: 0xc2132D05D31c914a87C6611C10748AEb04B58e8F # If the output token is paired with the input token on a uniswap v3, # then the reserve to address is same as input token address # If the output token is NOT paired with the input token on a uniswap v3 pool, # then the reserve to address is the address of token which the ouput token is paired with. - reserve-token: 0x53E0bca35eC356BD5ddDFebbD1Fc0fD03FaBad39 + reserve-token: 0x6ab4E20f36ca48B61ECd66c0450fDf665Fa130be # Quote and Twap multiplier to get quote and 30min twap for input-output token pair. # If the output token is paired with the input token on a uniswap v3, @@ -111,7 +105,7 @@ scenarios: # Mean amount of input tokens offered per trade. # For gas expensive networks mean amount needs to be higher to compensate # for gas fee and bounty. - mean-input-amount : 15 + mean-input-amount : 10 scenarios: deviation: @@ -127,7 +121,7 @@ scenarios: twap-deviation: 0.03 # Minimum io-ratio for the order - min-ratio: 0.05 + min-ratio: 80 scenarios: prod: bindings: @@ -151,7 +145,8 @@ scenarios: plottables: '''plottables-chart' test: bindings: - twap-deviation: 0.12 + min-ratio: 80 + twap-deviation: 0.01 enforce-twap-check: '''enforce-twap-check-prod' ensure-min-ratio: '''ensure-min-ratio-chart' ensure-cooldown: '''ensure-cooldown-chart' @@ -161,14 +156,14 @@ scenarios: bindings: # Input and Output tokens are from the perspective of the order. - input-token: 0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174 - output-token: 0x53E0bca35eC356BD5ddDFebbD1Fc0fD03FaBad39 + input-token: 0xc2132D05D31c914a87C6611C10748AEb04B58e8F + output-token: 0x6ab4E20f36ca48B61ECd66c0450fDf665Fa130be # If the output token is paired with the input token on a uniswap v3, # then the reserve to address is same as input token address # If the output token is NOT paired with the input token on a uniswap v3 pool, # then the reserve to address is the address of token which the ouput token is paired with. - reserve-token: 0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174 + reserve-token: 0xc2132D05D31c914a87C6611C10748AEb04B58e8F # Quote and Twap multiplier to get quote and 30min twap for input-output token pair. # If the output token is paired with the input token on a uniswap v3, @@ -189,7 +184,7 @@ scenarios: # Mean amount of USDC offered per trade. # For gas expensive networks mean amount needs to be higher to compensate # for gas fee and bounty. - mean-input-amount : 1 + mean-input-amount : 900 scenarios: deviation: @@ -202,10 +197,10 @@ scenarios: # - For 1% deviation, binding value is 0.01 # - For 5% deviation, binding value is 0.05 # - For 10% deviation, binding value is 0.1 - twap-deviation: 0.03 + twap-deviation: 0.1 # Minimum io-ratio for the order - min-ratio: 0 + min-ratio: 0.01 scenarios: prod: bindings: @@ -229,23 +224,24 @@ scenarios: plottables: '''plottables-chart' test: bindings: + min-ratio: 0.02 twap-deviation: 0.12 enforce-twap-check: '''enforce-twap-check-prod' - ensure-min-ratio: '''ensure-min-ratio-chart' + ensure-min-ratio: '''ensure-min-ratio-prod' ensure-cooldown: '''ensure-cooldown-chart' plottables: '''plottables-prod' charts: - link-buy-dca-univ3: - scenario: polygon-link-dca-univ3.buy.deviation.metric + dolz-buy-dca-univ3: + scenario: polygon-dolz-dca-univ3.buy.deviation.metric metrics: - label: Amount of USDC offered for first trade. value: 0.3 description: Amount of USDC offered for the current block. - - label: Amount of LINK received for frist trade. + - label: Amount of DOLZ received for frist trade. value: 0.4 - description: Amount of LINK received for USDC offered. - - label: io-ratio LINK/USDC + description: Amount of DOLZ received for USDC offered. + - label: io-ratio DOLZ/USDC value: 0.7 description: Ratio offered by the order for the current block accounting for bounty. - label: Minimum Bounty amount @@ -299,8 +295,8 @@ charts: plots: - buy-link-simulation: - scenario: polygon-link-dca-univ3.buy.deviation.chart + buy-dolz-simulation: + scenario: polygon-dolz-dca-univ3.buy.deviation.chart plots: Mean amount of USDC offered: marks: @@ -315,7 +311,7 @@ charts: x: "0.3" thresholds: 25 - Mean amount of LINK received: + Mean amount of DOLZ received: marks: - type: recty options: @@ -328,16 +324,16 @@ charts: x: "0.4" thresholds: 25 - link-sell-dca-univ3: - scenario: polygon-link-dca-univ3.sell.deviation.metric + dolz-sell-dca-univ3: + scenario: polygon-dolz-dca-univ3.sell.deviation.metric metrics: - - label: Amount of LINK offered for first trade. + - label: Amount of DOLZ offered for first trade. value: 0.3 - description: Amount of LINK offered for the current block. + description: Amount of DOLZ offered for the current block. - label: Amount of USDC received for frist trade. value: 0.4 - description: Amount of USDC received for LINK offered. - - label: io-ratio USDC/LINK + description: Amount of USDC received for DOLZ offered. + - label: io-ratio USDC/DOLZ value: 0.7 description: Ratio offered by the order for the current block accounting for bounty. - label: Minimum Bounty amount @@ -359,7 +355,7 @@ charts: - label: Mean amount value: 0.7.4 unit-prefix: $ - description: Mean amount of LINK offered + description: Mean amount of DOLZ offered - label: Cooldown in minutes value: 0.7.11 description: Number of minutes between strategy running @@ -377,22 +373,22 @@ charts: - label: Cummulative amount traded daily value: 0.7.13 unit-prefix: $ - description: Cummulative amount of LINK tokens offered in a day. + description: Cummulative amount of DOLZ tokens offered in a day. - label: Cummulative amount traded weekly value: 0.7.14 unit-prefix: $ - description: Cummulative amount of LINK tokens offered in a week. + description: Cummulative amount of DOLZ tokens offered in a week. - label: Cummulative amount traded montly value: 0.7.15 unit-prefix: $ - description: Cummulative amount of LINK tokens offered in a month. + description: Cummulative amount of DOLZ tokens offered in a month. - label: Twap-ratio value: 0.7.2 - sell-link-simulation: - scenario: polygon-link-dca-univ3.sell.deviation.chart + sell-dolz-simulation: + scenario: polygon-dolz-dca-univ3.sell.deviation.chart plots: - Mean amount of LINK offered: + Mean amount of DOLZ offered: marks: - type: recty options: @@ -612,4 +608,4 @@ charts: scale-n-dynamic(output-token-decimals() calculated-max-output()) ) "Partial trade" - ); + ); \ No newline at end of file diff --git a/test/PolygonFixedGridDecimal.t.sol b/test/DcaOracleUniv3Test.t.sol similarity index 57% rename from test/PolygonFixedGridDecimal.t.sol rename to test/DcaOracleUniv3Test.t.sol index 43d8358..5d919c9 100644 --- a/test/PolygonFixedGridDecimal.t.sol +++ b/test/DcaOracleUniv3Test.t.sol @@ -26,42 +26,26 @@ import "h20.test-std/lib/LibProcessStream.sol"; uint256 constant VAULT_ID = uint256(keccak256("vault")); -/// @dev https://polygonscan.com/address/0x53E0bca35eC356BD5ddDFebbD1Fc0fD03FaBad39 -IERC20 constant POLYGON_LINK = IERC20(0x53E0bca35eC356BD5ddDFebbD1Fc0fD03FaBad39); +/// @dev https://polygonscan.com/address/0x6ab4E20f36ca48B61ECd66c0450fDf665Fa130be +IERC20 constant POLYGON_DOLZ = IERC20(0x6ab4E20f36ca48B61ECd66c0450fDf665Fa130be); /// @dev https://polygonscan.com/address/0xc2132D05D31c914a87C6611C10748AEb04B58e8F IERC20 constant POLYGON_USDT = IERC20(0xc2132D05D31c914a87C6611C10748AEb04B58e8F); -/// @dev https://polygonscan.com/address/0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174 -IERC20 constant POLYGON_USDC = IERC20(0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174); - -/// @dev https://polygonscan.com/address/0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270 -IERC20 constant POLYGON_WMATIC = IERC20(0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270); - - -function polygonLinkIo() pure returns (IO memory) { - return IO(address(POLYGON_LINK), 18, VAULT_ID); +function polygonDolzIo() pure returns (IO memory) { + return IO(address(POLYGON_DOLZ), 18, VAULT_ID); } function polygonUsdtIo() pure returns (IO memory) { return IO(address(POLYGON_USDT), 6, VAULT_ID); } -function polygonUsdcIo() pure returns (IO memory) { - return IO(address(POLYGON_USDC), 6, VAULT_ID); -} - -function polygonWmaticIo() pure returns (IO memory) { - return IO(address(POLYGON_WMATIC), 18, VAULT_ID); -} - - -contract PolygonFixedGridDecimal is StrategyTests { +contract DcaOracleUniv3Test is StrategyTests { using SafeERC20 for IERC20; using Strings for address; - uint256 constant FORK_BLOCK_NUMBER = 58715054; + uint256 constant FORK_BLOCK_NUMBER = 58785637; function selectFork() internal { @@ -89,20 +73,20 @@ contract PolygonFixedGridDecimal is StrategyTests { ORDER_OWNER = address(0x19f95a84aa1C48A2c6a7B2d5de164331c86D030C); } - function testLinkBuyLinkHappyPath() public { + function testBuyDolzHappyPath() public { IO[] memory inputVaults = new IO[](1); - inputVaults[0] = polygonLinkIo(); + inputVaults[0] = polygonDolzIo(); IO[] memory outputVaults = new IO[](1); - outputVaults[0] = polygonUsdcIo(); + outputVaults[0] = polygonUsdtIo(); - uint256 expectedRatio = 69323311538160288; - uint256 expectedAmountOutputMax = 16279555611016865760; + uint256 expectedRatio = 90847764971111605463; + uint256 expectedAmountOutputMax = 10853037074011243840; LibStrategyDeployment.StrategyDeployment memory strategy = LibStrategyDeployment.StrategyDeployment( - getEncodedSellLinkRoute(address(ARB_INSTANCE)), - getEncodedBuyLinkRoute(address(ARB_INSTANCE)), + getEncodedSellDolzRoute(address(ARB_INSTANCE)), + getEncodedBuyDolzRoute(address(ARB_INSTANCE)), 0, 0, 1e18, @@ -110,7 +94,7 @@ contract PolygonFixedGridDecimal is StrategyTests { expectedRatio, expectedAmountOutputMax, "strategies/dca-oracle-polygon-univ3.rain", - "polygon-link-dca-univ3.buy.deviation.prod", + "polygon-dolz-dca-univ3.buy.deviation.prod", "./lib/h20.test-std/lib/rain.orderbook", "./lib/h20.test-std/lib/rain.orderbook/Cargo.toml", inputVaults, @@ -123,20 +107,20 @@ contract PolygonFixedGridDecimal is StrategyTests { } - function testLinkSellLinkHappyPath() public { + function testSellDolzHappyPath() public { IO[] memory inputVaults = new IO[](1); - inputVaults[0] = polygonUsdcIo(); + inputVaults[0] = polygonUsdtIo(); IO[] memory outputVaults = new IO[](1); - outputVaults[0] = polygonLinkIo(); + outputVaults[0] = polygonDolzIo(); - uint256 expectedRatio = 13936173715114621738; - uint256 expectedAmountOutputMax = 1085303707401124384; + uint256 expectedRatio = 0.010632142187153260e18; + uint256 expectedAmountOutputMax = 976773336661011945600; LibStrategyDeployment.StrategyDeployment memory strategy = LibStrategyDeployment.StrategyDeployment( - getEncodedBuyLinkRoute(address(ARB_INSTANCE)), - getEncodedSellLinkRoute(address(ARB_INSTANCE)), + getEncodedBuyDolzRoute(address(ARB_INSTANCE)), + getEncodedSellDolzRoute(address(ARB_INSTANCE)), 0, 0, 1e6, @@ -144,7 +128,7 @@ contract PolygonFixedGridDecimal is StrategyTests { expectedRatio, expectedAmountOutputMax, "strategies/dca-oracle-polygon-univ3.rain", - "polygon-link-dca-univ3.sell.deviation.prod", + "polygon-dolz-dca-univ3.sell.deviation.prod", "./lib/h20.test-std/lib/rain.orderbook", "./lib/h20.test-std/lib/rain.orderbook/Cargo.toml", inputVaults, @@ -159,14 +143,14 @@ contract PolygonFixedGridDecimal is StrategyTests { function testGridCooldown() public { IO[] memory inputVaults = new IO[](1); - inputVaults[0] = polygonLinkIo(); + inputVaults[0] = polygonDolzIo(); IO[] memory outputVaults = new IO[](1); - outputVaults[0] = polygonUsdcIo(); + outputVaults[0] = polygonUsdtIo(); LibStrategyDeployment.StrategyDeployment memory strategy = LibStrategyDeployment.StrategyDeployment( "", - getEncodedBuyLinkRoute(address(ARB_INSTANCE)), + getEncodedBuyDolzRoute(address(ARB_INSTANCE)), 0, 0, 0, @@ -174,7 +158,7 @@ contract PolygonFixedGridDecimal is StrategyTests { 0, 0, "strategies/dca-oracle-polygon-univ3.rain", - "polygon-link-dca-univ3.buy.deviation.prod", + "polygon-dolz-dca-univ3.buy.deviation.prod", "./lib/h20.test-std/lib/rain.orderbook", "./lib/h20.test-std/lib/rain.orderbook/Cargo.toml", inputVaults, @@ -207,25 +191,22 @@ contract PolygonFixedGridDecimal is StrategyTests { function testPartialTrade() public { IO[] memory inputVaults = new IO[](1); - inputVaults[0] = polygonUsdcIo(); + inputVaults[0] = polygonUsdtIo(); IO[] memory outputVaults = new IO[](1); - outputVaults[0] = polygonLinkIo(); - - uint256 expectedRatio = 14018452504312447172; - uint256 expectedAmountOutputMax = 1085303707401124384; + outputVaults[0] = polygonDolzIo(); LibStrategyDeployment.StrategyDeployment memory strategy = LibStrategyDeployment.StrategyDeployment( - getEncodedBuyLinkRoute(address(ARB_INSTANCE)), - getEncodedSellLinkRoute(address(ARB_INSTANCE)), + getEncodedBuyDolzRoute(address(ARB_INSTANCE)), + getEncodedSellDolzRoute(address(ARB_INSTANCE)), 0, 0, 1e6, 10000e18, - expectedRatio, - expectedAmountOutputMax, + 0, + 0, "strategies/dca-oracle-polygon-univ3.rain", - "polygon-link-dca-univ3.sell.deviation.prod", + "polygon-dolz-dca-univ3.sell.deviation.prod", "./lib/h20.test-std/lib/rain.orderbook", "./lib/h20.test-std/lib/rain.orderbook/Cargo.toml", inputVaults, @@ -283,6 +264,155 @@ contract PolygonFixedGridDecimal is StrategyTests { } vm.stopPrank(); + } + + function testTwapCheck() public { + + IO[] memory inputVaults = new IO[](1); + inputVaults[0] = polygonDolzIo(); + + IO[] memory outputVaults = new IO[](1); + outputVaults[0] = polygonUsdtIo(); + + uint256 expectedRatio = 72403579528745632; + uint256 expectedAmountOutputMax = 16279555611016865760; + + LibStrategyDeployment.StrategyDeployment memory strategy = LibStrategyDeployment.StrategyDeployment( + getEncodedSellDolzRoute(address(ARB_INSTANCE)), + getEncodedBuyDolzRoute(address(ARB_INSTANCE)), + 0, + 0, + 100000e18, + 100000e6, + expectedRatio, + expectedAmountOutputMax, + "strategies/dca-oracle-polygon-univ3.rain", + "polygon-dolz-dca-univ3.buy.test", + "./lib/h20.test-std/lib/rain.orderbook", + "./lib/h20.test-std/lib/rain.orderbook/Cargo.toml", + inputVaults, + outputVaults + ); + OrderV2 memory order = addOrderDepositOutputTokens(strategy); + // Twap check if the price increases for buy order. + { + moveExternalPrice( + strategy.outputVaults[strategy.outputTokenIndex].token, + strategy.inputVaults[strategy.inputTokenIndex].token, + 1000e6, + strategy.takerRoute + ); + vm.expectRevert("twap check"); + takeArbOrder(order, strategy.takerRoute, strategy.inputTokenIndex, strategy.outputTokenIndex); + } + { + moveExternalPrice( + strategy.inputVaults[strategy.inputTokenIndex].token, + strategy.outputVaults[strategy.outputTokenIndex].token, + strategy.makerAmount, + strategy.makerRoute + ); + takeArbOrder(order, strategy.takerRoute, strategy.inputTokenIndex, strategy.outputTokenIndex); + } + + } + + function testMinRatio() public { + + IO[] memory inputVaults = new IO[](1); + inputVaults[0] = polygonUsdtIo(); + + IO[] memory outputVaults = new IO[](1); + outputVaults[0] = polygonDolzIo(); + + uint256 expectedRatio = 0.010632142187153260e18; + uint256 expectedAmountOutputMax = 976773336661011945600; + + LibStrategyDeployment.StrategyDeployment memory strategy = LibStrategyDeployment.StrategyDeployment( + getEncodedBuyDolzRoute(address(ARB_INSTANCE)), + getEncodedSellDolzRoute(address(ARB_INSTANCE)), + 0, + 0, + 1e6, + 10000e18, + expectedRatio, + expectedAmountOutputMax, + "strategies/dca-oracle-polygon-univ3.rain", + "polygon-dolz-dca-univ3.sell.test", + "./lib/h20.test-std/lib/rain.orderbook", + "./lib/h20.test-std/lib/rain.orderbook/Cargo.toml", + inputVaults, + outputVaults + ); + + OrderV2 memory order = addOrderDepositOutputTokens(strategy); + vm.expectRevert("min ratio"); + takeArbOrder(order, strategy.takerRoute, strategy.inputTokenIndex, strategy.outputTokenIndex); + + + + } + + function testDolzBountyAuction() public { + + IO[] memory inputVaults = new IO[](1); + inputVaults[0] = polygonUsdtIo(); + + IO[] memory outputVaults = new IO[](1); + outputVaults[0] = polygonDolzIo(); + + LibStrategyDeployment.StrategyDeployment memory strategy = LibStrategyDeployment.StrategyDeployment( + getEncodedBuyDolzRoute(address(ARB_INSTANCE)), + getEncodedSellDolzRoute(address(ARB_INSTANCE)), + 0, + 0, + 1e6, + 10000e18, + 0, + 0, + "strategies/dca-oracle-polygon-univ3.rain", + "polygon-dolz-dca-univ3.sell.deviation.prod", + "./lib/h20.test-std/lib/rain.orderbook", + "./lib/h20.test-std/lib/rain.orderbook/Cargo.toml", + inputVaults, + outputVaults + ); + + + OrderV2 memory order = addOrderDepositOutputTokens(strategy); + + { + vm.recordLogs(); + takeArbOrder(order, strategy.takerRoute, strategy.inputTokenIndex, strategy.outputTokenIndex); + Vm.Log[] memory entries = vm.getRecordedLogs(); + (uint256 inputTokenBounty,) = getBounty(entries); + + // Assert greater than max bounty, minus the error amount + assertGe(inputTokenBounty, 0.3e6); + } + + // cooldown + vm.warp(block.timestamp + 14400); + { + vm.recordLogs(); + takeArbOrder(order, strategy.takerRoute, strategy.inputTokenIndex, strategy.outputTokenIndex); + Vm.Log[] memory entries = vm.getRecordedLogs(); + (uint256 inputTokenBounty,) = getBounty(entries); + + // Assert greater than min bounty, minus the error amount + assertGe(inputTokenBounty, 0.012e6); + } + + // cooldown + 60 seconds + vm.warp(block.timestamp + 14400 + 60); + { + vm.recordLogs(); + takeArbOrder(order, strategy.takerRoute, strategy.inputTokenIndex, strategy.outputTokenIndex); + Vm.Log[] memory entries = vm.getRecordedLogs(); + (uint256 inputTokenBounty,) = getBounty(entries); + // Assert greater than min bounty, minus the error amount + assertGe(inputTokenBounty, 0.022e6); + } } function getBounty(Vm.Log[] memory entries) @@ -309,16 +439,16 @@ contract PolygonFixedGridDecimal is StrategyTests { } - function getEncodedBuyLinkRoute(address toAddress) internal pure returns (bytes memory) { + function getEncodedBuyDolzRoute(address toAddress) internal pure returns (bytes memory) { bytes memory ROUTE_PRELUDE = - hex"022791Bca1f2de4661ED88A30C99A7a9449Aa8417401ffff0122177148e681A6ca5242c9888Ace170EE7eC47BD01"; + hex"02c2132D05D31c914a87C6611C10748AEb04B58e8F01ffff01C56DDB5C93B8E92B9409DCE43a9169aa643495b800"; return abi.encode(bytes.concat(ROUTE_PRELUDE, abi.encodePacked(address(toAddress)))); } - function getEncodedSellLinkRoute(address toAddress) internal pure returns (bytes memory) { + function getEncodedSellDolzRoute(address toAddress) internal pure returns (bytes memory) { bytes memory ROUTE_PRELUDE = - hex"0253E0bca35eC356BD5ddDFebbD1Fc0fD03FaBad3901ffff013c92bd9596E6aca8cfa29ec733ebe0c189bec1F301E7eb31f23A5BefEEFf76dbD2ED6AdC822568a5d201c2132D05D31c914a87C6611C10748AEb04B58e8F01ffff018CFaab34f5159abf9C35587AC40d09a05dC9476500"; + hex"026ab4E20f36ca48B61ECd66c0450fDf665Fa130be01ffff01C56DDB5C93B8E92B9409DCE43a9169aa643495b801"; return abi.encode(bytes.concat(ROUTE_PRELUDE, abi.encodePacked(address(toAddress)))); }