-
Notifications
You must be signed in to change notification settings - Fork 106
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: allocate for redemptions when fee asset mismatch #2863
mm: allocate for redemptions when fee asset mismatch #2863
Conversation
bb844fd
to
ea5a479
Compare
eae3899
to
eb26483
Compare
const baseBookingFees = (baseBookingFeesPerLot * baseLots) * baseReservesFactor | ||
const baseRedeemFees = (baseRedeemReservesPerLot * quoteLots) * quoteReservesFactor | ||
const quoteBookingFees = (quoteBookingFeesPerLot * quoteLots) * quoteReservesFactor | ||
const quoteRedeemFees = (quoteRedeemReservesPerLot * baseLots) * baseReservesFactor |
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.
I'm scaling the booking fees to reserve for the order reserves as well, because the fees reserved for an order are not necessarily released as soon as the order matches. But for the maker, the fees reserved for the swap actually should be released immediately, since the maker should broadcast its swap right away. And since for arb-mm, we usually expect to be the maker, we should maybe only scale the fees reserved for redemptions. I'm gonna leave it for now though, since it's not actually impossible that we'd be the taker.
eb26483
to
41a9473
Compare
41a9473
to
d4d07ac
Compare
9cfc7d5
to
50be3c5
Compare
We weren't properly reserving redemption fees for evm assets when the counter-asset didn't share a fee asset.