Skip to content

store open share price in Short#1353

Draft
wakamex wants to merge 3 commits intomainfrom
store_open_share_price
Draft

store open share price in Short#1353
wakamex wants to merge 3 commits intomainfrom
store_open_share_price

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