Skip to content

Commit

Permalink
Merge pull request #348 from rainlanguage/2025-02-05-wflr-cysflr-setup
Browse files Browse the repository at this point in the history
WFLR<>cysFLR Auction Dca, Dsf
  • Loading branch information
hardyjosh authored Feb 5, 2025
2 parents 0d88d41 + 5534fa1 commit 7c7f5b3
Show file tree
Hide file tree
Showing 2 changed files with 308 additions and 0 deletions.
195 changes: 195 additions & 0 deletions public/_strategies/raindex/1-auction-dca/auction-dca.rain
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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: >
Expand Down
113 changes: 113 additions & 0 deletions public/_strategies/raindex/2-dynamic-spread/dynamic-spread.rain
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -4417,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
Expand Down

0 comments on commit 7c7f5b3

Please sign in to comment.