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 arbitrage #2539

Merged
merged 9 commits into from
May 15, 2023
Merged

Implement arbitrage #2539

merged 9 commits into from
May 15, 2023

Conversation

hdevalence
Copy link
Member

Builds on #2538

@hdevalence hdevalence temporarily deployed to smoke-test May 11, 2023 07:40 — with GitHub Actions Inactive
Base automatically changed from arbitrage to main May 11, 2023 19:34
@hdevalence hdevalence mentioned this pull request May 15, 2023
17 tasks
@hdevalence hdevalence temporarily deployed to smoke-test May 15, 2023 16:18 — with GitHub Actions Inactive
Arbitrage is implemented as path routing from the arb token to itself, with a
price limit of 1.0.  The arb execution is wrapped in a nested state
transaction, to allow double-checking that the arbitrage is actually profitable
before committing it.
@hdevalence
Copy link
Member Author

hdevalence commented May 15, 2023

~~The current commit is triggering an .expect in the filling code, which should not happen: https://gist.github.com/hdevalence/4a5e6c7e8cf8fb981528fa455c4a8e43 ~~

Since that code wasn't changed by this PR, we should figure out what problem is uncovered by this PR.

Update: this was because I created an illegal position in the unit tests.

@hdevalence hdevalence temporarily deployed to smoke-test May 15, 2023 17:27 — with GitHub Actions Inactive
@hdevalence hdevalence temporarily deployed to smoke-test May 15, 2023 18:03 — with GitHub Actions Inactive
@hdevalence hdevalence marked this pull request as ready for review May 15, 2023 18:12
@hdevalence hdevalence changed the title [WIP] implement arbitrage Implement arbitrage May 15, 2023
@hdevalence hdevalence temporarily deployed to smoke-test May 15, 2023 19:40 — with GitHub Actions Inactive
@hdevalence hdevalence merged commit 5592e84 into main May 15, 2023
@hdevalence hdevalence deleted the arbitrage-impl branch May 15, 2023 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Testnet 52: Amalthe
Development

Successfully merging this pull request may close these issues.

1 participant