-
Notifications
You must be signed in to change notification settings - Fork 124
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
sdk: bigz/improve get vamm l2 generator #618
Conversation
sdk/src/dlob/orderBookLevels.ts
Outdated
@@ -139,12 +140,20 @@ export function getVammL2Generator({ | |||
oraclePriceData, | |||
numOrders, | |||
now, | |||
topofBookQuoteAmounts, |
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.
why'd you make it in quote instead of base?
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.
so its easy to make consistent across perp markets, thus comparing spreads across perp markets would be more consistent
SwapDirection.ADD | ||
); | ||
|
||
baseSwapped = askAmm.baseAssetReserve.sub(afterSwapBaseReserves).abs(); |
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.
what if this is less than step size or super small?
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 feel like that already needed to be handled downstream of here. this is just describing the vamm liquidity profile
No description provided.