Skip to content

Add reverse order script, update constants#337

Open
DonDuala wants to merge 10 commits intomainfrom
reverse-script
Open

Add reverse order script, update constants#337
DonDuala wants to merge 10 commits intomainfrom
reverse-script

Conversation

@DonDuala
Copy link
Contributor

No description provided.

@DonDuala DonDuala requested a review from brittcyr January 17, 2025 01:57
@DonDuala DonDuala requested a review from brittcyr January 17, 2025 03:19
): WrapperPlaceOrderReverseParamsExternal[] {
const orders: WrapperPlaceOrderReverseParamsExternal[] = [];

// Place bid orders for cleared levels
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we care about cleared levels when this is just initial? is the idea that this is happening for tokens that already have been launched?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If for whatever reason we need to switch markets this could be useful. Didn't see a good reason to remove it effectively

Copy link
Contributor

Choose a reason for hiding this comment

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

Why is it useful for switching markets? Isnt the assumption with reverse orders being used that there is no maintenance and we just place all levels, not just up through cleared level.
Remove? This is new code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It could, in our narrow case no, but if a market was write locked or something and forced us to we would want to have this. Low probability edge case. Can remove don't care

}

/**
* Gets the current level based on total tokens sold.
Copy link
Contributor

Choose a reason for hiding this comment

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

This doesnt work anymore with nonzero spreads on reverse orders

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Renamed

Copy link
Contributor

Choose a reason for hiding this comment

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

If we need to get the current level because of the possibility of switching markets, the reason we have this, then wont it almost always be wrong?
And even if it was configured the same, wont spreads make it so that levels can get out of order and this will be off in the higher levels?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it will be approximate and still serve the purpose of resetting on a new market

@DonDuala DonDuala requested a review from brittcyr January 20, 2025 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants