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

Implement a basic rebalancing flow #4

Open
Tracked by #1
jalextowle opened this issue Sep 11, 2024 · 0 comments
Open
Tracked by #1

Implement a basic rebalancing flow #4

jalextowle opened this issue Sep 11, 2024 · 0 comments

Comments

@jalextowle
Copy link
Contributor

jalextowle commented Sep 11, 2024

This consists of taking a certain amount of liquidity to buy longs at a high rate and shorts at a low rate.
Much like John did with Everlong, I'll start by consuming all of the idle since I don't have a way to value the positions yet.

This is an interesting problem to solve. How do I break up a certain dollar amount into a long amount and a short amount?

  • I should start with the easy way.
  • The easy way to do it is to assume that the realized price will be approximately equal to the spot price. I can compute the adjusted spot price given the curve fee, and then I can use that to determine the split.
  • The hard way to do it is to solve for the base amount such that the portion of base remaining is equal to the fixed rate that was paid. It would be good to have this problem solved for future reference.
@jalextowle jalextowle changed the title Implement a basic rebalancing flow. This consists of taking a certain Implement a basic rebalancing flow Sep 11, 2024
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

No branches or pull requests

1 participant