serum-dex
serum-dex copied to clipboard
Settlement compute optimization
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
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.
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: https://github.com/blockworks-foundation/serum-dex/commit/b76d4f9ec597e73ed1d73dab46fc51b0e3a41c9c
I'm kind of trash with git--what's the easiest way to send just that commit to you as a PR?
Ok here is the pull request with the cherry picked commit: https://github.com/project-serum/serum-dex/pull/149