Skip to content
This repository has been archived by the owner on Nov 29, 2024. It is now read-only.

Streaming DCA #57

Closed
wants to merge 7 commits into from
Closed

Streaming DCA #57

wants to merge 7 commits into from

Conversation

Siddharth2207
Copy link
Contributor

Motivation

Solution

Checks

By submitting this for review, I'm confirming I've done the following:

  • made this PR as small as possible
  • unit-tested any new functionality
  • linked any relevant issues or PRs

@Siddharth2207 Siddharth2207 self-assigned this Jun 18, 2024
src/wip/streaming-dca.rain Outdated Show resolved Hide resolved
src/wip/streaming-dca.rain Outdated Show resolved Hide resolved
src/wip/streaming-dca.rain Outdated Show resolved Hide resolved
src/wip/streaming-dca.rain Outdated Show resolved Hide resolved
src/wip/streaming-dca.rain Outdated Show resolved Hide resolved
src/wip/streaming-dca.rain Outdated Show resolved Hide resolved
bounty: min(
linear-growth(
bounty-min
bounty-epoch-increase
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i thought we discussed in chat just having a single time which is the total auction duration?

last-time: strat-strat-time;

#get-last-time-prod
current-time: block-timestamp(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should be able to just use now() for this

);

#get-last-time-plot
current-time: block-timestamp(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this actually do anything in the charts?


# Unix timestamp for strating of the strategy.
#Ideally set it 15 minutes ahead of the whatever the timestamp is while deploying
strat-strat-time: 1718738185
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

start this at a very high number like 9999999999 so that it never accidentally drains, worst case is that it just accidentally never starts

bounty-amount: call<'bounty-auction>(elapsed-time),
input-amount: call<'calculate-budget-input>(current-budget),
max-amount: current-budget,
io-ratio: div(saturating-sub(input-amount bounty-amount) current-budget),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you've got a sat sub here on the numerator, is an io ratio of 0 actually allowed?

current-time last-time: call<'get-last-time>(),
elapsed-time: saturating-sub(current-time last-time),
current-budget: mul(per-second-rate elapsed-time),
bounty-amount: call<'bounty-auction>(elapsed-time),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you've got "elapsed-time" here but it is "time-since-cooldown" in the bounty calculation

if the bounty auction starts immediately then it is raising the gas it will pay while the overall output budget is still very small, which won't clear anyway

probably we only want to start the bounty auction after a certain amount of time has passed

@dcatki
Copy link
Contributor

dcatki commented Jul 10, 2024

@Siddharth2207 you should be able to pick this up again shortly - there is a space to get this completed

@hardyjosh hardyjosh closed this Aug 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants