From 940f771eade2c2ea7e1d8ef20ff31194a3c25291 Mon Sep 17 00:00:00 2001 From: Siddharth2207 Date: Wed, 5 Feb 2025 19:30:47 +0530 Subject: [PATCH 1/2] wflr<>cysflr setup --- .../raindex/1-auction-dca/auction-dca.rain | 195 ++++++++++++++++++ .../2-dynamic-spread/dynamic-spread.rain | 110 ++++++++++ 2 files changed, 305 insertions(+) diff --git a/public/_strategies/raindex/1-auction-dca/auction-dca.rain b/public/_strategies/raindex/1-auction-dca/auction-dca.rain index a7dab36c..1e3d427c 100644 --- a/public/_strategies/raindex/1-auction-dca/auction-dca.rain +++ b/public/_strategies/raindex/1-auction-dca/auction-dca.rain @@ -675,6 +675,20 @@ orders: - token: flare-weth outputs: - token: flare-cysflr + flare-cysflr-wflr: + orderbook: flare + network: flare + inputs: + - token: flare-cysflr + outputs: + - token: flare-wflr + flare-wflr-cysflr: + orderbook: flare + network: flare + inputs: + - token: flare-wflr + outputs: + - token: flare-cysflr polygon-usdc-mnw: orderbook: polygon network: polygon @@ -1066,6 +1080,12 @@ deployments: flare-weth-cysflr: order: flare-weth-cysflr scenario: flare + flare-cysflr-wflr: + order: flare-cysflr-wflr + scenario: flare + flare-wflr-cysflr: + order: flare-wflr-cysflr + scenario: flare gui: name: Auction based cost averaging @@ -7940,6 +7960,181 @@ gui: The initial WETH per cysFLR to kickoff the first auction. min: 0 + - deployment: flare-cysflr-wflr + name: Sell WFLR for cysFLR on Flare. + description: > + Swap WFLR for cysFLR on Flare. + deposits: + - token: flare-wflr + min: 0 + presets: + - 0 + - 100 + - 500 + - 1000 + - 5000 + + fields: + - binding: time-per-amount-epoch + name: Budget period (in seconds) + description: > + The budget is spent over this time period. + min: 1 + presets: + - name: Per minute (60) + value: 60 + - name: Per hour (3600) + value: 3600 + - name: Per day (86400) + value: 86400 + - name: Per week (604800) + value: 604800 + - binding: amount-per-epoch + name: Budget (WFLR per period) + description: > + The amount of WFLR to spend each budget period. + min: 0 + - binding: max-trade-amount + name: Maximum trade size (WFLR) + description: > + The maximum amount of WFLR to sell in a single auction. + min: 0 + - binding: min-trade-amount + name: Minimum trade size (WFLR) + description: > + The minimum amount of WFLR to sell in a single auction. + min: 0 + - binding: time-per-trade-epoch + name: Auction period (in seconds) + description: > + The auction period is the time between each auction price halvening. + presets: + - name: Every hour (3600) + value: 3600 + - name: Every 2 hours (7200) + value: 7200 + - binding: baseline + name: Baseline cysFLR per WFLR + description: > + The absolute minimum amount of cysFLR per WFLR that the auction will trade at. + min: 0 + - binding: next-trade-multiplier + name: Auction start multiplier + description: > + The multiplier to apply to the last trade to kick off the next auction. + min: 1.01 + presets: + - name: 1.01x + value: 1.01 + - name: 1.02x + value: 1.02 + - name: 1.05x + value: 1.05 + - binding: next-trade-baseline-multiplier + name: Auction end multiplier + description: > + The multiplier to apply to the last trade to set the baseline for the next auction. + presets: + - name: Disabled (0) + value: 0 + - name: 0.9x + value: 0.9 + - name: 0.95x + value: 0.95 + - binding: initial-io + name: Kickoff cysFLR per WFLR + description: > + The initial cysFLR per WFLR to kickoff the first auction. + min: 0 + + - deployment: flare-wflr-cysflr + name: Sell cysFLR for WFLR on Flare. + description: > + Swap cysFLR for WFLR on Flare. + deposits: + - token: flare-cysflr + min: 0 + presets: + - 0 + - 1000 + - 2000 + - 5000 + - 10000 + - 20000 + + fields: + - binding: time-per-amount-epoch + name: Budget period (in seconds) + description: > + The budget is spent over this time period. + min: 1 + presets: + - name: Per minute (60) + value: 60 + - name: Per hour (3600) + value: 3600 + - name: Per day (86400) + value: 86400 + - name: Per week (604800) + value: 604800 + - binding: amount-per-epoch + name: Budget (cysFLR per period) + description: > + The amount of cysFLR to spend each budget period. + min: 0 + - binding: max-trade-amount + name: Maximum trade size (cysFLR) + description: > + The maximum amount of cysFLR to sell in a single auction. + min: 0 + - binding: min-trade-amount + name: Minimum trade size (cysFLR) + description: > + The minimum amount of cysFLR to sell in a single auction. + min: 0 + - binding: time-per-trade-epoch + name: Auction period (in seconds) + description: > + The auction period is the time between each auction price halvening. + presets: + - name: Every hour (3600) + value: 3600 + - name: Every 2 hours (7200) + value: 7200 + - binding: baseline + name: Baseline WFLR per cysFLR + description: > + The absolute minimum amount of WFLR per cysFLR that the auction will trade at. + min: 0 + - binding: next-trade-multiplier + name: Auction start multiplier + description: > + The multiplier to apply to the last trade to kick off the next auction. + min: 1.01 + presets: + - name: 1.01x + value: 1.01 + - name: 1.02x + value: 1.02 + - name: 1.05x + value: 1.05 + - binding: next-trade-baseline-multiplier + name: Auction end multiplier + description: > + The multiplier to apply to the last trade to set the baseline for the next auction. + presets: + - name: Disabled (0) + value: 0 + - name: 0.9x + value: 0.9 + - name: 0.95x + value: 0.95 + - binding: initial-io + name: Kickoff WFLR per cysFLR + description: > + The initial WFLR per cysFLR to kickoff the first auction. + min: 0 + - deployment: flare-wflr-xvn name: Sell XVN for WFLR on Flare. description: > diff --git a/public/_strategies/raindex/2-dynamic-spread/dynamic-spread.rain b/public/_strategies/raindex/2-dynamic-spread/dynamic-spread.rain index 5557743f..799cf03d 100644 --- a/public/_strategies/raindex/2-dynamic-spread/dynamic-spread.rain +++ b/public/_strategies/raindex/2-dynamic-spread/dynamic-spread.rain @@ -2015,6 +2015,101 @@ gui: - 200 - 500 + - deployment: flare-wflr-cysflr + name: WFLR<>cysFLR on Flare. + description: Rotate WFLR and cysFLR on Flare. + + fields: + - binding: is-fast-exit + name: Fast exit? + description: If enabled, the strategy will attempt to exit any position it builds up in a single trade, as soon as it can do so profitably. + presets: + - name: Yes + value: 1 + - name: No + value: 0 + - binding: initial-io + name: Initial price (WFLR per cysFLR) + description: The rough initial WFLR per cysFLR ratio (e.g. 17). + min: 0 + - binding: next-trade-multiplier + name: Next trade multiplier + description: This is the most the strategy will move the price in a single trade. Larger numbers will capture larger price jumps but trade less often, smaller numbers will trade more often but be less defensive against large price jumps in the market. + min: 1 + presets: + - name: 1.001x + value: 1.001 + - name: 1.002x + value: 1.002 + - name: 1.005x + value: 1.005 + - binding: cost-basis-multiplier + name: Cost basis multiplier + description: The minimum spread applied to the breakeven in addition to the auction. This is applied in both directions so 1.01x would be a 2% total spread. + min: 1 + presets: + - name: 1 (auction spread only) + value: 1 + - name: 1.0005x (0.1% total) + value: 1.0005 + - name: 1.001x (0.2% total) + value: 1.001 + - name: 1.0025x (0.5% total) + value: 1.0025 + - name: 1.005x (1% total) + value: 1.005 + - binding: time-per-epoch + name: Time per halving (seconds) + description: The amount of time (in seconds) between halvings of the price and the amount offered during each auction, relative to their baselines. + min: 600 + presets: + - name: 1 hour (3600) + value: 3600 + - name: 2 hours (7200) + value: 7200 + - name: 4 hours (14400) + value: 14400 + - name: 8 hours (28800) + value: 28800 + - binding: max-amount + name: Max amount + description: The maximum amount of WFLR that will be offered in a single auction. + min: 0 + presets: + - name: 10 + value: 10 + - name: 100 + value: 100 + - name: 1000 + value: 1000 + - binding: min-amount + name: Minimum amount + description: The minimum amount of WFLR that will be offered in a single auction. + min: 0 + presets: + - name: 10 + value: 10 + - name: 100 + value: 100 + - name: 1000 + value: 1000 + + deposits: + - token: flare-cysflr + min: 0 + presets: + - 0 + - 100 + - 200 + - 500 + - token: flare-wflr + min: 0 + presets: + - 0 + - 100 + - 200 + - 500 + - deployment: flare-xvn-wflr name: XVN<>WFLR on Flare. description: Rotate XVN and WFLR on Flare. @@ -3592,6 +3687,12 @@ scenarios: amount-token: 0xFE2907DFa8DB6e320cDbF45f0aa888F6135ec4f8 initial-output-token: 0x19831cfB53A0dbeAD9866C43557C1D48DfF76567 initial-input-token: 0xFE2907DFa8DB6e320cDbF45f0aa888F6135ec4f8 + wflr-cysflr: + runs: 1 + bindings: + amount-token: 0x1D80c49BbBCd1C0911346656B529DF9E5c2F783d + initial-output-token: 0x19831cfB53A0dbeAD9866C43557C1D48DfF76567 + initial-input-token: 0x1D80c49BbBCd1C0911346656B529DF9E5c2F783d sflr-joule: runs: 1 bindings: @@ -4187,6 +4288,15 @@ orders: outputs: - token: flare-cusdx - token: flare-cysflr + flare-wflr-cysflr: + network: flare + orderbook: flare + inputs: + - token: flare-wflr + - token: flare-cysflr + outputs: + - token: flare-wflr + - token: flare-cysflr flare-sflr-joule: network: flare orderbook: flare From 5534fa1edd0c7e87781b2e56c9acd04cdfc2f665 Mon Sep 17 00:00:00 2001 From: Siddharth2207 Date: Wed, 5 Feb 2025 19:50:21 +0530 Subject: [PATCH 2/2] add dsf deployment --- .../_strategies/raindex/2-dynamic-spread/dynamic-spread.rain | 3 +++ 1 file changed, 3 insertions(+) diff --git a/public/_strategies/raindex/2-dynamic-spread/dynamic-spread.rain b/public/_strategies/raindex/2-dynamic-spread/dynamic-spread.rain index 799cf03d..649a06f2 100644 --- a/public/_strategies/raindex/2-dynamic-spread/dynamic-spread.rain +++ b/public/_strategies/raindex/2-dynamic-spread/dynamic-spread.rain @@ -4527,6 +4527,9 @@ deployments: flare-cusdx-cysflr: order: flare-cusdx-cysflr scenario: flare.cusdx-cysflr + flare-wflr-cysflr: + order: flare-wflr-cysflr + scenario: flare.wflr-cysflr flare-usdce-weth: order: flare-usdce-weth scenario: flare.usdce-weth