-
Notifications
You must be signed in to change notification settings - Fork 97
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
client: Base fraction unlocking on total lots. #1642
Conversation
9277c9f
to
bd134f6
Compare
Isn't there a way to just pass a |
Another problem that relates to refund reserves is that it's never being saved to the DB, only Lines 4534 to 4536 in a1d4690
But there's a Lines 280 to 287 in a1d4690
|
Definitely fix these things, but I'm investigating a reworked reserves system. If it pans out I'll share. I don't want to spend more than a day on it. |
bd134f6
to
4a6c739
Compare
just rebased |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change makes sense. I guess this was happening when a significant portion of the reserved funds were being used for the tx fees?
Yes, toggling the reserved amount can also make |
I'll put something up in the morning. Almost ready. |
@JoeGruffins Lots of test code to update, also completely untested with ETH, but this is the way I'm going: a96a980 Please peruse to see the concept though. The goal is to make it usable by the consumer (Core) and make rounding errors and the dust issue go away. It does handle a remainder if the reserves given by the wallet are not evenly divisible by the given N, but that is not sensible and should always be zero. In doing this, I realized the LCM stuff was unnecessary because it was looping through matches for a given trackedTrade, for which the result of |
This is also what I had imagined we need to do, so pr it up... |
closes #1544
The function wasn't a problem on the default simnet, but when used with smaller lot sizes
isDust
does not scale well. You can try out the way in master here: https://go.dev/play/p/QNqo2EDUiUXI think using the ratio of one lot to max lots and multiplying that times the max reserved is more straightforward.
Also adding a log for client to see the net and locktimes on start up.