From 79fddddc4a89c78b8e2284d0166790ae05795d1c Mon Sep 17 00:00:00 2001 From: Siddharth2207 Date: Mon, 27 Jan 2025 17:01:00 +0530 Subject: [PATCH 1/2] akuma setup --- .../raindex/1-auction-dca/auction-dca.rain | 225 ++++++++++++++++++ .../2-dynamic-spread/dynamic-spread.rain | 120 ++++++++++ 2 files changed, 345 insertions(+) diff --git a/public/_strategies/raindex/1-auction-dca/auction-dca.rain b/public/_strategies/raindex/1-auction-dca/auction-dca.rain index 868da821..0d31bb43 100644 --- a/public/_strategies/raindex/1-auction-dca/auction-dca.rain +++ b/public/_strategies/raindex/1-auction-dca/auction-dca.rain @@ -168,6 +168,10 @@ tokens: network: base address: 0x2C002ffEC41568d138Acc36f5894d6156398D539 decimals: 18 + base-akuma: + network: base + address: 0x2F20Cf3466f80A5f7f532fCa553c8cbc9727FEf6 + decimals: 18 base-weth: network: base address: 0x4200000000000000000000000000000000000006 @@ -353,6 +357,20 @@ orders: - token: base-paid outputs: - token: base-usdc + base-usdc-akuma: + orderbook: base + network: base + inputs: + - token: base-usdc + outputs: + - token: base-akuma + base-akuma-usdc: + orderbook: base + network: base + inputs: + - token: base-akuma + outputs: + - token: base-usdc base-usdc-toast: orderbook: base network: base @@ -846,6 +864,12 @@ deployments: base-paid-usdc: order: base-paid-usdc scenario: base + base-usdc-akuma: + order: base-usdc-akuma + scenario: base + base-akuma-usdc: + order: base-akuma-usdc + scenario: base base-usdc-toast: order: base-usdc-toast scenario: base @@ -4205,6 +4229,207 @@ gui: - name: 50 value: 50 + - deployment: base-usdc-akuma + name: Sell AKUMA for USDC on Base. + description: > + Sell AKUMA for USDC on Base. + deposits: + - token: base-akuma + min: 0 + presets: + - 0 + - 100000 + - 500000 + - 1000000 + - 10000000 + + 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 hour (3600) + value: 3600 + - name: Per day (86400) + value: 86400 + - name: Per week (604800) + value: 604800 + - binding: amount-per-epoch + name: Budget (AKUMA per period) + description: > + The amount of AKUMA to spend each budget period. + min: 0 + - binding: max-trade-amount + name: Maximum trade size (AKUMA) + description: > + The maximum amount of AKUMA to sell in a single auction. + min: 0 + - binding: min-trade-amount + name: Minimum trade size (AKUMA) + description: > + The minimum amount of AKUMA 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 + - name: Every 4 hours (14400) + value: 14400 + - binding: baseline + name: Baseline USDC per AKUMA + description: > + The absolute minimum amount of USDC per AKUMA that the auction will trade at (e.g. 0.00020 USDC per AKUMA) + min: 0 + presets: + - name: 0.01 + value: 0.01 + - name: 0.02 + value: 0.02 + - name: 0.05 + value: 0.05 + - 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 USDC per AKUMA + description: > + The initial USDC per AKUMA to kickoff the first auction (e.g. 0.00043 USDC per AKUMA) + min: 0 + presets: + - name: 0.05 + value: 0.05 + - name: 0.1 + value: 0.1 + + - deployment: base-akuma-usdc + name: Buy AKUMA with USDC on Base. + description: > + Buy AKUMA with USDC on Base. + deposits: + - token: base-usdc + min: 0 + presets: + - 0 + - 100 + - 1000 + - 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 hour (3600) + value: 3600 + - name: Per day (86400) + value: 86400 + - name: Per week (604800) + value: 604800 + - binding: amount-per-epoch + name: Budget (USDC per period) + description: > + The amount of USDC to spend each budget period. + min: 0 + - binding: max-trade-amount + name: Maximum trade size (USDC) + description: > + The maximum amount of USDC to spend in a single auction. + min: 0 + - binding: min-trade-amount + name: Minimum trade size (USDC) + description: > + The minimum amount of USDC to spend 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 + - name: Every 4 hours (14400) + value: 14400 + - binding: baseline + name: Baseline AKUMA per USDC + description: > + The absolute minimum amount of AKUMA per USDC that the auction will trade at (e.g. 2000 AKUMA per USDC) + min: 0 + presets: + - name: 10 + value: 10 + - name: 20 + value: 20 + - name: 50 + value: 50 + - 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 AKUMA per USDC + description: > + The initial AKUMA per USDC to kickoff the first auction (e.g. 2282 AKUMA per USDC) + min: 0 + presets: + - name: 20 + value: 20 + - name: 50 + value: 50 + - name: 100 + value: 100 + - name: 500 + value: 500 + - deployment: base-usdc-toast name: Sell TOAST for USDC on Base. description: > diff --git a/public/_strategies/raindex/2-dynamic-spread/dynamic-spread.rain b/public/_strategies/raindex/2-dynamic-spread/dynamic-spread.rain index 3b3407df..45a14b09 100644 --- a/public/_strategies/raindex/2-dynamic-spread/dynamic-spread.rain +++ b/public/_strategies/raindex/2-dynamic-spread/dynamic-spread.rain @@ -1139,6 +1139,104 @@ gui: - 10000 - 20000 + - deployment: base-usdc-akuma + name: USDC<>AKUMA on Base. + description: Rotate USDC and AKUMA on Base. + + 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 (USDC per AKUMA) + description: The rough USDC price you see for AKUMA on Dex Screener (e.g. 0.00044). + 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: 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 USDC that will be offered in a single auction. + min: 5 + presets: + - name: $10 + value: 10 + - name: $20 + value: 20 + - name: $50 + value: 50 + - name: $100 + value: 100 + - binding: min-amount + name: Minimum amount + description: The minimum amount of USDC that will be offered in a single auction. + min: 5 + presets: + - name: $5 + value: 5 + - name: $10 + value: 10 + - name: $20 + value: 20 + deposits: + - token: base-usdc + min: 0 + presets: + - 0 + - 100 + - 200 + - 500 + - 1000 + - token: base-akuma + min: 0 + presets: + - 0 + - 100000 + - 500000 + - 1000000 + - 2000000 + - deployment: base-usdc-toast name: USDC<>TOAST on Base. description: Rotate USDC and TOAST on Base. @@ -3242,6 +3340,12 @@ scenarios: amount-token: 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913 initial-output-token: 0x655A51e6803faF50D4acE80fa501af2F29C856cF initial-input-token: 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913 + usdc-akuma: + runs: 1 + bindings: + amount-token: 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913 + initial-output-token: 0x2F20Cf3466f80A5f7f532fCa553c8cbc9727FEf6 + initial-input-token: 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913 usdc-toast: runs: 1 bindings: @@ -3588,6 +3692,10 @@ tokens: network: base address: 0x655A51e6803faF50D4acE80fa501af2F29C856cF decimals: 18 + base-akuma: + network: base + address: 0x2F20Cf3466f80A5f7f532fCa553c8cbc9727FEf6 + decimals: 18 flare-usdce: network: flare address: 0xfbda5f676cb37624f28265a144a48b0d6e87d3b6 @@ -3797,6 +3905,15 @@ orders: outputs: - token: base-usdc - token: base-paid + base-usdc-akuma: + network: base + orderbook: base + inputs: + - token: base-usdc + - token: base-akuma + outputs: + - token: base-usdc + - token: base-akuma base-usdc-toast: network: base orderbook: base @@ -4039,6 +4156,9 @@ deployments: base-usdc-toshi: order: base-usdc-toshi scenario: base.usdc-toshi + base-usdc-akuma: + order: base-usdc-akuma + scenario: base.usdc-akuma base-usdc-paid: order: base-usdc-paid scenario: base.usdc-paid From 53ccba72ad265a3270f650bf1edd7cae6a62c911 Mon Sep 17 00:00:00 2001 From: Siddharth2207 Date: Mon, 27 Jan 2025 17:05:17 +0530 Subject: [PATCH 2/2] fix min val --- .../_strategies/raindex/2-dynamic-spread/dynamic-spread.rain | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/_strategies/raindex/2-dynamic-spread/dynamic-spread.rain b/public/_strategies/raindex/2-dynamic-spread/dynamic-spread.rain index 45a14b09..ca5fb276 100644 --- a/public/_strategies/raindex/2-dynamic-spread/dynamic-spread.rain +++ b/public/_strategies/raindex/2-dynamic-spread/dynamic-spread.rain @@ -1198,7 +1198,7 @@ gui: - binding: max-amount name: Max amount description: The maximum amount of USDC that will be offered in a single auction. - min: 5 + min: 0 presets: - name: $10 value: 10 @@ -1211,7 +1211,7 @@ gui: - binding: min-amount name: Minimum amount description: The minimum amount of USDC that will be offered in a single auction. - min: 5 + min: 0 presets: - name: $5 value: 5