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

Settlement compute optimization #132

Open
armaniferrante opened this issue Jun 15, 2021 · 4 comments
Open

Settlement compute optimization #132

armaniferrante opened this issue Jun 15, 2021 · 4 comments
Labels
composition Changes needed for programs composing with the dex

Comments

@armaniferrante
Copy link
Contributor

armaniferrante commented Jun 15, 2021

As suggested by @dafyddd,

It would help if Serum DEX did a slight optimization for us on their SettleFunds instruction. They would need to check if fee rebate token account is same as user's quote currency account and only send one Token Transfer instruction in that case. Right now they send two and it costs more compute

@dafyddd
Copy link
Contributor

dafyddd commented Jun 15, 2021

I actually think this is not a priority now. I was able to get around our compute issue by sending a Settle instruction first then sending our PlaceAndSettle instruction.

@dafyddd
Copy link
Contributor

dafyddd commented Jun 18, 2021

The latest commit in our repo makes this recommended change and also increments the open_orders. referrer_rebates_accrued at the time of trade instead of at the time of event queue processing. Here's the commit:
blockworks-foundation@b76d4f9

@armaniferrante armaniferrante added the composition Changes needed for programs composing with the dex label Jun 23, 2021
@dafyddd
Copy link
Contributor

dafyddd commented Jul 13, 2021

I'm kind of trash with git--what's the easiest way to send just that commit to you as a PR?

@dafyddd
Copy link
Contributor

dafyddd commented Jul 13, 2021

Ok here is the pull request with the cherry picked commit: #149

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
composition Changes needed for programs composing with the dex
Projects
None yet
Development

No branches or pull requests

2 participants