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

store open share price in Short #1353

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

store open share price in Short #1353

wants to merge 3 commits into from

Conversation

wakamex
Copy link
Contributor

@wakamex wakamex commented Mar 8, 2024

No description provided.

setattr(
trade_result,
"vault_share_price",
FixedPoint(scaled_value=log_args["baseAmount"]) / FixedPoint(scaled_value=log_args["vaultShareAmount"]),
Copy link

Choose a reason for hiding this comment

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

Tests are saying not all results contain baseAmount or vaultShareAmount (e.g., in createCheckpoint). Lets wrap this in a check for these keys.

@wakamex wakamex marked this pull request as draft March 18, 2024 17:51
@wakamex
Copy link
Contributor Author

wakamex commented Mar 18, 2024

not needed if we use get_checkpoint to look up the vault share price at the time the short was opened. although that's a bit wasteful of RPC calls.

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