Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ethereum RKFI<>USDT Auction Dca, Dsf, Grid #329

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
200 changes: 200 additions & 0 deletions public/_strategies/raindex/1-auction-dca/auction-dca.rain
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,10 @@ tokens:
network: ethereum
address: 0xdAC17F958D2ee523a2206206994597C13D831ec7
decimals: 6
ethereum-rkfi:
network: ethereum
address: 0x65FdA84473084bA2CcA8452883E6eA3561092234
decimals: 18
flare-wflr:
network: flare
address: 0x1D80c49BbBCd1C0911346656B529DF9E5c2F783d
Expand Down Expand Up @@ -439,6 +443,20 @@ orders:
- token: ethereum-usdt
outputs:
- token: ethereum-lock
ethereum-rkfi-usdt:
orderbook: ethereum
network: ethereum
inputs:
- token: ethereum-rkfi
outputs:
- token: ethereum-usdt
ethereum-usdt-rkfi:
orderbook: ethereum
network: ethereum
inputs:
- token: ethereum-usdt
outputs:
- token: ethereum-rkfi
flare-sflr-wflr:
orderbook: flare
network: flare
Expand Down Expand Up @@ -834,6 +852,12 @@ deployments:
ethereum-usdt-lock:
order: ethereum-usdt-lock
scenario: ethereum
ethereum-rkfi-usdt:
order: ethereum-rkfi-usdt
scenario: ethereum
ethereum-usdt-rkfi:
order: ethereum-usdt-rkfi
scenario: ethereum
flare-sflr-wflr:
order: flare-sflr-wflr
scenario: flare-sflr-baseline
Expand Down Expand Up @@ -5470,6 +5494,182 @@ gui:
The initial LOCK per USDT to kickoff the first auction. (e.g. 0.9 LOCK per USDT)
min: 0

- deployment: ethereum-usdt-rkfi
name: Sell RKFI for USDT on Ethereum.
description: >
Swap RKFI for USDT on Ethereum mainnet.
deposits:
- token: ethereum-rkfi
min: 0
presets:
- 0
- 250
- 750
- 1250
- 5000
- 10000

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 (RKFI per period)
description: >
The amount of RKFI to spend each budget period.
min: 0
- binding: max-trade-amount
name: Maximum trade size (RKFI)
description: >
The maximum amount of RKFI to sell in a single auction.
min: 0
- binding: min-trade-amount
name: Minimum trade size (RKFI)
description: >
The minimum amount of RKFI 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 USDT per RKFI
description: >
The absolute minimum amount of USDT per RKFI 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 USDT per RKFI
description: >
The initial USDT per RKFI to kickoff the first auction.
min: 0

- deployment: ethereum-rkfi-usdt
name: Sell USDT for RKFI on Ethereum.
description: >
Swap USDT for RKFI on Ethereum mainnet.
deposits:
- token: ethereum-usdt
min: 0
presets:
- 0
- 100
- 200
- 500
- 1000
- 2000

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 (USDT per period)
description: >
The amount of USDT to spend each budget period.
min: 0
- binding: max-trade-amount
name: Maximum trade size (USDT)
description: >
The maximum amount of USDT to sell in a single auction.
min: 0
- binding: min-trade-amount
name: Minimum trade size (USDT)
description: >
The minimum amount of USDT 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 RKFI per USDT
description: >
The absolute minimum amount of RKFI per USDT 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 RKFI per USDT
description: >
The initial RKFI per USDT to kickoff the first auction.
min: 0

- deployment: flare-cysflr-cusdx
name: Sell cUSDX for cysFLR on Flare.
description: >
Expand Down
124 changes: 124 additions & 0 deletions public/_strategies/raindex/2-dynamic-spread/dynamic-spread.rain
Original file line number Diff line number Diff line change
Expand Up @@ -2500,6 +2500,104 @@ gui:
- 2
- 4

- deployment: ethereum-rkfi-usdt
name: RKFI<>USDT on Ethereum.
description: Rotate RKFI and USDT on Ethereum.

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 (USDT per RKFI)
description: The rough USDT price you see for RKFI on Dextools.
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.01x
value: 1.01
- name: 1.02x
value: 1.02
- name: 1.05x
value: 1.05
- 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: 4 hours (14400)
value: 14400
- name: 8 hours (28800)
value: 28800
- name: 12 hours (43200)
value: 43200
- name: 24 hours (86400)
value: 86400
- binding: max-amount
name: Max amount
description: The maximum amount of USDT that will be offered in a single auction.
min: 1
presets:
- name: 500
value: 500
- name: 1000
value: 1000
- name: 5000
value: 5000
- name: 10000
value: 10000
- binding: min-amount
name: Minimum amount
description: The minimum amount of USDT that will be offered in a single auction.
min: 1
presets:
- name: 100
value: 100
- name: 200
value: 200
- name: 300
value: 300
- name: 400
value: 400
deposits:
- token: ethereum-rkfi
min: 0
presets:
- 0
- 1000
- 5000
- 10000
- token: ethereum-usdt
min: 0
presets:
- 0
- 500
- 1000
- 5000

- deployment: ethereum-mnw-weth
name: MNW<>WETH on Ethereum.
description: Rotate MNW and WETH on Ethereum.
Expand Down Expand Up @@ -3222,6 +3320,12 @@ scenarios:
amount-token: 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
initial-output-token: 0xd3E4Ba569045546D09CF021ECC5dFe42b1d7f6E4
initial-input-token: 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
rkfi-usdt:
runs: 1
bindings:
amount-token: 0xdAC17F958D2ee523a2206206994597C13D831ec7
initial-output-token: 0x65FdA84473084bA2CcA8452883E6eA3561092234
initial-input-token: 0xdAC17F958D2ee523a2206206994597C13D831ec7
linea:
orderbook: linea
runs: 1
Expand Down Expand Up @@ -3493,6 +3597,14 @@ tokens:
network: ethereum
address: 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
decimals: 18
ethereum-usdt:
network: ethereum
address: 0xdAC17F958D2ee523a2206206994597C13D831ec7
decimals: 6
ethereum-rkfi:
network: ethereum
address: 0x65FdA84473084bA2CcA8452883E6eA3561092234
decimals: 18
linea-clip:
network: linea
address: 0x4Ea77a86d6E70FfE8Bb947FC86D68a7F086f198a
Expand Down Expand Up @@ -3763,6 +3875,15 @@ orders:
outputs:
- token: ethereum-pai
- token: ethereum-weth
ethereum-rkfi-usdt:
network: ethereum
orderbook: ethereum
inputs:
- token: ethereum-rkfi
- token: ethereum-usdt
outputs:
- token: ethereum-rkfi
- token: ethereum-usdt
ethereum-mnw-weth:
network: ethereum
orderbook: ethereum
Expand Down Expand Up @@ -3879,6 +4000,9 @@ deployments:
ethereum-mnw-weth:
order: ethereum-mnw-weth
scenario: ethereum.mnw-weth
ethereum-rkfi-usdt:
order: ethereum-rkfi-usdt
scenario: ethereum.rkfi-usdt
linea-clip-weth:
order: linea-clip-weth
scenario: linea.clip-weth
Expand Down
Loading
Loading