Skip to content

Commit

Permalink
update dca
Browse files Browse the repository at this point in the history
  • Loading branch information
Siddharth2207 committed Jul 8, 2024
1 parent 96d1cca commit bbccdd3
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 44 deletions.
39 changes: 16 additions & 23 deletions strategies/dca-oracle-univ3.rain
Original file line number Diff line number Diff line change
Expand Up @@ -280,20 +280,16 @@ charts:
value: 0.7.6
description: Maximum amount of DOLZ offered as bounty.
- label: Bounty increase per minute
value: 0.7.10
value: 0.7.9
description: Amount by which bounty increases every minute after cooldown.
- label: Max Bounty ratio
value: 0.7.9
unit-suffix: '%'
description: Ratio of max bounty amount to order amount
- label: Mean amount
value: 0.7.4
description: Mean amount of USDC sold
- label: Cooldown in minutes
value: 0.7.11
value: 0.7.10
description: Number of minutes between strategy running
- label: Trades per hour
value: 0.7.12
value: 0.7.11
description: Number of trades per hour
- label: Strategy twap buy deviation
value: 0.7.7
Expand All @@ -304,13 +300,13 @@ charts:
unit-suffix: '%'
description: Twap deviation occuring at current block with maximum bounty on the buy side to prevent higher than deviations buys.
- label: Cummulative amount traded daily
value: 0.7.13
value: 0.7.12
description: Cummulative amount of USDC tokens offered in a day.
- label: Cummulative amount traded weekly
value: 0.7.14
value: 0.7.13
description: Cummulative amount of USDC tokens offered in a week.
- label: Cummulative amount traded montly
value: 0.7.15
value: 0.7.14
description: Cummulative amount of USDC tokens offered in a month.
- label: Twap-ratio
value: 0.7.2
Expand Down Expand Up @@ -365,20 +361,16 @@ charts:
value: 0.7.6
description: Maximum amount of USDC offered as bounty.
- label: Bounty increase per minute
value: 0.7.10
value: 0.7.9
description: Amount by which bounty increases every minute after cooldown.
- label: Max Bounty ratio
value: 0.7.9
unit-suffix: '%'
description: Ratio of max bounty amount to order amount
- label: Mean amount
value: 0.7.4
description: Mean amount of DOLZ offered
- label: Cooldown in minutes
value: 0.7.11
value: 0.7.10
description: Number of minutes between strategy running
- label: Trades per hour
value: 0.7.12
value: 0.7.11
description: Number of trades per hour
- label: Strategy twap sell deviation
value: 0.7.7
Expand All @@ -389,13 +381,13 @@ charts:
unit-suffix: '%'
description: Twap deviation occuring at current block with maximum bounty on the sell side to prevent lower than deviation sells.
- label: Cummulative amount traded daily
value: 0.7.13
value: 0.7.12
description: Cummulative amount of DOLZ tokens offered in a day.
- label: Cummulative amount traded weekly
value: 0.7.14
value: 0.7.13
description: Cummulative amount of DOLZ tokens offered in a week.
- label: Cummulative amount traded montly
value: 0.7.15
value: 0.7.14
description: Cummulative amount of DOLZ tokens offered in a month.
- label: Twap-ratio
value: 0.7.2
Expand Down Expand Up @@ -522,13 +514,14 @@ deployments:
:call<'enforce-twap-check>(twap-ratio);

#ensure-cooldown-metric
_ _: block-timestamp() 0;
_ _: now() 0;

#ensure-cooldown-chart
_ _: test-current-time test-last-time;
current-time: test-current-time,
last-time: sub(current-time mod(current-time 86400));

#ensure-cooldown-prod
current-time: block-timestamp(),
current-time: now(),
last-time: get(hash(order-hash() cooldown-key)),
:ensure(
greater-than-or-equal-to(
Expand Down
33 changes: 12 additions & 21 deletions strategies/wlth/wlth-dca-oracle-univ3.rain
Original file line number Diff line number Diff line change
Expand Up @@ -278,20 +278,16 @@ charts:
value: 0.7.6
description: Maximum amount of WLTH offered as bounty.
- label: Bounty increase per minute
value: 0.7.10
value: 0.7.9
description: Amount by which bounty increases every minute after cooldown.
- label: Max Bounty ratio
value: 0.7.9
unit-suffix: '%'
description: Ratio of max bounty amount to order amount
- label: Mean amount
value: 0.7.4
description: Mean amount of USDC sold
- label: Cooldown in minutes
value: 0.7.11
value: 0.7.10
description: Number of minutes between strategy running
- label: Trades per hour
value: 0.7.12
value: 0.7.11
description: Number of trades per hour
- label: Strategy twap buy deviation
value: 0.7.7
Expand All @@ -302,13 +298,13 @@ charts:
unit-suffix: '%'
description: Twap deviation occuring at current block with maximum bounty on the buy side to prevent higher than deviations buys.
- label: Cummulative amount traded daily
value: 0.7.13
value: 0.7.12
description: Cummulative amount of USDC tokens offered in a day.
- label: Cummulative amount traded weekly
value: 0.7.14
value: 0.7.13
description: Cummulative amount of USDC tokens offered in a week.
- label: Cummulative amount traded montly
value: 0.7.15
value: 0.7.14
description: Cummulative amount of USDC tokens offered in a month.
- label: Twap-ratio
value: 0.7.2
Expand Down Expand Up @@ -363,20 +359,16 @@ charts:
value: 0.7.6
description: Maximum amount of USDC offered as bounty.
- label: Bounty increase per minute
value: 0.7.10
description: Amount by which bounty increases every minute after cooldown.
- label: Max Bounty ratio
value: 0.7.9
unit-suffix: '%'
description: Ratio of max bounty amount to order amount
description: Amount by which bounty increases every minute after cooldown.
- label: Mean amount
value: 0.7.4
description: Mean amount of WLTH offered
- label: Cooldown in minutes
value: 0.7.11
value: 0.7.10
description: Number of minutes between strategy running
- label: Trades per hour
value: 0.7.12
value: 0.7.11
description: Number of trades per hour
- label: Strategy twap sell deviation
value: 0.7.7
Expand All @@ -387,13 +379,13 @@ charts:
unit-suffix: '%'
description: Twap deviation occuring at current block with maximum bounty on the sell side to prevent lower than deviation sells.
- label: Cummulative amount traded daily
value: 0.7.13
value: 0.7.12
description: Cummulative amount of WLTH tokens offered in a day.
- label: Cummulative amount traded weekly
value: 0.7.14
value: 0.7.13
description: Cummulative amount of WLTH tokens offered in a week.
- label: Cummulative amount traded montly
value: 0.7.15
value: 0.7.14
description: Cummulative amount of WLTH tokens offered in a month.
- label: Twap-ratio
value: 0.7.2
Expand Down Expand Up @@ -592,7 +584,6 @@ deployments:
mul(saturating-sub(1 twap-ratio) 100)
mul(saturating-sub(twap-ratio 1) 100)
),
max-bounty-ratio: mul(div(bounty-max mean-output-amount ) 100),
bounty-increase-per-minute: mul(div(bounty-unit-increase bounty-unit-time) 60),
cooldown-in-minutes: div(cooldown-time 60),
cooldown-in-hours: div(60 cooldown-in-minutes),
Expand Down

0 comments on commit bbccdd3

Please sign in to comment.