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

sdk: bigz/improve get vamm l2 generator #618

Merged
merged 7 commits into from
Sep 27, 2023

Conversation

0xbigz
Copy link
Member

@0xbigz 0xbigz commented Sep 13, 2023

No description provided.

@0xbigz 0xbigz changed the title Bigz/improve get vamm l2 generator sdk: bigz/improve get vamm l2 generator Sep 13, 2023
@0xbigz 0xbigz requested review from lukecaan and wphan September 14, 2023 15:42
@@ -139,12 +140,20 @@ export function getVammL2Generator({
oraclePriceData,
numOrders,
now,
topofBookQuoteAmounts,
Copy link
Member

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?

Copy link
Member Author

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();
Copy link
Member

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?

Copy link
Member Author

@0xbigz 0xbigz Sep 21, 2023

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

@lukecaan lukecaan merged commit 1d35b85 into master Sep 27, 2023
9 of 10 checks passed
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.

3 participants