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

when making swap proposals, optionally add fractional fee output #4026

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

cbeck88
Copy link
Contributor

@cbeck88 cbeck88 commented Feb 12, 2025

this non-breaking change makes the swap proposals compatible with latest deqs revisions

  • the GenerateSwapRequest gets an optional number of fee basis points and a fee address
  • if fee basis points is nonzero, then it must be <= 10,000, and the fee address must be non null.
  • an SCI output is added corresponding to this, based on this rate times the counter amount (fractional if this is partial fill and required if not)

additionally:

  • Add a "GetKeyImages" API to mobilecoind. This is a simple, helpful utility.
  • Set cq_count = 1 on the mobilecoind fog grpc environment. This was an oversight and may help mobilecoind spawn fewer threads.

Motivation

in deqs revision 55e0d4f121d7cb5c03e017c5027712dbe84feec7, the deqs node may be configured to require fractional outputs like this for quotes to be valid, in order that they may collect fees.

Future Work

none

this non-breaking change makes the swap proposals compatible
with dex revisions after 55e0d4f121d7cb5c03e017c5027712dbe84feec7
every other grpc environment in mobilecoind has cq_count = 1,
but this one doesn't. that means it creates a number of threads
equal to the number of cores. that's likely wasteful and unnecessary
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.

1 participant