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

mm: Internal transfers #2891

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

martonp
Copy link
Contributor

@martonp martonp commented Jul 29, 2024

This diff updates the market maker to attempt to allocate available funds to bots before doing a deposit or a withdrawal. By doing this, unnecessary deposits or withdrawals may be avoided. This will be attempted even if rebalancing is turned off.

This diff updates the market maker to attempt to allocate available funds
to bots before doing a deposit or a withdrawal. By doing this, unnecessary
deposits or withdrawals may be avoided. This will be attempted even if
rebalancing is turned off.
Comment on lines +426 to +427
// ** IMPORTANT ** No mutexes is should be locked when calling this
// function.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// ** IMPORTANT ** No mutexes is should be locked when calling this
// function.
// ** IMPORTANT ** No mutexes should be locked when calling this
// function.

Comment on lines +2943 to +2944
dexDiffs = map[uint32]int64{u.baseID: int64(toWithdraw)}
cexDiffs = map[uint32]int64{u.baseID: -int64(toWithdraw)}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to make a new map? here and above.

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.

2 participants